LNMP安装脚本(nginx(2)

PHP.SH

#!/bin/bash  PHPDIR=/usr/local/webserver/php  SOFT=/data2/software  B=/dev/null SQL=/usr/local/webserver/mysql  ! [ -e $SOFT ] && mkdir -p $SOFT  cd $SOFT  echo "downloading some software of php,please wait a moment..." wget from/this/mirror  #wget CentOS.org/centos/5/extras/x86_64/RPMS/libmcrypt-2.5.8-4.el5.centos.x86_64.rpm  #wget   #wget   #wget   wget   wget   wget   #!/bin/bash  PHPDIR=/usr/local/webserver/php  SOFT=/data2/software  B=/dev/null SQL=/usr/local/webserver/mysql  ! [ -e $SOFT ] && mkdir -p $SOFT  cd $SOFT  echo "downloading some software of php,please wait a moment..." wget from/this/mirror  #wget   #wget   #wget   #wget   wget   wget   wget   wget   rpm -ivh ./*.rpm  tar xf php-5.4.4.tar.bz2  cd php-5.4.4  ./configure --prefix=$PHPDIR --with-config-file-path=$PHPDIR/etc --with-mysql=$SQL --with-mysqli=$SQL/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap  ln -s $SQL/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18  if [ -d /usr/lib64 ];then ln -s $SQL/lib/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18  fi  make ZEND_EXTRA_LIBS='-liconv' make install  cp php.ini-production $PHPDIR/etc/php.ini  cp sapi/fpm/init.d.php-fpm  /etc/rc.d/init.d/php-fpm  chmod +x /etc/rc.d/init.d/php-fpm  cp $PHPDIR/etc/php-fpm.conf.default $PHPDIR/etc/php-fpm.conf  sed -i -e "s#pm.max_children = 5#pm.max_children = 50#" -e "s#pm.start_servers = 2#pm.start_servers = 5#" -e "s#pm.min_spare_servers = 1#pm.min_spare_servers = 2#" -e "s#pm.max_spare_servers = 3#pm.max_spare_servers = 8#" -e "s#;pid = run/php-fpm.pid#pid = run/php-fpm.pid#" $PHPDIR/etc/php-fpm.conf   ehco "add memcache modules..."  wget wget   tar xf memcache-2.2.5.tgz  cd memcache-2.2.5  /usr/local/webserver/php/bin/phpize  ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/webserver/php/bin/php-config  make  make install  cd ..  sed -i 's#extension_dir = "./"#extension_dir = "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20100525/"\nextension = "memcache.so"#' /usr/local/webserver/php/etc/php.ini  sed -i 's#output_buffering = Off#output_buffering = On#' /usr/local/webserver/php/etc/php.ini  sed -i "s#; always_populate_raw_post_data = On#always_populate_raw_post_data = On#g" /usr/local/webserver/php/etc/php.ini  sed -i "s#; cgi.fix_pathinfo=0#cgi.fix_pathinfo=0#g" /usr/local/webserver/php/etc/php.ini  

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/d8beb541da91ca9c118328c4ebb3b663.html