标签:figure reg string inf math libjpeg ber path enable
一 php安装yum -y install libxml2
yum -y install libxml2-devel
yum -y install openssl
yum -y install openssl-devel
yum -y install curl
yum -y install curl-devel
yum -y install libjpeg
yum -y install libjpeg-devel
yum -y install libpng
yum -y install libpng-devel
yum -y install freetype
yum -y install freetype-devel
yum -y install pcre
yum -y install pcre-devel
yum -y install libxslt
yum -y install libxslt-devel
yum -y install bzip2
yum -y install bzip2-devel
[root@jweb-1 php-5.6.38]# useradd -s /sbin/nologin nginx
[root@jweb-1 php-5.6.38]# ./configure --prefix=/usr/local/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip
[root@jweb-1 php-5.6.38]# make && make install
[root@jweb-1 php-5.6.38]# cp php.ini-development /usr/local/php/lib/php.ini
[root@jweb-1 php-5.6.38]# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
[root@jweb-1 php-5.6.38]#vim /usr/local/php/lib/php.ini
772 cgi.fix_pathinfo=0
[root@jweb-1 php-5.6.38]# vim /usr/local/php/etc/php-fpm.conf
149 user = nginx
150 group = nginx
[root@jweb-1 php-5.6.38]# vim /etc/profile
77 export PATH=/usr/local/php/bin/:$PATH
[root@jweb-1 php-5.6.38]# php-fpm
[root@jweb-1 php-5.6.38]# ss -tunlp | grep 9000
tcp LISTEN 0 128 127.0.0.1:9000 *:* users:(("php-fpm",pid=1047,fd=0),("php-fpm",pid=1046,fd=0),("php-fpm",pid=1045,fd=7))
[root@jweb-1 php-5.6.38]# vim /etc/rc.local
/usr/local/bin/php-fpm
[root@jweb-1 php-5.6.38]# chmod +x /etc/rc.local
二 安装php支持redis模块
[root@jweb-1 phpredis-2.2.4]# ls /usr/local/php/bin/php-config
/usr/local/php/bin/php-config
[root@jweb-1 phpredis-2.2.4]# ./configure --with-php-config=/usr/local/php/bin/php-config
[root@jweb-1 phpredis-2.2.4]# make && make install
[root@jweb-1 phpredis-2.2.4]# ls /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
opcache.a opcache.so redis.so
[root@jweb-1 phpredis-2.2.4]# vim /usr/local/php/lib/php.ini
733 extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-2013122 6/"
734 extension = "redis.so"
[root@jweb-1 ~]# php -m | grep redis
redis
三 php参数优化
优化参数参考:http://blog.51cto.com/11233559/2124007
标签:figure reg string inf math libjpeg ber path enable
原文地址:http://blog.51cto.com/14050800/2333606