1. Install dependent packages
Yum-y Install httpd php php-fpm php-cli php-common php-gd php-mbstring php-mcrypt php-mysql php-pdo php-devel Php-imagick Php-xmlrpc php-xml php-bcmath php-dbaphp-enchant php-yaf mysql mysql-server mysql-libsmysql-devel Curl curl-devel NET-SN MP Net-snmp-devel Libssh2-devel openipmi-devel gcc gcc-c++ glibc
2. Download the source package
Http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz/download
3, unzip the source package and add the relevant users
TAR-ZXVF Zabbix-2.4.5.tar.gzuseradd zabbix-s/sbin/nologin-m
4. Create DATABASE and database users
Mysql>create DATABASE Zabbix CHARACTER SET UTF8 COLLATE utf8_bin; #创建Zabbix数据库mysql > GRANT all on zabbix.* to username @ '% ' identified by ' password '; #创建用户并赋予权限mysql > FLUSH privileges; #刷新授权表
5. Import Zabbix Database data sequentially
Mysql-u<username>-p<password> Zabbix </zabbix-2.4.5/database/mysql/schema.sql mysql-u<username >-p<password> Zabbix </zabbix-2.4.5/database/mysql/images.sql mysql-u<username>-p<password > Zabbix </zabbix-2.4.5/database/mysql/data.sql# Note: If you only create a database for proxy, import only Schema.sql
6. Compile and install Zabbix
./configure--prefix=/usr/local/zabbix2--enable-server--enable-agent--with-mysql--enable-ipv6--WITH-NET-SNMP-- With-libcurl--with-ssh2 #同时安装server和agent组件 and import the data into the database./configure--prefix=/usr/local/zabbix2--enable-server-- With-mysql--WITH-NET-SNMP--with-libcurl #仅安装 The server component and imports the data into the database./configure--prefix=/usr/local/zabbix2-- Enable-proxy--with-net-snmp--with-mysql--with-ssh2 #仅安装 Proxy component and import the data into the database./configure--enable-agent #仅安装 Agent Component make && make install #开始安装
7. Copy the Zabbix Web code to the Web directory
CD/ZABBIX-2.4.5/FRONTENDS/PHPMV */var/www/htmlchown-r apache:apache/var/www/html/
Source Installation Zabbix 2.4.5