yum install zabbix,ngixn,mysql, source code installation php, does not have any special effect, but zabbix source code installation failed. . .
1. Install zabbix’s repo
2.yum installation
3.yum install mariadb mariadb-server
4. Create library zabbix, Empower zabbix users
5. Import the library of the zabbix file into mysql
6. Modify the zabbix_server.conf configuration file
7. Start booting self-starting zabbix_server.service
8.yum install nginx
9. Modify nginx.conf configuration file , check with nginx -t, if the code is not Question , check whether port 80 is occupied
10. Start booting self-starting nginx.service
11. Give /etc/zabbix/web owner and group nginx
11.. Check zabbix port ,php-fpm service
12. Page access :http://IP/index.php
13. Page installation zabbix
14. There are a few points worth noting above !!!
== ==== recommend mysql5.7 version , do not use mysql8.0, nothing else , I can’t control it with my level
======Before the installation of the php source code, it was also written , I won’t repeat it here, Just be careful ,
====== Both compilation and installation and yum installation have been done. Generally, there will be two configuration files , Need to see which one the program is running
15. Installation code
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7 /x86_64/zabbix-release-3.2-1.el7.noarch.rpm
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-agent
yum -y install mariadb mariadb-server
vim /etc/my.cnf
skip-grant-tables
wq
systemctl restart mariadb.service
systemctl enable mariadb.service
mysql_secure_installation
mysql -uroot -plixiang45.bbyA!
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.to zabbix@'localhost' identified by 'lixiang45.bbyA!';
grant all privileges on zabbix. to zabbix@'%' identified by 'lixiang45.bbyA!';
grant all privileges on zabbix .* to zabbix@'127.0.0.1' identified by 'lixiang45.bbyA!''
flush privileges;
cd /usr/share/doc/zabbix-server-mysql-3.2.11/
zcat create.sql.gz | mysql -uzabbix -plixiang45.bbyA! zabbix
vim /etc/zabbix/zabbix_server.conf
DBHost=10.18.42.163
DBName=zabbix
DBUser=zabbix
DBUser=zabbix
p>
DBPassword=password
wq
systemctl restart zabbix-server.service
systemctl enable zabbix-server.service
vim /etc/nginx/nginx.conf
location / {
root /usr/share/zabbix;
}
location ~ “\.php$” {
fastcgi_pass 10.18.42.163:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share /zabbix/$ fastcgi_script_name;
include fastcgi_params;
}
wq
nginx -t
systemctl status httpd
systemctl stop httpd
systemctl disable httpd
systemctl start nginx
systemctl enable nginx
lsof -i:9000
systemctl status zabbix-server.service
ll /etc/zabbix/web/
chown -R nginx.nginx /etc/zabbix /web
vim /etc/php.ini
systemctl restart php-fpm.service
vim /usr/local/php/lib/php.ini
systemctl restart php-fpm.service
systemctl status zabbix-server.service