LNMP环境之PHP编译
[root@yaho php-5.3.27]# yum install -y libtool-ltdl libtool-ltdl-devel #解决找不到lltdl文件问题
[root@yaho php-5.3.27]# get http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz #下载mcrypt加密包
$ tar zxf libmcrypt #解压
$ cd libmcrypt #切换目录
$ ./configure #编译mcrypt加密包
提示需要缺少c++库
$ yum install -y gcc-c++ #包装缺少依赖包
$ make &&make install #包装
[root@yaho php-5.3.27]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=phpadmin --with-fpm-group=phpadmin --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=/usr/bin/ --with-openssl ./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-dir=/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=/usr/bin/ --with-openssl
[root@yaho php-5.3.27]# make
[root@yaho php-5.3.27]# make install
[root@yaho php-5.3.27]# done
当编译时提示mysql 配置错误信息,可尝试将--with-mysql=/usr/local/mysql 修改为:--with-mysql-dir=/usr/local/mysql。蓝色必加项
推荐阅读
-
在Mac OS上编译安装Nginx+PHP+MariaDB开发环境的教程
-
在Mac上编译安装PHP7的开发环境
-
PHP本地环境之phpStudy2016使用教程
-
CentOS 7.x编译安装Nginx1.10.3+MySQL5.7.16+PHP5.2 5.3 5.4 5.5 5.6 7.0 7.1多版本全能环境
-
PHP-FPM之Chroot执行环境详解
-
在lnmp环境中的nginx编译安装
-
CentOS6.5 编译安装lnmp环境
-
CentOS 6.4系统下编译安装LNMP和配置PHP环境具体步骤
-
Linux+php+apache+oracle环境搭建之CentOS下安装Oracle数据库
-
在Mac上编译安装PHP7的开发环境