Php asked to be 5.4 and above (centos 7 default 5.4.16 can )
# Dependent libraries yum -y install gcc curl curl-devel net-snmp net-snmp-devel perl-DBI mariadb mariadb-server mariadb-client mariadb-devel libevent-devel http httpd-devel httpd-client httpd-server php php-mysql php-devel php-client php-fpm php-bcmath php-mbstring php-gd php-xmlwriter php-xmlreader php-ldap ; useradd -s /sbin/nologin zabbix;systemctl start httpd # Create a user zabbix not supported by default root user |
[root @ node3 zabbix-4.2.6] # create user zabbix not supported by default root user
[root@node3 zabbix-4.2.6]
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl |
( Url for alarm mail call with the url )
make;make install; cp zabbix-4.2.6/frontends/php/* /var/www/html/ -a |
# Modify the delay request sed -i '672c post_max_size = 24M' /etc/php.ini # Modify the execution time sed -i '384c max_execution_time = 300' /etc/php.ini # Modify the maximum write time sed -i '394c max_input_time = 300' /etc/php.ini # Modify time zone configuration sed -i '878c date.timezone = PRC' /etc/php.ini systemctl restart httpd |
systemctl start mariadb mysql << EOF create database zabbix charset=utf8; grant all privileges on zabbix.* to 'zabbix'@'%' identified by '123456789'; flush privileges; exit EOF mysql zabbix </root/zabbix-4.2.6/database/mysql/schema.sql mysql zabbix </root/zabbix-4.2.6/database/mysql/images.sql mysql zabbix </root/zabbix-4.2.6/database/mysql/data.sql #如果不导入这三个数据会出现如下报错 |
报错没有文件,下载下来即可(或者给与目标文件写权限)
cd /root/zabbix-4.2.6/misc/init.d/tru64; cp * /etc/init.d/ /etc/init.d/zabbix_server |
到这里zabbix的安装已经完成了,