1.php安装
cd /usr/local/src
wget http://cn2.php.net/get/php-5.4.45.tar.bz2/from/this/mirror
mv mirror php-5.4.45.tar.bz2
tar jxf php-5.4.45.tar.bz2
useradd -s /sbin/nologin php-fpm
cd php-5.4.45
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --enable-zend-multibyte --disable-ipv6 --with-pear --with-curl
(出现这种警告可以不用理会configure: WARNING: unrecognized options: --enable-zend-multibyte)
make
make install
cp php.ini-production /usr/local/php/etc/php.ini
cp /usr/local/src/php-5.4.45/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod 755 /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig php-fpm on
service php-fpm start
(ERROR: No pool defined. at least one pool section must be specified in config file
ERROR: failed to post process the configuration
ERROR: FPM initialization failed)
出现这种警告后,只需修改配置文件名称即可,然后重启php-fpm
cd /usr/local/php/etc/
mv php-fpm.conf.default php-fpm.conf
cd /usr/local/src
wget http://cn2.php.net/get/php-5.4.45.tar.bz2/from/this/mirror
mv mirror php-5.4.45.tar.bz2
tar jxf php-5.4.45.tar.bz2
useradd -s /sbin/nologin php-fpm
cd php-5.4.45
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --enable-zend-multibyte --disable-ipv6 --with-pear --with-curl
(出现这种警告可以不用理会configure: WARNING: unrecognized options: --enable-zend-multibyte)
make
make install
cp php.ini-production /usr/local/php/etc/php.ini
cp /usr/local/src/php-5.4.45/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod 755 /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig php-fpm on
service php-fpm start
(ERROR: No pool defined. at least one pool section must be specified in config file
ERROR: failed to post process the configuration
ERROR: FPM initialization failed)
出现这种警告后,只需修改配置文件名称即可,然后重启php-fpm
cd /usr/local/php/etc/
mv php-fpm.conf.default php-fpm.conf
编辑回复