Compile PHP5.3 + Apache2.3 in Linux

Source: Internet
Author: User
Tags php software

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:
./Configure -- prefix =/usr/local/apr
Make install
./Configure -- prefix =/usr/local/apr-util -- with-apr =/usr/local/apr

Make install
G ++:
Sudo apt-get install g ++
./Configure -- prefix =/usr/local/pcre
Make install
./Configure -- prefix =/usr/local/curl
Make install

2. install 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.

. /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
/Usr/local/apr/build-1/libtool -- mode = install
Libtool: install. libs/libphp5.lai/usr/local/apache2/modules/
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/
Assuming installing a. so rather than a libtool archive.
Chmod 755/usr/local/apache2/modules/
Chmod: cannot access'/usr/local/apache2/modules/ 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.