php编译安装
2016-06-08 16:28
417 查看
1.wget http://cn2.php.net/distributions/php-5.4.37.tar.bz2
2.tar jxf php-5.4.37.tar.bz2
3.useradd -s /sbin/nologin php-fpm
4.cd php-5.4.37
5. ./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 --disable-ipv6 --with-curl
make && make install
6.cp php.ini-production /usr/local/php/etc/php.ini
7.拷贝启动脚本:
cd /usr/local/src/php-5.4.37/
8.cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
9.mv /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
10.chmod 755 /etc/init.d/php-fpm
11.chkconfig --add php-fpm
12.service php-fpm start
13.chkconfig php-fpm on
/usr/local/php/sbin/php-fpm -t 检查配置是否正确
checking for fabsf… yes checking for floorf… yes configure: error: jpeglib.h not found.Fix:
复制代码 代码如下:
yum -y install libjpeg-devel
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
复制代码 代码如下:
wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz tar zxf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure
make && make install
2.tar jxf php-5.4.37.tar.bz2
3.useradd -s /sbin/nologin php-fpm
4.cd php-5.4.37
5. ./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 --disable-ipv6 --with-curl
make && make install
6.cp php.ini-production /usr/local/php/etc/php.ini
7.拷贝启动脚本:
cd /usr/local/src/php-5.4.37/
8.cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
9.mv /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
10.chmod 755 /etc/init.d/php-fpm
11.chkconfig --add php-fpm
12.service php-fpm start
13.chkconfig php-fpm on
/usr/local/php/sbin/php-fpm -t 检查配置是否正确
checking for fabsf… yes checking for floorf… yes configure: error: jpeglib.h not found.Fix:
复制代码 代码如下:
yum -y install libjpeg-devel
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
复制代码 代码如下:
wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz tar zxf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure
make && make install
相关文章推荐
- php九个很有用的功能
- php扩展模块如何安装
- php.ini配置文件详解
- PHP 数组遍历方法
- PHP Yaf框架的简单安装使用教程(推荐)
- php获取服务器操作系统等信息
- php框架yii入门遇到的问题
- PHP Fatal error: Class 'PHP_Token_Stream' not found in /usr/share/php/PHP/CodeCoverage.php on line
- [置顶] 关于FragmentPgerAdapter 的数据不刷新最好解决办法
- PHP 短连接生成算法
- 测试php解析
- PHP安装
- tp 多文件上传,文件及时预览
- RTP协议全解析(H264码流和PS流)
- php抽象 与接口
- php实现的太平洋时间和北京时间互转的自定义函数
- PHPStorm+Wamp+Xdebug+Windows7调试代码
- SAS ods output
- php 上传视频的代码
- Macvim打造php-IDE初尝试