Yum install-y rubygem-mongrel echo-e "puppetmaster_ports= (18140 18141 18142 18143 18144) \npuppetmaster_extra_opts =\ "-servertype=mongrel--ssl_client_header=http_x_ssl_subject\" ">/etc/sysconfig/puppetmaster useradd www gro Upadd www core_num= ' cat/proc/cpuinfo | grep "Model Name" | Wc-l ' CD $path tar-zxvf pcre-8.10.tar.gz cd pcre-8.10/make clean./configure--disable-shared--w Ith-pic make && make install CD. /TAR-ZXVF nginx-1.2.1.tar.gz CD./nginx-1.2.1/./configure--prefix= $path _nginx--with-http_stub_status_mod
Ule--with-http_ssl_module make && make install touch $path _nginx/html/index.php process () { Zero= ' for ((i=1;i<= $CORE _num;i++));d o echo-n "0";d one; ' for ((i = $CORE _num; i > o; i--)); Do echo-n ${zero:0: $i-1} "1" ${zero: $i} "done} sed-i" S/worker_processes.*/worker_proc Esses $CORE _num;\nworker_cpu_affinity$ (process);/"$path _nginx/conf/nginx.conf sed-i" s/#user. */user www www;/"$path _nginx/conf/nginx.conf sed-i "S/index.html index.htm;/index.php &/" $path _nginx/conf/nginx.conf sed-i "a#\nlocation ~ \\\.php$ {\nfastcgi_p Ass 127.0.0.1:9000;\nfastcgi_index Index.php;\nfastcgi_param script_filename/usr/local/nginx/html/\ $fastcgi _ Script_name;\ninclude fastcgi_params;\ninclude fastcgi.conf;} # "$path _nginx/conf/nginx.conf ##### #隐藏版本号 ########################## sed-i" S/^http {/&\n server_ Tokens off;/"$path _nginx/conf/nginx.conf ################################## #nginx自启动 ############################ ############ #sed-i "s#^path_nginx=.* #path_nginx = $path _nginx#" $path/nginxd CP $path/NGINXD/ETC/INIT.D/MV $ path_nginx/conf/nginx.conf $path _nginx/conf/nginx.conf.bak mv $path/nginx.conf $path _nginx/conf chmod 755/etc/ini T.d/nginxd chkconfig--add nginxd chkconfig nginxd on kill-9 '/usr/sbin/lsof-i:8140 | GreP 8140 |awk ' {print $} ' echo ' ############################################ ' echo ' status "Service nginxd start service puppetmaster start