#!/bin/sh source /etc/profile cmd=$1 php_fpm_bin_path="/usr/local/php/sbin/php-fpm" php_fpm_conf_path="/usr/local/php/lib" nginx_bin_path="/usr/local/nginx/sbin/nginx" nginx_pid_path="/usr/local/nginx/nginx.pid" case "$cmd" in 'start') ulimit -SHn 65535 $php_fpm_bin_path -c $php_fpm_conf_path/php.ini -y $php_fpm_conf_path/php-fpm.conf -t if [ "$?" -eq "0" ] then $php_fpm_bin_path -c $php_fpm_conf_path/php.ini -y $php_fpm_conf_path/php-fpm.conf else echo "php-fpm start test failed!" fi $nginx_bin_path -t if [ "$?" -eq "0" ] then $nginx_bin_path else echo "nginx start test failed!" fi ;; 'stop') kill -QUIT `cat /usr/local/php/var/run/php-fpm.pid` kill -QUIT `cat $nginx_pid_path` ;; 'reload') $php_fpm_bin_path -c $php_fpm_conf_path/php.ini -y $php_fpm_conf_path/php-fpm.conf -t if [ "$?" -eq "0" ] then kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid` else echo "php-fpm reload test failed!" fi $nginx_bin_path -t if [ "$?" -eq "0" ] then $nginx_bin_path -s reload else echo "nginx reload test failed!" fi ;; *) # usage echo "Usage: $0 {start|stop|reload}" exit 1 ;; esac
#cut_log.sh64位 CentOS 5.6 中 Nginx + PHP + MySQL 的编译安装(2)
内容版权声明:除非注明,否则皆为本站原创文章。