1, 获取源码wget -O php.tar.gz http://am1.php.net/get/php-5.6.27.tar.gz/from/this/mirror tar zxvf php.tar.gz cd php-5.6.272, 创建用户和组 groupadd phpuseradd php -g php 3, 安装依赖 yum install libxml2-devel libcurl-devel libjpeg-turbo-devel libpng-devel freetype-devel 4, 编译安装 ./configure --prefix=/usr/local/php --enable-opcache --enable-fpm --enable-sockets --enable-mysqlnd --enable-gd-native-ttf --with-fpm-user=php --with-fpm-group=php --with-pdo-mysql --with-gd --with-jpeg-dir=/usr/lib/ -with-freetype-dir=/usr/lib --with-curl make && make install 5, 自启动脚本 cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpmchmod 755 /etc/init.d/php-fpmchkconfig --add php-fpmchkconfig php-fpm on 6, 配置phpconf.zip 复制到/usr/local/php/lib/php.ini 复制到/usr/local/php/etc/php-fpm.conf http://files.cnblogs.com/files/mysic/phpconf.zip
时间: 2024-10-13 11:57:25