1.編譯安裝NGINX
ssh zabbix@192.168.8.143
cd /home/zabbix/softs/nginx-1.10.3
./configure --prefix=/home/zabbix/nginx-1.10.3
--pid-path=/tmp/nginx/nginx.pid
--with-http_ssl_module
--user=zabbix
--group=zabbix
--with-pcre
--with-stream
--with-stream_ssl_module
--without-mail_pop3_module
--without-mail_imap_module
--without-mail_smtp_module
--with-stream=dynamic
make
make install
ln -s /home/zabbix/nginx-1.10.3 /home/zabbix/nginx
/home/zabbix/nginx/sbin/nginx -s reload
curl http://localhost:8000/
2.編譯安裝PHP
su root
yum install epel-release
yum update
yum install -y libxml2 libxml2-devel php-bcmath php-mbstring php-net-socket php-gd php-xml php5-dom php-xmlwriter php-xmlreader php-ctype php-session php-gettext
yum install -y openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel php-ctype php-session php-gettext pcre pcre-devel
yum install php-xml perl-DBI php-bcmath php-mbstring
su zabbix
cd /home/zabbix/softs/php-7.1.3
./configure --with-oci8=shared,instantclient,/usr/lib/oracle/12.2/client64/lib
--prefix=/home/zabbix/php-7.1.3
--with-config-file-path=/home/zabbix/php-7.1.3/etc
--with-config-file-scan-dir=/home/zabbix/php-7.1.3/etc/php.d
--with-mcrypt=/usr/include
--enable-mysqlnd
--with-mysqli
--with-pdo-mysql
--enable-fpm
--with-fpm-user=zabbix
--with-fpm-group=zabbix
--with-gd
--with-iconv
--with-zlib
--enable-xml
--enable-shmop
--enable-sysvsem
--enable-inline-optimization
--enable-mbregex
--enable-mbstring
--enable-ftp
--enable-gd-native-ttf
--with-openssl
--enable-pcntl
--enable-sockets
--with-xmlrpc
--enable-zip
--enable-soap
--without-pear
--with-gettext
--enable-session
--with-curl
--with-jpeg-dir
--with-freetype-dir
--enable-opcache
--enable-bcmath
make
make install
ln -s /home/zabbix/php-7.1.3/etc /home/zabbix/php
cd /home/zabbix/php/etc
cp /home/zabbix/softs/php-7.1.3/php.ini* ./
cp php-fpm.conf.default php-fpm.conf
cp php-fpm.d/www.conf.default php-fpm.d/www.conf
cd /home/zabbix/php/bin
cp /home/zabbix/softs/php-7.1.3/sapi/fpm/init.d.php-fpm ./php-fpm
chmod +x php-fpm
./php-fpm start
3.配置Zabbix Web
3.1. 拷貝Zabbix前端檔案到NGINX目錄下並配置nginx.conf.
ssh zabbix@192.168.8.141
scp -r /home/zabbix/soft/zabbix-3.2.4/frontends/php 192.168.8.143:/home/zabbix/nginx/html/Zabbix
3.2. 頁面端配置
瀏覽器開啟Zabbix Web -> http://192.168.8.143:8000/Zab…