1.php版本为5.5.37 mysql版本为5.5 nginx使用的是tengine2.2.1
2.系统为centos 7.2 最小化安装
3.使用阿里云的epel扩展源
4.首先安装依赖
yum install -y gcc libxml2-devel.x86_64 bzip2-devel.x86_64 libcurl-devel.x86_64 libjpeg-turbo-devel.x86_64 freetype-devel.x86_64 net-snmp-devel.x86_64 openssl-devel pcre-devel libpng-devel.x86_64
5.其次,开始编译php
./configure --prefix=/usr/local/php
--with-config-file-path=/usr/local/php/etc --with-bz2 --with-curl
--enable-ftp --enable-sockets --disable-ipv6 --with-gd
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local
--with-freetype-dir=/usr/local --enable-gd-native-ttf
--with-iconv-dir=/usr/local --enable-mbstring --enable-calendar
--with-gettext --with-libxml-dir=/usr/local --with-zlib
--with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd
--enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmath
make make install
6.开始编译nginx
./configure --prefix=/usr/local/nginx
--with-http_ssl_module
--with-http_stub_status_module --with-pcre
make make install
关于mysql的安装,可以直接yum install mariadb-libs.x86_64 mariadb.x86_64 mariadb-devel.x86_64 mariadb-server.x86_64
7,初始化zabbix的数据库
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 -uzabbix -pzabbix zabbix < schema.sql
mysql -uzabbix -pzabbix zabbix < images.sql
mysql -uzabbix -pzabbix zabbix < data.sql
8.安装zabbix的server端和agent端
./configure --prefix=/usr/local/zabbix/ --enable-server
--enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2
make make install
注意php.ini里的mysqli的mysql.sock的路径设置,端口设置
注意zabbix_server.conf文件里的mysql.sock路径设置