日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > centos >内容正文

centos

Centos7安装部署Zabbix3.4

發(fā)布時(shí)間:2023/12/10 centos 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Centos7安装部署Zabbix3.4 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1.關(guān)閉selinux和firewall

1.1檢測(cè)selinux是否關(guān)閉

[root@localhost ~]# getenforce??
Disabled???????????????????????????????????? #Disabled?為關(guān)閉

1.1.1臨時(shí)關(guān)閉
[root@localhost ~]# setenforce 0? #設(shè)置SELinux 成為enforcing模式

1.1.2永久關(guān)閉

[root@localhost ~]# vi /etc/selinux/config:???
將SELINUX=enforcing改為SELINUX=disabled?
設(shè)置后需要重啟才能生效

1.2查看默認(rèn)防火墻狀態(tài)

[root@localhost ~]# firewall-cmd --state?
not running?????????? #關(guān)閉后顯示not running,開啟后顯示running

1.2.1停止firewall

[root@localhost ~]# systemctl stop firewalld.service

1.2.2禁止firewall開機(jī)啟動(dòng)
[root@localhost ~]# systemctl disable firewalld.service

?

2.Zabbix3.4程序安裝

2.1配置zabbix的yum源

[root@localhost ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

2.2安裝zabbix程序包,安裝mysql、zabbxi-agent

[root@localhost ~]# yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb-server

2.3啟動(dòng)mariadb并設(shè)置開機(jī)啟動(dòng),創(chuàng)建數(shù)據(jù)庫(kù)實(shí)例,授權(quán)

[root@localhost ~]# systemctl start mariadb???? ?#啟動(dòng)mariadb
[root@localhost ~]# systemctl enable mariadb? #設(shè)置開機(jī)啟動(dòng)
[root@localhost ~]# mysql????????????? ????????????? ?#登入數(shù)據(jù)庫(kù)
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;?? #創(chuàng)建數(shù)據(jù)庫(kù)實(shí)例
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@'%' identified by 'zabbix'; ? #授權(quán)所有主機(jī)訪問(wèn)數(shù)據(jù)庫(kù)實(shí)例zabbix,用戶名/密碼:zabbix/zabbix

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; ??#授權(quán)l(xiāng)ocalhost主機(jī)名訪問(wèn)數(shù)據(jù)庫(kù)實(shí)例zabbix,用戶名/密碼:zabbix/zabbix

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost.localdomain identified by 'zabbix'; ?#授權(quán)l(xiāng)ocalhost.localdomain主機(jī)訪問(wèn)數(shù)據(jù)庫(kù)實(shí)例zabbix,用戶名/密碼:zabbix/zabbix

Query OK, 0 rows affected (0.00 sec)

導(dǎo)入初始模式和數(shù)據(jù)

[root@localhost ~]# cd /usr/share/doc/zabbix-server-mysql-3.4.4/ ? ? ? ? ? ? ?#進(jìn)入create.sql.gz所在目錄

[root@localhost zabbix-server-mysql-3.4.4]# zcat create.sql.gz |mysql -uroot zabbix ? ?#導(dǎo)入出事模式

?2.4啟動(dòng)zabbix-server服務(wù)

2.4.1配置zabbix-server的配置文件zabbix_server.conf

[root@localhost zabbix-server-mysql-3.4.4]# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost ? ? ? ? ?# 數(shù)據(jù)主機(jī)名
DBName=zabbix ? ? ? ? ? ?# 數(shù)據(jù)庫(kù)實(shí)例
DBUser=zabbix ? ? ? ? ? ? ?# 用戶名
DBPassword=zabbix ? ? ?# 密碼

2.4.2啟動(dòng)zabbix-server服務(wù)

[root@localhost zabbix-server-mysql-3.4.4]# systemctl start zabbix-server ? ? ? ? ? #啟動(dòng)zabbix-server服務(wù)
[root@localhost zabbix-server-mysql-3.4.4]# systemctl enable zabbix-server ? ? ? #設(shè)置zabbix-server服務(wù)開機(jī)自啟動(dòng)

無(wú)法啟動(dòng)
# systemctl start zabbix-server
Job for zabbix-server.service failed. See 'systemctl status zabbix-server.service' and 'journalctl -xn' for details.

解決方法:先檢查selinux是否關(guān)閉,關(guān)閉后,并安裝trousers軟件。再次啟動(dòng)zabbix-server服務(wù)便可以啟動(dòng)成功。
# yum install trousers -y
# systemctl start zabbix-server

2.5編輯Apache的配置文件,消注釋設(shè)置正確的時(shí)區(qū)

[root@localhost zabbix-server-mysql-3.4.4]#?vi /etc/httpd/conf.d/zabbix.conf
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
php_value date.timezone Asia/Shanghai
啟動(dòng)httpd服務(wù) ,設(shè)置開機(jī)啟動(dòng)httpd服務(wù)

[root@localhost ~]# systemctl start httpd ? ? ? ?#啟動(dòng)httpd服務(wù)?
[root@localhost ~]# systemctl enable httpd ? ?#設(shè)置開機(jī)啟動(dòng)httpd服務(wù)

3.啟動(dòng)zabbix-agent并設(shè)置開機(jī)自啟動(dòng)
[root@localhost ~]# systemctl start zabbix-agent ? ? ? ? ?# 啟動(dòng)zabbix-agent服務(wù)
[root@localhost ~]# systemctl enable zabbix-agent ? ? ? # 設(shè)置zabbix-agent服務(wù)開機(jī)自啟動(dòng)

4.Zabbix Web網(wǎng)頁(yè)安裝

4.1.在瀏覽器輸入地址http://服務(wù)器ip/zabbix/setup.php,出現(xiàn)歡迎界面,點(diǎn)擊下一步;

4.2.出現(xiàn)必要條件檢測(cè)界面,正常都是OK,點(diǎn)擊下一步

4.3.配置DB連接,與zabbix_server.conf文件中主機(jī)、數(shù)據(jù)庫(kù)名稱、用戶名、密碼保持一致,點(diǎn)擊下一步

4.4.zabbix服務(wù)器詳細(xì)信息,點(diǎn)擊下一步

4.5.安裝前匯總,檢查信息無(wú)誤,點(diǎn)擊下一步安裝

4.6.安裝成功
Congratulations! You have successfully installed Zabbix frontend.
配置文件目錄
Configuration file "/etc/zabbix/web/zabbix.conf.php" created.

5zabbix網(wǎng)頁(yè)登錄

在瀏覽器輸入http://zabbix服務(wù)器ip/zabbix/index.php,輸入管理員用戶名Admin(區(qū)分大小寫),默認(rèn)密碼zabbix,點(diǎn)擊登入即可。

?

轉(zhuǎn)載于:https://www.cnblogs.com/shawhe/p/9598354.html

總結(jié)

以上是生活随笔為你收集整理的Centos7安装部署Zabbix3.4的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。