PHP compiling in LNMP environment [root @ yaho php-5.3.27] # useradd-s/sbin/nologin phpadmin
[Root @ yaho php-5.3.27] # yum install-y libtool-ltdl-devel # solve the problem that the lltdl file cannot be found
[Root @ yaho php-5.3.27] # get http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz # Download mcrypt encryption package
$ Tar zxf libmcrypt # decompress
$ Cd libmcrypt # switch the Directory
$./Configure # compile the mcrypt encryption package
Prompt that the c ++ library is missing
$ Yum install-y gcc-c ++ # package missing dependency packages
$ Make & make install # packaging
[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 --- 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 --- 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
When a mysql configuration error message is prompted during compilation, you can try to change -- with-mysql =/usr/local/mysql to -- with-mysql-dir =/usr/local/mysql. Blue is required