自己搭建测试环境的脚本,不可能完全适用于大家的,可做参考。useradd -r nginx #add user for runing nginx #添加Nginx用户wget http://nginx.org/download/nginx-1.4.7.tar.gz #download nginx tar xf nginx-1.4.7.tar.gzcd /root/nginx-1.4.7./configure \ --prefix=/usr/local/nginx \ --sbin-path=/usr/local/nginx/sbin/nginx \ --conf-path=/etc/nginx/nginx.conf \ --error-log-path=/var/log/nginx/error.log \ --http-log-path=/var/log/nginx/access.log \ --pid-path=/var/run/nginx/nginx.pid \ --lock-path=/var/lock/nginx.lock \ --user=nginx \ --group=nginx \ --with-http_ssl_module \ --with-http_flv_module \ --with-http_stub_status_module \ --with-http_gzip_static_module \ --http-client-body-temp-path=/var/tmp/nginx/client/ \ --http-proxy-temp-path=/var/tmp/nginx/proxy/ \ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \ --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \ --http-scgi-temp-path=/var/tmp/nginx/scgi \ --with-pcremake && make installwget ftp://10.0.0.122/pub/sources/nginx/nginx -P /etc/rc.d/init.d/chmod +x /etc/rc.d/init.d/nginxchkconfig --add nginxchkconfig nginx onservice nginx start
#install phprpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6yum -y install httpd-devel.x86_64 libxml2-devel openssl-devel bzip2-devel libmcrypt-devel wget ftp://10.0.0.122/pub/sources/php/php-5.4.19.tar.bz2tar xf php-5.4.19.tar.bz2cd php-5.4.19./configure --prefix=/usr/local/php --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-sockets --enable-fpm --with-mcrypt --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2make && make installcp php.ini-production /etc/php.inicp sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpmchmod +x /etc/rc.d/init.d/php-fpmchkconfig --add php-fpmchkconfig php-fpm oncp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.confservice php-fpm start#install xcachecdwget http://xcache.lighttpd.net/pub/Releases/3.0.4/xcache-3.0.4.tar.gztar xf xcache-3.0.4.tar.gzcd xcache-3.0.4/usr/local/php/bin/phpize./configure --enable-xcache --with-php-config=/usr/local/php/bin/php-configmake && make installmkdir /etc/php.dcp xcache.ini /etc/php.d