zend_extension = /usr/local/webserver/php-d/php-5.5.0/lib/php/extensions/no-debug-non-zts-20121212/opcache.so
; 上面zend_extension路径为opcache.so的路径
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
注意:如果在您的php扩展模块找不到opcache.so说明没有安装成功,请重新安装
4.配置php-fpm.conf
复制代码 代码如下:
pid = /usr/local/webserver/php-d/php-5.5.0/var/run/php-fpm.pid
error_log = /usr/local/webserver/php-d/php-5.5.0/logs/php-fpm.log
log_level = notice
emergency_restart_threshold = 10
emergency_restart_interval = 60s
process_control_timeout = 5s
daemonize = yes
rlimit_files = 65535
rlimit_core = 0
user = www
group = www
listen.backlog = -1
listen.owner = www
listen.group = www
listen.mode = 0666
listen.allowed_clients = 127.0.0.1
pm = static
pm.max_children = 64
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 1024
ping.response = pong
slowlog = /usr/local/webserver/php-d/php-5.5.0/logs/$pool.log.slow
request_slowlog_timeout = 0
request_terminate_timeout = 0
catch_workers_output = yes
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f jht2718@163.com
php_flag[display_errors] = on
备注:请根据自己的情况修改配置文件
5.修改启动项:
复制代码 代码如下:
cp /usr/local/webserver/php-d/php-5.5.0/bin/php /etc/init.d/php
您可能感兴趣的文章: