大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
本文安装环境:
创新互联专注为客户提供全方位的互联网综合服务,包含不限于成都网站建设、成都做网站、饶阳网络推广、微信小程序开发、饶阳网络营销、饶阳企业策划、饶阳品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;创新互联为所有大学生创业者提供饶阳建站搭建服务,24小时服务热线:028-86922220,官方网址:www.cdcxhl.com
a、Redhat 6.6
b、php-5.6.29
c、nginx-1.11.8
d、zabbix-3.2.3
e、使用系统镜像盘配置本地yum源安装依赖包
1、安装依赖包
yum install gcc-c++ MySQL-develyum install libxml2-develyum install libjpeg-develyum install libpng-develyum install freetype-devel
2、下载php源码包
wget http://cn2.php.net/distributions/php-5.6.29.tar.gz
3、安装php
tar zxvf php-5.6.29.tar.gz
cd php-5.6.29
./configure --prefix=/usr/local/php --enable-fpm --enable-bcmath --enable-mbstring --enable-sockets --with-gd --with-mysql --with-mysqli --with-gettext --with-png-dir --with-jpeg-dir --with-freetype-dir
make -j 4
make install
4、配置php
cp /data/source/php-5.6.29/php.ini-development /usr/local/php/lib/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
修改php.ini配置文件
max_execution_time = 300
max_input_time= 300
date.timezone = Asia/Shanghai
post_max_size= 16M
always_populate_raw_post_data = -1
5、启动php-fpm
/usr/local/php/sbin/php-fpm
netstat-ntlp|grep 9000
tcp0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 2302/php-fpm
至此zabbix所需PHP环境配置完成
1、下载nginx和pcre源码安装包
wget http://nginx.org/download/nginx-1.11.8.tar.gz
wgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
2、安装依赖pcre
./configure --prefix=/usr/local/pcre
make -j 4
make install
3、安装nginx
./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.38
make -j 4
make install
4、配置zabbix web
cat /usr/local/nginx/conf/zabbix.conf
server { listen80; server_name192.168.62.200 zabbix.kbsonlong.com; root/data/www/zabbix; index index.html index.htm index.php; location~ .*\.(php|php5)?$ { fastcgi_pass127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } access_log logs/zabbix.log; }
1、安装依赖包
yum install gcc-c++ mysql-devel libxml2-devel curl-devel net-snmp-devel
2、安装zabbix server
groupadd -g 1000 zabbix
useradd-M -g zabbix -u 1000 -s /sbin/nologin zabbix
tar zxvf zabbix-3.2.3.tar.gz
cd zabbix-3.2.3
./configure --prefix=/usr/local/zabbix --enable-server --with-mysql --with-net-snmp --with-libcurl --with-libxml2
make install
3、数据库权限配置
mysql -uroot -pkbsonlong -h 192.168.62.200 -e "create database zabbix character set utf8;"
mysql-uroot -pkbsonlong -h 192.168.62.200 -e "grant all on zabbix.* to zabbix@192.168.62.200 identified by 'zabbix';"
4、初始化数据库
cd /data/source/zabbix-3.2.3
mysql-uzabbix -p'zabbix' -h 192.168.62.200 zabbix < database/mysql/schema.sql
mysql-uzabbix -p'zabbix' -h 192.168.62.200 zabbix < database/mysql/images.sql
mysql-uzabbix -p'zabbix' -h 192.168.62.200 zabbix < database/mysql/data.sql
5、配置服务端口
cat >> /etc/services <
6、将zabbix web代码拷贝到nginx配置中的/data/www/zabbix 目录
cd /data/source/zabbix-3.2.3
cp frontends/php/ /data/www/zabbix –r
cp misc/init.d/fedora/core/zabbix_server /etc/init.d/
sed -i 's#BASEDIR=/usr/local#BASEDIR=/usr/local/zabbix#g' /etc/init.d/zabbix_server
7、修改zabbix_server配置
# cat /usr/local/zabbix/etc/zabbix_server.conf|grep -v ''# LogFile=/tmp/zabbix_server.log DBHost=192.168.62.200 DBName=zabbix DBUser=zabbix DBPassword=zabbix DBSocket=/var/lib/mysql/mysql.sock
8、启动zabbix server
/etc/init.d/zabbix_server start Starting zabbix_server: [ OK ] netstat-ntlp|grep 10051 tcp0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 9226/zabbix_server
9、安装zabbix agent
yum install gcc-c++
cd/data/source/
tar zxvf zabbix-3.2.3.tar.gz
cd zabbix-3.2.3
./configure –prefix=/usr/local/zabbix --enable-agent
make install
10、配置zabbix agent
cd /data/source/zabbix-3.2.3
cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
sed -i 's#BASEDIR=/usr/local#BASEDIR=/usr/local/zabbix#g' /etc/init.d/zabbix_agentd
11、启动zabbix agent
/etc/init.d/zabbix_agentd start Starting zabbix_agentd: [ OK ] netstat-ntlp|grep 10050 tcp0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 15495/zabbix_agentd
12、启动nginx
/usr/local/nginx/sbin/nginx netstat-ntlp|grep 80 tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 15528/nginx
四、zabbix web配置
http://192.168.62.200 Admin/zabbix