First, the source code packages such as php5.3, apache2.3, APR, curl, APR-util, and PCRE are provided. The installation process is as follows:
1. Installation preparation. Install the Toolkit first:
APR: <br/>. /configure -- prefix =/usr/local/APR <br/> make install <br/> Apr-util: <br/>. /configure -- prefix =/usr/local/APR-util -- With-Apr =/usr/local/APR <br/> make install <br/> G ++: <br/> sudo apt-Get install g ++ <br/> PCER: <br/>. /configure -- prefix =/usr/local/PCRE <br/> make install <br/> curl: <br/>. /configure -- prefix =/usr/local/curl <br/> make install
2. install Apache.Apache: <br/>. /configure -- prefix =/usr/local/apache2 -- With-Apr =/usr/local/APR -- With-Apr-util =/usr/local/APR-util --- PCRE =/usr/local/PCRE -- enable-So <br/>
3. install PHP.PHP: <br/>. /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 <br/>/usr/local/apache2/build/instdso. sh sh_libtool = '/usr/local/APR/build-1/libtool' libphp5.la/usr/local/apache2/modules <br/>/usr/local/APR/build-1 /libtool -- mode = install libphp5.la/usr/local/apache2/modules/<br/> libtool: install: Install. libs/libphp5.lai/usr/local/apache2/modules/libphp5.la <br/> libtool: Install. libs/libphp5.a/us R/local/apache2/modules/libphp5.a <br/> libtool: Install: chmod 644/usr/local/apache2/modules/libphp5.a <br/> libtool: Install: ranlib/usr/local/apache2/modules/libphp5.a <br/> libtool: Install: Warning: remember to run 'libtool -- Finish/home/ligl/src/PhP5/libs' <br/> warning! Dlname not found in/usr/local/apache2/modules/libphp5.la. <br/> assuming installing. so rather than a libtool archive. <br/> chmod 755/usr/local/apache2/modules/libphp5.so <br/> chmod: cannot access'/usr/local/apache2/modules/libphp5.so ': no such file or directory <br/> 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.