A: Installing the server zabbix
1. Deployment Readiness
Command: iptables -F # turn off the firewall
command: systemctl stop firewalld # turn off the firewall
Set resolution, self yum source
Command: cd /etc/yum.repos.d/
Command: curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo #zabbix source link
Command: curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
Command: rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm # installation package zabbix release
Command: yum clean all # cleaning software source
Command: yum makecache # yum clean up the source cache
2. Installation zabbix dependencies
Command: yum -y install zabbix-server-mysql # zabbix installed mysql server connection dependencies
Command: yum -y install zabbix-web-mysql # zabbix mounting web of dependencies is connected mysql
Command: yum -y install zabbix-agent # zabbix client installation dependencies
(Tips: Installation unsuccessful, multi-install several times, until it succeeds)
3. Install Start mariadb database
命令:yum install -y mariadb-server
Command: systemctl start mariadb.service
命令:systemctl enable mariadb.service
4. Create a database
Command: mysql -e 'create database zabbix character set utf8 collate utf8_bin;' # create zabbix library, you can enter Chinese
Command: mysql -e '. Grant all privileges on zabbix * to zabbix @ localhost identified by "zabbix";' # Create a user zabbix in the machine, the password is zabbix
5. Data Import
命令:zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pzabbix zabbix
6. Configure zabbixserver link mysql
Command: sed -i.ori '115a DBPassword = zabbix' /etc/zabbix/zabbix_server.conf # line 115 to mariadb password zabbix profile modify zabbix
7. Add time zone
Command: sed -i.ori '18a php_value date.timezone Asia / Shanghai' /etc/httpd/conf.d/zabbix.conf # zabbix time zone will modify services to Asia Shanghai, 18 lines in the configuration file
8. solve the Chinese garbled
Installation dependencies: wqy-microhei-fonts
命令:yum -y install wqy-microhei-fonts
Command: \ cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf # forcibly resolve Chinese garbled copy and modify configuration files
9. Start Services
Command: systemctl restart zabbix-server zabbix-agent httpd # restart the service
Command: systemctl enable zabbix-server zabbix-agent httpd # boot from Kai
10. The output
Command: echo "browser to visit http: //` hostname -I | awk '{print $ 1}' `/ zabbix"
Now the server has been configured, then configure the client
II: Installation zabbix server
1. Set resolved
Installation zabbix source
Command: cd /etc/yum.repos.d/
Command: rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
Followed by executing the following command
Command: yum clean all
Command: yum makecache
2. Install the client zabbix
命令:yum -y install zabbix-agent
Command: sed -i.ori 's # Server = 127.0.0.1 # Server = 192.168.100.210 #' /etc/zabbix/zabbix_agentd.conf # client profile to modify their native IP
3. Start Services
命令:systemctl start zabbix-agent.service
命令:systemctl enable zabbix-agent.service
Next, it is to enter the page zabbix
1.
2.
3.
4.
5.
6.
7.
8.
Installation is now complete zabbix
(Tips: Use Google browser can be translated into Simplified Chinese)
to sum up:. . . . . . . . . . (Omitted here a million words)