centos 服务器

yum -y install bzip2-devel ncurses-devel zlib-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel libXpm-devel gettext-devel

yum install -y rrdtool perl-rrdtool rrdtool-devel

 

缺省配置和编译是带-g选项的,这样会使可执行文件变大,去掉-g就很小了。
编辑文件: nginx/auto/cc/gcc
找到debug项,注释掉。

 

wget http://zlib.net/zlib-1.2.7.tar.gz

wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz

 

./configure --prefix=/opt/nginx --conf-path=/opt/nginx/conf/nginx.conf --pid-path=/var/run/server/nginx.pid --with-zlib=../zlib-1.2.7 --with-openssl=../openssl-1.0.1c --with-pcre=../pcre-8.31 --with-http_stub_status_module --user=www --group=www

 

vi  /etc/security/limits.conf

文件最后加上
*        soft    nofile  10240
*        hard    nofile  10240

 

netstat -anpo | grep "php-fpm" | wc -l

 

./configure --prefix=/opt/php-production --with-config-file-path=/opt/php-production --with-iconv --with-zlib --enable-mbstring --with-mcrypt --enable-mbregex --with-curl --enable-fpm --disable-posix --disable-phar --disable-tokenizer --disable-short-tags --disable-flatfile --disable-simplexml --disable-xmlwriter --disable-xmlreader

备选参数:

--with-openssl-dir=/usr/lib/openssl --with-openssl (如果使用ssl发邮件需要开启)

--enable-sockets

 

pear install Mail

pear install Net_SMTP

pear install pear/Net_SMTP 

pear install pear/Auth_SASL

猜你喜欢

转载自jiorry.iteye.com/blog/1680445