Centos7 下 zabbix服务安装与部署,linux监控服务
客戶端安裝參考:https://mp.csdn.net/postedit/95475740
安裝Zabbix
關閉 SeLinux
臨時關閉
setenforce 0永久關閉
vi /etc/selinux/config關閉防火墻
臨時關閉
systemctl stop firewalld.service永久關閉
systemctl disable firewalld.service安裝基礎環境
?環境:安裝Zabbix環境前提需要安裝LAMP/LNMP環境
安裝 httpd 服務
yum install -y httpd?
?設置開機啟動
systemctl enable httpd啟動服務
systemctl start httpd安裝Mysql(mariadb)
yum install -y mariadb mariadb-server設置開機啟動
systemctl enable mariadb啟動服務
systemctl start mariadb??
?安裝php環境
yum install -y php php-mysql?安裝Zabbix
1.下載安裝包
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm?
2.安裝zabbix包
yum install -y zabbix-server-mysql zabbix-get zabbix-web zabbix-web-mysql zabbix-agent zabbix-sender?
?3.創建zabbix數據庫
create database zabbix character set utf8 collate utf8_bin;?
?創建賬戶并且授權設置密碼,用戶zabbxi分配可對數據庫zabbix所有表進行所有操作的權限,并且設定密碼為zabbix
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';刷新配置
flush privileges;4.導入zabbix初始表
?進入目錄
cd /usr/share/doc/zabbix-server-mysql-3.4.15?解壓 create.sql.gz 文件,獲取sql文件
gunzip create.sql.gz?
導入表至zabbix數據庫,在當前目錄進入mysql,
> msyql > use zabbix > source create.sql5.修改zabbix 配置文件
進入zabbix配置文件所在目錄
cd /etc/zabbix修改配置文件 vi zabbix_server.conf
DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix DBSocket=/var/lib/mysql/mysql.sock?6.啟動zabbix服務端
systemctl start zabbix-server.service設置開機啟動
systemctl enable zabbix-server.service6.配置PHP
cd /etc/httpd/conf.d vi zabbix.conf?增加時區?
Alias /zabbix /usr/share/zabbix<Directory "/usr/share/zabbix">Options FollowSymLinksAllowOverride NoneRequire all granted<IfModule mod_php5.c>php_value max_execution_time 300php_value memory_limit 128Mphp_value post_max_size 16Mphp_value upload_max_filesize 2Mphp_value max_input_time 300php_value max_input_vars 10000php_value always_populate_raw_post_data -1# php_value date.timezone Europe/Rigaphp_value date.timezone Asia/Shanghai</IfModule> </Directory><Directory "/usr/share/zabbix/conf">Require all denied </Directory><Directory "/usr/share/zabbix/app">Require all denied </Directory><Directory "/usr/share/zabbix/include">Require all denied </Directory><Directory "/usr/share/zabbix/local">Require all denied </Directory>?重啟服務
Systemctl restart httpd?登錄Zabbix
鏈接:http://192.168.0.1/zabbix
?
填寫之前設置的賬號密碼?
?
填寫服務名稱,點擊next?
點擊 next?
?
安裝成功,點擊finish?
?
登錄賬號,密碼,賬號:Admin,密碼:zabbix,注意區分大小寫
設置中文
?
?啟動客戶端 agent
不啟動下面啟動監測,無法檢測到
啟動服務 systemctl start zabbix-agent.service 設置開機啟動 systemctl enable zabbix-agent.service添加監測主機?
提示如下即為成功
中文無法顯示解決方案:https://www.jianshu.com/p/abc495396c7d
總結
以上是生活随笔為你收集整理的Centos7 下 zabbix服务安装与部署,linux监控服务的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HUE 提交Schedule 时区问题
- 下一篇: 最新版 VMware 安装,虚拟机安装,