First, the source code packages such as php5.3, apache2.3, apr, curl, apr-util, and pcre are provided. The Installation Process in Linux is as follows:
1. Installation preparation. Install the Toolkit first:
Apr:
./Configure -- prefix =/usr/local/apr
Make
Make install
Apr-util:
./Configure -- prefix =/usr/local/apr-util -- with-apr =/usr/local/apr
Make
Make install
G ++:
Sudo apt-get install g ++
Pcer:
./Configure -- prefix =/usr/local/pcre
Make
Make install
Curl:
./Configure -- prefix =/usr/local/curl
Make
Make install
2. install apache.
Apache:
. /Configure -- prefix =/usr/local/apache2 -- with-apr =/usr/local/apr -- with-apr-util =/usr/local/apr-util --- pcre =/usr/local/pcre -- enable-so
3. install php.
Php:
. /Configure -- with-apxs2 =/usr/local/apache2/bin/apxs -- prefix =/usr/local/php5 -- with-config-file-path =/usr/local/lib -- with-zlib -- with-curl =/usr/local/curl
The following problems may occur during php installation.
Installing php sapi module: apache2handler
/Usr/local/apache2/build/instdso. sh SH_LIBTOOL =/usr/local/apr/build-1/libtool libphp5.la/usr/local/apache2/modules
/Usr/local/apr/build-1/libtool -- mode = install libphp5.la/usr/local/apache2/modules/
Libtool: install. libs/libphp5.lai/usr/local/apache2/modules/libphp5.la
Libtool: install. libs/libphp5.a/usr/local/apache2/modules/libphp5.a
Libtool: install: chmod 644/usr/local/apache2/modules/libphp5.a
Libtool: install: ranlib/usr/local/apache2/modules/libphp5.a
Libtool: install: warning: remember to run 'libtool -- finish/home/ligl/src/php5/libs
Warning! Dlname not found in/usr/local/apache2/modules/libphp5.la.
Assuming installing a. so rather than a libtool archive.
Chmod 755/usr/local/apache2/modules/libphp5.so
Chmod: cannot access'/usr/local/apache2/modules/libphp5.so: No such file or directory
Apxs: Error: Command failed with rc = 65536
Many people have encountered this problem on the Internet. For details, refer to here. According to the final answer, it should be the php software package version. Previously, the file was downloaded in the gz format and changed to the bz2 format. Everything works.