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:
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.
 

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: info-contact@alibabacloud.com 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.