您好,登錄后才能下訂單哦!
#systemctl stop firewalld
#vim /etc/selinux/config
SELINUX=permissive
#setenforce 0
rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
# yum install -y zabbix-server-mysql zabbix-web-mysql
# yum install zabbix-proxy-mysql -y
安裝zabbix-agent客戶端
# yum install zabbix-agent -y
設置開機自啟動
# systemctl start zabbix-agent
# chkconfig zabbix-agent on
# rpm -U vh http://repo.mysql.com/yum/mysql-5.6-community/el/6/x86_64/mysql-community-release-el6-5.noarch.rpm
# yum install -y mysql-community-server
# systemctl start mysqld
# chkconfig mysqld on
# mysql_secure_installation
# mysql -uroot -p
創建一個zabbix庫并設置為utf8的字符編碼格式
mysql> create database zabbix character set utf8 collate utf8_bin;
創建賬戶并且授權設置密碼
mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix';
刷新
mysql> flush privileges;
# zcat /usr/share/doc/zabbix-server-mysql-4.2.0/create.sql.gz | mysql zabbix -uzabbix -pzabbix
# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
# vim /etc/php.ini
在最后一行添加一下內容
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
安裝ntp服務
# yum install ntpdate -y
調整為亞洲上海時區
# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
同步時間服務器
# ntpdate us.pool.ntp.org
# date
# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
啟動apache
# systemctl start httpd
# systemctl enable httpd
# systemctl status httpd
啟動zabbix-server服務并設置為開機啟動
# systemctl start zabbix-server
# systemctl enable zabbix-server
查看zabbix-server日志
# vim /var/log/zabbix/zabbix_server.log
18050:20190827:135341.502 Starting Zabbix Server. Zabbix 4.2.5 (revision 2c0e4d1d39).
18050:20190827:135341.503 ****** Enabled features ******
18050:20190827:135341.503 SNMP monitoring: YES
18050:20190827:135341.503 IPMI monitoring: YES
18050:20190827:135341.503 Web monitoring: YES
18050:20190827:135341.503 VMware monitoring: YES
18050:20190827:135341.503 SMTP authentication: YES
18050:20190827:135341.503 Jabber notifications: NO
18050:20190827:135341.503 Ez Texting notifications: YES
18050:20190827:135341.503 ODBC: YES
18050:20190827:135341.503 SSH2 support: YES
18050:20190827:135341.503 IPv6 support: YES
18050:20190827:135341.503 TLS support: YES
18050:20190827:135341.503 ******************************
18050:20190827:135341.503 using configuration file: /etc/zabbix/zabbix_server.conf
http://本機IP/zabbix![在這里插入圖片描述](https://img-blog.csdnimg.cn/2019082715465132.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NTQ1MjY0Mg==,size_16,color_FFFFFF,t_70)
希望可×××學習。蟹蟹
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。