Did not expect to compile a lamp so troublesome and simple.
According to the official website to do it, but I am under the CentOS always prompt for this error
According to the official Website installation method: Install
Use the following parameters:
./configure--with-apxs2=/usr/local/httpd/bin/apxs--with-mysql--prefix=/usr/local/php5.6--with-iconv-dir=/usr/ Local/lib
Always prompt for the following error:
/php-5.6. 0/ext/iconv/iconv.c:2512 more undefined references to ' Libiconv'
It's strange to lack libiconv, isn't there?
Just go and install Libiconv.
wgethttp//ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gzwgethttp//www2d.biglobe.ne.jp/~msyk/software/libiconv/libiconv-1.13-ja-1.patch.gzTarZXVF libiconv-1.13.Tar. Gzcd./libiconv-1.13.Tar. GZgzip-dc. /libiconv-1.13-ja-1.Patch. gz |Patch-P1 Make Make InstallLN-s/usr/local/lib/libiconv.so.2.5.0/usr/local/lib64/libiconv.soLN-s/usr/local/lib/libiconv.so.2.5.0/usr/local/lib64/libiconv.so.2
After executing, configure the installation information with this parameter:
./configure--with-apxs2=/usr/local/httpd/bin/apxs--with-mysql--prefix=/usr/local/php5.6--with-iconv=shared,/ Usr/local
Yes, before you make a clean
Later I added some common parameters (option in order)
./configure--WITH-APXS2=/USR/LOCAL/HTTPD/BIN/APXS--prefix=/usr/local/php5.6--with-iconv=shared,/usr/local-- Enable-bcmath--with-bz2--enable-calendar--with-curl--enable-dba--enable-exif--enable-ftp-- Enable-inline-optimization--with-kerberos--enable-mbregex--enable-mbstring--with-mcrypt--with-mhash-- With-mysql--with-mysqli--with-mysql-sock=/var/lib/mysql/mysql.sock--with-pdo-mysql--with-pear--enable-soap-- Enable-sockets--ENABLE-WDDX--with-xsl--enable-zip--with-zlib
Compiling php5.6