1. Download the zabbix installation package
rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
2. Install mysql, download fails, try a few more times
yum install -y zabbix-server-mysql zabbix-web-mysql
3. Install the zabbix client
yum install zabbix-agent
4. Create and initialize the database
shell> service mysqld start
shell> /usr/bin/mysqladmin -u root password '123456'
shell> cd /usr/share/doc/zabbix-server-mysql-2.4.8/create
mysql -uroot -p123456
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '123456';
mysql> quit;
shell> mysql -uzabbix -p123456 zabbix < schema.sql
# stop here if you are creating database for Zabbix proxy
shell> mysql -uzabbix -p123456 zabbix < images.sql
shell> mysql -uzabbix -p123456 zabbix < data.sql
5. Configure zabbix
vi /etc/zabbix/zabbix_server.conf
The configuration items are as follows:
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=123456
[As shown below]
6. Start the zabbix service
service zabbix-server start
7. Modify php configuration
vim /etc/httpd/conf.d/zabbix.conf
[Modified items are as follows]
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 date.timezone Asia/Shanghai
# php_value date.timezone Europe/Riga
[Remove time zone comment, change to Shanghai time zone]
8. Restart httpd service
service httpd restart
9. Visit the zabbix configuration page
http://100.100.100.22/zabbix/
10. Next
11. Confirm all OK status, the next step
11. Configure database connection information
12. Zabbix service host, port and name configuration
13. Next
14. Next step (the configuration file is created successfully: /etc/zabbix/web/zabbix.conf.php)
15. Configuration is complete
16.登录zabbix(Admin/zabbix)
16. Successful login
17. Modify to display in Chinese
18. Install the Zabbix client
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/6/x86_64/zabbix-release-4.4-1.el6.noarch.rpm
yum clean all
yum install zabbix-agent
service zabbix-agent start
chkconfig --level 35 zabbix-agent on
19. Client settings
#服务器端地址
sed -i "s/Server=127.0.0.1/Server=100.100.100.22/" /etc/zabbix/zabbix_agentd.conf
#hostname地址,一般设置为本地ip
sed -i "s/Hostname=Zabbix server/Hostname=100.100.100.22/" /etc/zabbix/zabbix_agentd.conf
#重启服务
service zabbix-agent restart
20. Create a host (the server is the client)
【Add template】
21. Add an information client (install the agent in advance and configure the agent configuration file)
22. Finish