环境:Centos 6.6
已完成LNMP安装
[[email protected] ~]# cd /etc/ [[email protected] etc]# grep max_execution_time php.ini max_execution_time = 300 [[email protected] etc]# grep post_max_size php.ini post_max_size = 16M [[email protected] etc]# grep ^max_input_time php.ini max_input_time = 300 [[email protected] etc]# grep ‘^date.timezone‘ php.ini date.timezone = "Asia/Shanghai" [[email protected] ~]# [[email protected] etc]# grep php-fpm.pid php-fpm.conf pid = /var/run/php-fpm/php-fpm.pid [[email protected] etc]# [[email protected] etc]# cd php-fpm.d/ [[email protected] php-fpm.d]# grep ^pm.min_spare_servers www.conf pm.min_spare_servers = 5 [[email protected] php-fpm.d]# grep ^pm.max_spare_servers www.conf pm.max_spare_servers = 35 [[email protected] php-fpm.d]# grep ^pm.start_servers www.conf pm.start_servers = 5 [[email protected] php-fpm.d]# grep ^listen www.conf listen = 127.0.0.1:9000 listen.allowed_clients = 127.0.0.1 [[email protected] 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 [[email protected] 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 [[email protected] php-fpm.d]#
[[email protected] 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 [[email protected] zabbix]# yum -y localinstall zabbix*.rpm [[email protected] 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 [email protected] identified by ‘zabbix‘; Query OK, 0 rows affected (0.00 sec) mysql> grant all privileges on zabbix.* to [email protected] identified by ‘zabbix‘; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> [[email protected] zabbix]# rpm -ql zabbix-web [[email protected] zabbix]# cp -rfp /usr/share/zabbix /var/www/html/zabbix [[email protected] ~]# rpm -ql zabbix-server-mysql [[email protected] ~]# cd /usr/share/doc/zabbix-server-mysql-2.0.14/create/ [[email protected] create]# mysql -uroot -predhat zabbix < schema.sql [[email protected] create]# mysql -uroot -predhat zabbix < images.sql [[email protected] create]# mysql -uroot -predhat zabbix < data.sql [[email protected] ~]# cd /etc/zabbix/ [[email protected] zabbix]# grep ^DB zabbix_server.conf DBName=zabbix DBUser=zabbix DBPassword=zabbix DBSocket=/var/lib/mysql/mysql.sock DBPort=3306 [[email protected] zabbix]# grep ^LogFile zabbix_server.conf LogFile=/var/log/zabbix/zabbix_server.log LogFileSize=0 [[email protected] zabbix]# [[email protected] zabbix]# grep ^Server zabbix_agentd.conf Server=192.168.31.160 ServerActive=192.168.31.160 [[email protected] zabbix]# grep ^Hostname zabbix_agentd.conf Hostname=192.168.31.160 [[email protected] zabbix]# grep ^Unsafe zabbix_agentd.conf UnsafeUserParameters=1 [[email protected] zabbix]# [[email protected] zabbix]# /etc/init.d/zabbix-server start Starting Zabbix server: [ OK ] [[email protected] zabbix]# /etc/init.d/zabbix-agent start Starting Zabbix agent: [ OK ] [[email protected] zabbix]# chkconfig zabbix-server on [[email protected] zabbix]# chkconfig zabbix-agent on
[[email protected] ~]# cd /etc/nginx/conf.d/ [[email protected] 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; } [[email protected] conf.d]# [[email protected] conf.d]# /etc/init.d/nginx restart Stopping nginx: [ OK ] Starting nginx: [ OK ] [[email protected] conf.d]# [[email protected] ~]# chown zabbix:nginx /etc/zabbix/ -R [[email protected] ~]# chmod 775 /etc/zabbix/web/
时间: 2024-11-02 01:31:45