监控工具之zabbix server3.4 部署配置
?
[root@localhost src]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[root@localhost src]# pwd
/usr/local/src?
配置zabbix的yum源
??[root@localhost src]# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm?
安裝zabbix程序包,安裝mysql、zabbxi-agent
??[root@localhost src]# yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb-server
?? 這個(gè)時(shí)候有可能會(huì)報(bào)報(bào)錯(cuò):“zabbix-web-3.4.15-1.el7.noarch: [Errno 256] No more mirrors to try”
?? 解決辦法:更換yum源,具體步驟如下:
????? [root@localhost src]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo -P /etc/yum.repos.d/
?????? [root@localhost src]# yum clean all
?????? [root@localhost src]# yum makecache?
啟動(dòng)mariadb并設(shè)置開機(jī)啟動(dòng),創(chuàng)建數(shù)據(jù)庫(kù)實(shí)例,授權(quán)
???? [root@localhost src]# systemctl start mariadb
? ? ?[root@localhost src]# systemctl enable mariadb?
登陸mysql
??[root@localhost src]# mysql
Welcome to the MariaDB monitor.? Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.60-MariaDB MariaDB Server?
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.?
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.?
MariaDB [(none)]>?
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;? #創(chuàng)建數(shù)據(jù)庫(kù)實(shí)例?
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@'%' identified by 'zabbix';? #授權(quán)所有主機(jī)訪問(wèn)數(shù)據(jù)庫(kù)實(shí)例zabbix,用戶名/密碼:zabbix/Zabbix?
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?
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
?
導(dǎo)入初始模式和數(shù)據(jù)
?? 進(jìn)入create.sql.gz所在目錄: ?
[root@localhost src]# cd /usr/share/doc/zabbix-server-mysql-3.4.15/?
導(dǎo)入初始模式:
??[root@localhost zabbix-server-mysql-3.4.15]# zcat create.sql.gz |mysql -uroot zabbix?
啟動(dòng)zabbix-server服務(wù)
?? 配置zabbix-server的配置文件zabbix_server.conf:
????? ?[root@localhost zabbix-server-mysql-3.4.15]# grep -n "^DB" /etc/zabbix/zabbix_server.conf
91:DBHost=localhost
98:DBName=zabbix
113:DBUser=zabbix
122:DBPassword=zabbix?
?? 啟動(dòng)zabbix-server服務(wù):
????? [root@localhost zabbix-server-mysql-3.4.15]# systemctl start zabbix-server
[root@localhost zabbix-server-mysql-3.4.15]# systemctl enable zabbix-server
?
編輯Apache的配置文件,消注釋設(shè)置正確的時(shí)區(qū)?
?? [root@localhost zabbix-server-mysql-3.4.15]# grep -n "date.timezone" /etc/httpd/conf.d/zabbix.conf
20:??????? php_value date.timezone Asia/Shanghai?
啟動(dòng)httpd服務(wù) ,設(shè)置開機(jī)啟動(dòng)httpd服務(wù)
[root@localhost zabbix-server-mysql-3.4.15]# systemctl start httpd
[root@localhost zabbix-server-mysql-3.4.15]# systemctl enable httpd?
啟動(dòng)zabbix-agent并設(shè)置開機(jī)自啟動(dòng)
?? [root@localhost zabbix-server-mysql-3.4.15]#? systemctl start zabbix-agent
[root@localhost zabbix-server-mysql-3.4.15]# systemctl enable zabbix-agent?
?
Zabbix Web網(wǎng)頁(yè)安裝
??在瀏覽器輸入地址http://服務(wù)器ip/zabbix/setup.php,出現(xiàn)歡迎界面,點(diǎn)擊下一步??
出現(xiàn)必要條件檢測(cè)界面,正常都是OK,點(diǎn)擊下一步???
配置DB連接,與zabbix_server.conf文件中主機(jī)、數(shù)據(jù)庫(kù)名稱、用戶名、密碼保持一致,點(diǎn)擊下一步???
zabbix服務(wù)器詳細(xì)信息,點(diǎn)擊下一步??
安裝前匯總,檢查信息無(wú)誤,點(diǎn)擊下一步安裝??
安裝成功會(huì)出現(xiàn)提示成功的界面。????
然后點(diǎn)擊“Finish“按鈕。結(jié)束安裝。
?
zabbix網(wǎng)頁(yè)登錄
在瀏覽器輸入http://zabbix服務(wù)器ip/zabbix/index.php,輸入管理員用戶名Admin(區(qū)分大小寫),默認(rèn)密碼zabbix,點(diǎn)擊登入即可。?
接下來(lái)就是開啟各種監(jiān)控配置研究了!!!
轉(zhuǎn)載于:https://www.cnblogs.com/renyongbin/p/10208270.html
總結(jié)
以上是生活随笔為你收集整理的监控工具之zabbix server3.4 部署配置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 古文诗词赋
- 下一篇: python判断字母数字_Python判