\cp php.ini-production /usr/local/php7/etc/php.ini
sed -i 's/post_max_size =.*/post_max_size = 50M/g' /usr/local/php7/etc/php.ini
sed -i 's/upload_max_filesize =.*/upload_max_filesize = 50M/g' /usr/local/php7/etc/php.ini
sed -i 's/;date.timezone =.*/date.timezone = PRC/g' /usr/local/php7/etc/php.ini
sed -i 's/short_open_tag =.*/short_open_tag = On/g' /usr/local/php7/etc/php.ini
sed -i 's/;cgi.fix_pathinfo=.*/cgi.fix_pathinfo=0/g' /usr/local/php7/etc/php.ini
sed -i 's/max_execution_time =.*/max_execution_time = 300/g' /usr/local/php7/etc/php.ini
sed -i 's/disable_functions =.*/disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server/g' /usr/local/php7/etc/php.ini
mkdir -p /usr/local/php7/conf.d
cat >/usr/local/php7/conf.d/002-zendguardloader.ini<<EOF
[Zend ZendGuard Loader]
;php7 do not support zendguardloader,after support you can uncomment the following line.
;zend_extension=/usr/local/zend/ZendGuardLoader.so
;zend_loader.enable=1
;zend_loader.disable_licensing=0
;zend_loader.obfuscation_level_support=3
;zend_loader.license_path=
EOF
cat >/usr/local/php7/etc/php-fpm.conf<<EOF
[global]
pid = /usr/local/php7/var/run/php-fpm.pid
error_log = /usr/local/php7/var/log/php-fpm.log
log_level = notice
[www]
listen = /tmp/php7-cgi.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 6
request_terminate_timeout = 100
request_slowlog_timeout = 0
slowlog = var/log/slow7.log
EOF