环境:Centos 6.6
已完成LNMP安装
[root@Centos ~]# cd /etc/ [root@Centos etc]# grep max_execution_time php.ini max_execution_time = 300 [root@Centos etc]# grep post_max_size php.ini post_max_size = 16M [root@Centos etc]# grep ^max_input_time php.ini max_input_time = 300 [root@Centos etc]# grep ‘^date.timezone‘ php.ini date.timezone = "Asia/Shanghai" [root@Centos ~]# [root@Centos etc]# grep php-fpm.pid php-fpm.conf pid = /var/run/php-fpm/php-fpm.pid [root@Centos etc]# [root@Centos etc]# cd php-fpm.d/ [root@Centos php-fpm.d]# grep ^pm.min_spare_servers www.conf pm.min_spare_servers = 5 [root@Centos php-fpm.d]# grep ^pm.max_spare_servers www.conf pm.max_spare_servers = 35 [root@Centos php-fpm.d]# grep ^pm.start_servers www.conf pm.start_servers = 5 [root@Centos php-fpm.d]# grep ^listen www.conf listen = 127.0.0.1:9000 listen.allowed_clients = 127.0.0.1 [root@Centos php-fpm.d]# netstat -anp|grep php-fpm tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1179/php-fpm unix 3 [ ] STREAM CONNECTED 9145 1179/php-fpm unix 3 [ ] STREAM CONNECTED 9144 1179/php-fpm [root@Centos php-fpm.d]# ps -ef |grep php |grep -v grep root 1179 1 0 21:59 ? 00:00:00 php-fpm: master process (/etc/php-fpm.conf) nginx 1180 1179 0 21:59 ? 00:00:00 php-fpm: pool www nginx 1181 1179 0 21:59 ? 00:00:00 php-fpm: pool www nginx 1182 1179 0 21:59 ? 00:00:00 php-fpm: pool www nginx 1183 1179 0 21:59 ? 00:00:00 php-fpm: pool www nginx 1184 1179 0 21:59 ? 00:00:00 php-fpm: pool www [root@Centos php-fpm.d]#
[root@Centos zabbix]# ls zabbix-2.0.14-1.el6.x86_64.rpm zabbix-server-2.0.14-1.el6.x86_64.rpm zabbix-agent-2.0.14-1.el6.x86_64.rpm zabbix-server-mysql-2.0.14-1.el6.x86_64.rpm zabbix-get-2.0.14-1.el6.x86_64.rpm zabbix-web-2.0.14-1.el6.noarch.rpm zabbix-sender-2.0.14-1.el6.x86_64.rpm zabbix-web-mysql-2.0.14-1.el6.noarch.rpm [root@Centos zabbix]# yum -y localinstall zabbix*.rpm [root@Centos zabbix]# mysql -uroot -predhat mysql> create database zabbix default charset utf8; Query OK, 1 row affected (0.00 sec) mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix‘; Query OK, 0 rows affected (0.00 sec) mysql> grant all privileges on zabbix.* to zabbix@192.168.31.160 identified by ‘zabbix‘; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> [root@Centos zabbix]# rpm -ql zabbix-web [root@Centos zabbix]# cp -rfp /usr/share/zabbix /var/www/html/zabbix [root@Centos ~]# rpm -ql zabbix-server-mysql [root@Centos ~]# cd /usr/share/doc/zabbix-server-mysql-2.0.14/create/ [root@Centos create]# mysql -uroot -predhat zabbix < schema.sql [root@Centos create]# mysql -uroot -predhat zabbix < images.sql [root@Centos create]# mysql -uroot -predhat zabbix < data.sql [root@Centos ~]# cd /etc/zabbix/ [root@Centos zabbix]# grep ^DB zabbix_server.conf DBName=zabbix DBUser=zabbix DBPassword=zabbix DBSocket=/var/lib/mysql/mysql.sock DBPort=3306 [root@Centos zabbix]# grep ^LogFile zabbix_server.conf LogFile=/var/log/zabbix/zabbix_server.log LogFileSize=0 [root@Centos zabbix]# [root@Centos zabbix]# grep ^Server zabbix_agentd.conf Server=192.168.31.160 ServerActive=192.168.31.160 [root@Centos zabbix]# grep ^Hostname zabbix_agentd.conf Hostname=192.168.31.160 [root@Centos zabbix]# grep ^Unsafe zabbix_agentd.conf UnsafeUserParameters=1 [root@Centos zabbix]# [root@Centos zabbix]# /etc/init.d/zabbix-server start Starting Zabbix server: [ OK ] [root@Centos zabbix]# /etc/init.d/zabbix-agent start Starting Zabbix agent: [ OK ] [root@Centos zabbix]# chkconfig zabbix-server on [root@Centos zabbix]# chkconfig zabbix-agent on
[root@Centos ~]# cd /etc/nginx/conf.d/ [root@Centos conf.d]# head -25 default.conf|tail -6 location /zabbix { root /var/www/html; index index.php; access_log/var/log/zabbix/zabbix.access.log main; try_files $uri $uri/ /index.php?$args; } [root@Centos conf.d]# [root@Centos conf.d]# /etc/init.d/nginx restart Stopping nginx: [ OK ] Starting nginx: [ OK ] [root@Centos conf.d]# [root@Centos ~]# chown zabbix:nginx /etc/zabbix/ -R [root@Centos ~]# chmod 775 /etc/zabbix/web/
本文出自 “鹏城-酱油瓶” 博客,谢绝转载!
原文地址:http://yfshare.blog.51cto.com/8611708/1774959