安装zabbix

2017-03-14  本文已影响0人  suenism

1操作系统 RHEL7.2

2 挂载操作系统镜像到mnt目录,配置本地源

3 下载php5.6.30和zabbix3.2

4 安装php

4.1 安装依赖包

yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y

./configure --prefix=/usr/local/php5.6.30 \

--with-config-file-path=/usr/local/php5.6.30/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=/usrlocal --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

4.2  make test

4.3 make install 

5 安装nginx

# ./configure --prefix=/usr/local/nginx-1.6.3 \

--with-http_ssl_module  --with-http_spdy_module  \

--with-http_stub_status_module   --with-pcre

5.1 make ; make install

5.2  启动、关闭、重置nginx

启动:直接执行以下命令,nginx就启动了,不需要改任何配置文件,nginx配置多域名虚拟主机请参考后续文章.

/usr/local/nginx-1.6.3/sbin/nginx

/usr/local/nginx-1.5.1/sbin/nginx

试试访问:我这边不贴图,直接使用curl命令来读取web信息

[root@ns conf]# curl -s http://localhost | grep nginx.com

nginx.com.

2[root@nsconf]# curl -s http://localhost | grep nginx.com

nginx.com.

关闭:

/usr/local/nginx-1.5.1/sbin/nginx -s stop

1

/usr/local/nginx-1.5.1/sbin/nginx-sstop

重置:当你有修改配置文件的时候,只需要reload以下即可

/usr/local/nginx-1.5.1/sbin/nginx -s reload

/usr/local/nginx-1.5.1/sbin/nginx-s reload

6 nginx + php配置

cp  php.ini-production  /usr/local/php-5.6.30/etc/php.ini

cp  /usr/local/php-5.6.30/etc/php-fpm.conf.default   /usr/local/php-5.6.30/etc/php-fpm.conf

启动 php-fpm

/usr/local/php-5.5.0/sbin/php-fpm

7 安装 zabbix

./configure --prefix=/usr/local/zabbix3.2 --enable-server --enable-agent --with-mysql=/opt/mysql-5.6.26-linux-glibc2.5-x86_64/bin/mysql_config  --with-net-snmp --with-libcurl --with-libxml2

上一篇下一篇

猜你喜欢

热点阅读