您好,登錄后才能下訂單哦!
本文將為大家詳細(xì)介紹安裝部署zabbix監(jiān)控系統(tǒng)的教程,內(nèi)容詳細(xì)步驟清晰,細(xì)節(jié)處理妥當(dāng),希望大家通過這篇文章有所收獲,我們先來看看配置步驟:
1. 修改主機名
vim /etc/hostname ,修改為zabbix-server
2. 網(wǎng)卡配置
vim /etc/sysconfig/network-scripts/ifcfg-eno16780032
3. 關(guān)閉防火墻和selinux
systemctl stop firewalld.service
systemctl disable firewalld.service
4. 關(guān)閉selinux
vim /etc/selinux/config,修改為:SELINUX=disabled
5. 初始化系統(tǒng)(內(nèi)核優(yōu)化等,非必選)
6. 配置yum源
rpm -Uvh https://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
yum clean all
yum makecache
7. 安裝zabbix服務(wù)端
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
8. 啟動zabbix-server zabbix-agent httpd
systemctl restart zabbix-server zabbix-agent httpd
systemctl enable zabbix-server zabbix-agent httpd
9. 下載數(shù)據(jù)庫服務(wù)端和客戶端
wget https://cdn.mysql.com/archives/mysql-5.6/MySQL-server-5.6.43-1.el7.x86_64.rpm
wget https://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-client-5.6.43-1.el7.x86_64.rpm
10. 數(shù)據(jù)庫服務(wù)端和客戶端安裝
rpm -ivh MySQL-server-5.6.43-1.el7.x86_64.rpm --force -nodeps
rpm -ivh MySQL-client-5.6.43-1.el7.x86_64.rpm --force --nodeps
11. 創(chuàng)建相關(guān)目錄及目錄授權(quán)
mkdir -p /data/mysql/
chown -R mysql.mysql /data/mysql/
12. 修改數(shù)據(jù)庫配置文件
vim /etc/my.cnf
[client]
port = 3306
socket = /data/mysql/mysql.sock
[mysqld]
user = mysql
port = 3306
character-set-server = utf8
default-storage-engine = InnoDB
socket = /data/mysql/mysql.sock
pid-file = /data/mysql/mysql.pid
# DATA STORAGE #
datadir = /data/mysql/
innodb_data_file_path = ibdata1:1024M:autoextend
innodb_data_home_dir = /data/mysql/
innodb_log_group_home_dir = /data/mysql/
# LOGGING #
log-error = /data/mysql/mysql-error.log
log-queries-not-using-indexes = 0
slow-query-log = 1
long_query_time = 2
slow-query-log-file = /data/mysql/mysql-slow.log
lower_case_table_names = 1
skip-grant-tables
13.初始化數(shù)據(jù)庫
/usr/bin/mysql_install_db --user=mysql --datadir=/data/mysql --pid-file=/data/mysql/mysql.pid
14. 啟動數(shù)據(jù)庫及設(shè)置root密碼
/etc/init.d/mysql restart
mysqladmin -h 127.0.0.1 -uroot -p password
15. 登錄數(shù)據(jù)庫,mysql -uroot -p
16. 創(chuàng)建zabbix數(shù)據(jù)庫 zabbix數(shù)據(jù)庫的密碼為zabbix
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'
17. 導(dǎo)入數(shù)據(jù)庫
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
18. 編輯Zabbix前端PHP配置,主要是更改時區(qū)
vim /etc/httpd/conf.d/zabbix.conf
修改此行:php_value date.timezone Asia/Shanghai
systemctl restart httpd
19. 瀏覽器訪問并配置
http://192.168.8.133/zabbix/
20. 修改為中文界面
在Adminstration-->Users下面找到對應(yīng)的用戶,點進去,找到Language,選擇Chinese(zh_CN),更新后,刷新頁面即可切換為中文界面。
21. zabbix客戶端安裝配置
centos7:
rpm -Uvh https://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
yum -y install zabbix-agent
systemctl enable zabbix-agent
sed -i 's/Server=127.0.0.1/Server=192.168.8.133/' /etc/zabbix/zabbix_agentd.conf
sed -i 's/ServerActive=127.0.0.1/ServerActive==192.168.8.133/' /etc/zabbix/zabbix_agentd.conf
echo "192.168.8.133 Zabbix server" >> /etc/hosts
systemctl restart zabbix-agent
centos6:
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/6/x86_64/zabbix-release-3.4-1.el6.noarch.rpm
yum install zabbix-agent
chkconfig zabbix-agent on
sed -i 's/Server=127.0.0.1/Server=192.168.8.133/' /etc/zabbix/zabbix_agentd.conf
sed -i 's/ServerActive=127.0.0.1/ServerActive==192.168.8.133/' /etc/zabbix/zabbix_agentd.conf
echo "192.168.8.133 Zabbix server" >> /etc/hosts
service zabbix-agent start
配置zabbix-server服務(wù)器的hosts
vim /etc/hosts
包含服務(wù)端和所有客戶端的主機
根據(jù)監(jiān)控需要完成監(jiān)控項目的配置
看完這篇文章,你們學(xué)會安裝部署zabbix監(jiān)控系統(tǒng)了嗎?如果還想學(xué)到更多技能或想了解更多相關(guān)內(nèi)容,歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。