Reference URL:
https://www.zabbix.com/documentation/3.4/manual/installation/install
http://blog.csdn.net/mr_rsq/article/details/78457587
http://www.21yunwei.com/archives/5941
http://blog.csdn.net/yu757371316/article/details/55271762
http://blog.51cto.com/cesar/1631313
https://www.5ibc.net/centos/2572.html
download link:
https://excellmedia.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.4.7/zabbix-3.4.7.tar.gz
$ tar -zxvf zabbix-3.4.7.tar.gz
groupadd zabbix useradd -g zabbix zabbix
#The following error messages may appear, it is recommended to install all of them directly
yum install gcc* mysql-devel libxml2-devel net-snmp* java* curl-devel -y
yum install libevent-devel -y
yum install unixODBC-devel mysql-devel net-snmp-devel libxml2-devel libcurl-devel libevent-devel
yum install mariadb-devel
yum install -y php-mysql.x86_64 php-devel
yum install php-bcmath
configure: error: Not found mysqlclient library #yum -y install mysql-devel
configure: error: LIBXML2 library not found #yum -y install libxml2-devel
configure: error: unixODBC library not found # yum -y install unixODBC-devel
configure: error: Invalid Net-SNMP directory - unable to find net-snmp-config #yum -y install net-snmp-devel
configure: error: Invalid OPENIPMI directory - unable to find ipmiif.h #yum -y install OpenIPMI-devel
configure: error: Curl library not found #yum -y install curl-devel
$ cd zabbix-3.4.7
./configure --enable-server --enable-agent --with-mysql=/usr/bin/mysql_config --enable-ipv6 --enable-java --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc --with-ssh2 --with-openipmi --with-openssl --prefix=/usr/local/zabbix
make install
3 Create Zabbix database
shell> mysql -uroot -p<password> mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>'; mysql> quit;
mysql -uroot -pbimd zabbix3 < /data/local/zabbix-3.4.7/database/mysql/schema.sql
mysql -uroot -pbimd zabbix3 < /data/local/zabbix-3.4.7/database/mysql/images.sqlmysql -uroot -pbimd zabbix3 < /data/local/zabbix-3.4.7/database/mysql/data.sql
Modify the configuration file zabbix_server.conf
#vi /usr/local/zabbix/etc/zabbix_server.conf
DBHost=localhostDBName=zabbix
DBUser=zabbix
DBPassword=zabbix888
Add Zabbix server and Zabbix agent startup scripts
cp /data/local/zabbix-3.4.7/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_server
cp /data/local/zabbix-3.4.7/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/zabbix_agentd
$ vi /etc/init.d/zabbix_server
$ vi /etc/init.d/zabbix_agentd
修改BASEDIR=/usr/local/zabbix
Install apache, php
https://www.cnblogs.com/zakun/p/5840073.html
2 Installing Zabbix web interface
vi /etc/httpd/conf/httpd.conf #Modify the port to 8889
cp -rf /data/local/zabbix-3.4.7/frontends/php /var/www/html/zabbix
cp -rf /data/local/zabbix-3.4.7/frontends/php /var/www/html/zabbix3
systemctl start httpd.service
Start all services, and set the boot to start automatically
#启动Apache服务
service httpd start
#启用mysql服务
service mysqld start
/etc/init.d/zabbix_server start
/etc/init.d/zabbix_agentd start
#设置开机自启
chkconfig httpd on
chkconfig mysqld on
chkconfig --add /etc/init.d/zabbix_server
chkconfig --add /etc/init.d/zabbix_agentd
chkconfig zabbix_server on
chkconfig zabbix_agentd on
#查看端口号80、3306、10050(zabbix_agentd)、10051(zabbix_server)是否监听
ss -tnul
systemctl status zabbix_server #Start zabbix-server service
systemctl status zabbix_agentd #Start zabbix-agent service
http://blog.csdn.net/slovyz/article/details/50349396
6. Start zabbix_agent
#/usr/local/zabbix/sbin/zabbix_agentd
Check if it starts:
#netstat -tnlp | grep 'zabbix'
install web
http://www.book.com:8889/zabbix
http://www.book.com:8880/zabbix3