关于php:PHP-5-源码编译

42次阅读

共计 1891 个字符,预计需要花费 5 分钟才能阅读完成。

下载 php5.6.2 源码
wget http://mirrors.sohu.com/php/p…

到指定的目录下
cd /opt/software/lnmp/

解压缩
tar -zxvf php-5.6.2.tar.gz

yum -y install libvpx-devel

编译参数
–prefix=/usr/local/php56 能够更改为 –prefix=/usr/local/php/56 这样当前在 PHP 版本升级是,间接在此目录下装置和创立新版本的 php

./configure \
–prefix=/usr/local/php56 \
–with-config-file-path=/usr/local/php56/etc \
–enable-fpm \
–with-fpm-user=webadmin \
–with-fpm-group=webadmin \
–enable-inline-optimization \
–enable-shared \
–enable-soap \
–with-libxml-dir \
–with-xmlrpc \
–with-openssl \
–with-mcrypt \
–with-mhash \
–with-pcre-regex \
–with-sqlite3 \
–with-zlib \
–enable-bcmath \
–with-iconv \
–with-bz2 \
–enable-calendar \
–with-curl \
–with-cdb \
–enable-dom \
–enable-exif \
–enable-fileinfo \
–enable-filter \
–with-pcre-dir \
–enable-ftp \
–with-gd \
–with-openssl-dir \
–with-jpeg-dir \
–with-png-dir \
–with-zlib-dir \
–with-freetype-dir \
–enable-gd-native-ttf \
–enable-gd-jis-conv \
–with-gettext \
–with-gmp \
–with-mhash \
–enable-json \
–enable-mbstring \
–enable-mbregex \
–enable-mbregex-backtrack \
–with-libmbfl \
–with-onig \
–enable-pdo \
–with-mysqli=mysqlnd \
–with-mysql=mysqlnd \
–with-pdo-mysql=mysqlnd \
–with-pdo-mysql=mysqlnd \
–with-zlib-dir \
–with-pdo-sqlite \
–with-readline \
–enable-session \
–enable-shmop \
–enable-simplexml \
–enable-sockets \
–enable-sysvmsg \
–enable-sysvsem \
–enable-sysvshm \
–enable-wddx \
–with-libxml-dir \
–with-xsl \
–enable-zip \
–enable-mysqlnd-compression-support \
–with-pear \
–enable-opcache \
–enable-pcntl \
–with-vpx-dir \
–enable-intl \

make
make install
cp php.ini-production /usr/local/php56/etc/php.ini
cp /usr/local/php56/etc/php-fpm.conf.default /usr/local/php56/etc/php-fpm.conf
cp /usr/local/php56/etc/php-fpm.d/www.conf.default /usr/local/php56/etc/php-fpm.d/www.conf
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm56
chmod +x /etc/init.d/php-fpm56
chkconfig –add php-fpm56
chkconfig –level 2345 php-fpm56 on
ln -s /usr/local/php56/bin/php /usr/local/bin/php56
service php-fpm56 start
lsof -i
yum -y install lsof
lsof -i

正文完
 0