先装Mysql
编译Apache:
./configure --prefix=/usr/local/apache22 --sysconfdir=/usr/local/httpd22 --with-apr=/usr/bin/ --with-apr-util=/usr/bin/ --with-zlib --with-pcre=/usr/local/bin/pcre-config --with-mpm=prefork --enable-so --enable-ssl --enable-cgi --enable-rewrite --enable-modules=most --enable-mpms-shared=all
编译PHP:
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache22/bin/apxs --with-mysql=/usr/local/mysql56 --with-mysqli=/usr/local/mysql56/bin/mysql_config --with-pdo-mysql=/usr/local/mysql56 --enable-calendar --enable-exif --enable-ftp --with-iconv --with-gd --enable-cgi --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf --enable-mbstring --enable-bcmath --with-curl --with-openssl --enable-soap --enable-zip --with-config-file-path=/etc --with-mcrypt=/usr/local/libmcrypt
编译安装PHP成功效果:
Installing PHP SAPI module: apache2handler
/usr/local/apache22/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' libphp5.la /usr/local/apache22/modules
/usr/lib64/apr-1/build/libtool --mode=install cp libphp5.la /usr/local/apache22/modules/
libtool: install: cp .libs/libphp5.so /usr/local/apache22/modules/libphp5.so
libtool: install: cp .libs/libphp5.lai /usr/local/apache22/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /root/tmpDown/php-5.2.17/libs'
chmod 755 /usr/local/apache22/modules/libphp5.so
[activating module `php5' in /usr/local/httpd22/httpd.conf]
Installing PHP CLI binary: /usr/local/php5/bin/
Installing PHP CLI man page: /usr/local/php5/man/man1/
Installing build environment: /usr/local/php5/lib/php/build/
Installing header files: /usr/local/php5/include/php/
Installing helper programs: /usr/local/php5/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php5/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php5/lib/php/
[PEAR] Archive_Tar - already installed: 1.3.7
[PEAR] Console_Getopt - already installed: 1.2.3
[PEAR] Structures_Graph- already installed: 1.0.3
[PEAR] XML_Util - already installed: 1.2.1
[PEAR] PEAR - already installed: 1.9.1
Wrote PEAR system config file at: /usr/local/php5/etc/pear.conf
You may want to add: /usr/local/php5/lib/php to your php.ini include_path
Installing PDO headers: /usr/local/php5/include/php/ext/pdo/
包下载地址:
https://download.csdn.net/download/hynial/10627010
Ref:
http://blog.51cto.com/wutou/1901729
https://blog.csdn.net/zhanghao143lina/article/details/78981727