I. Apache source code Installation Process
Problems occurred during Apache installation:
Http://code.sh/linux/apache%E9%81%87%E5%88%B0%E7%9A%84%E9%97% AE %E9%A2%98%EF%BC%9Aapr-not-found/
1. Solve the APR not found problem ------>
You can use./configure-help | grep Apr to view help.
Install APR (Apache Portable Runtime)
Download: http://apr.apache.org/download.cgi
[Root @ yahoo test] # tar-zxf apr-1.4.5.tar.gz
[Root @ yahoo apr-1.4.5] #./configure -- prefix =/usr/local/APR
[Root @ yahoo apr-1.4.5] # Make
[Root @ yahoo apr-1.4.5] # make install
2. Solve the Problem of APR-util not found >>>>
Download: http://download.chinaunix.net/download/0001000/472.shtml
[Root @ yahoo test] # tar-zxf apr-util-1.3.12.tar.gz
[Root @ yahoo apr-util-1.3.12] #./configure -- prefix =/usr/local/APR-util-with-Apr =/usr/local/APR/bin/apr-1-config
[Root @ yahoo apr-util-1.3.12] # Make
[Root @ yahoo apr-util-1.3.12] # make install
3./mod_dir.so: Undefined Symbol: apr_array_clear does not exist in the mod_dir.so library, but does not define apr_array_clear in the library
If the source code package is used for installation and compilation, add -- With-embedded ded-Apr, And put APR and APR-util in the srclib of the httpd decompression directory. Then, try again;
If apt-Get is installed, search the entire system to see if there are multiple mod_dir.so libraries in the system. Apache does not load as expected.
4. Configure: Error: PCRE-config for libpcre not found. PCRE is required and available from http://pcre.org/
#./Configure-help | grep PCRE
-- With-PCRE = path use external PCRE Library
Download: http://sourceforge.net/projects/pcre
5. How to specify the location of the Apache main configuration file httpd. conf
During compilation and installation, you can specify the installation path of the configuration file./configure -- sysconfdir =/etc/httpd
1. Download the source file and decompress it to the decompressed directory.
2../configure -- prefix =/home/work/local/httpd -- sysconfdir =/home/work/local/httpd-enable-so
3. Make
4. Make install
5. Start apachect1 start'
Non-root users cannot start port 80, so you need to modify the HTTP. conf file and change the master port to something like listen 8888.
Ii. Install MySQL (work)
Http://dev.mysql.com/doc/refman/5.1/en/binary-installation.html
Dev.mysql.com/doc/
Download mysql-5.1.x (note mysql-5.5.x requires cmake installation)
After decompression, enter the mysql-5.1.x directory:
./Configure -- prefix =/home/work/local/mysql5
Make & make install
Add the my. CNF configuration file under/home/work/mysql5/and modify the configuration
Then:
CD/home/work/mysql5/bin
./Mysql_install_db
./Mysqld_safe &
3. install PHP (work)
1. Install libxml2
Http://www.linuxfromscratch.org/blfs/view/cvs/general/libxml2.html
Download libxml2-sources-2.7.7.tar.gz and decompress it. Install make to/home/work/local/libxml2
3. install PHP
Decompress php-5.3.6.tar.bz2 and enter the Directory
/Configure -- prefix =/home/work/local/PHP \
-- With-apxs2 =/home/lidan3/local/httpd/bin/apxs \
-- With-config-file-Path =/home/lidan3/local/PHP/etc \
-- With-mysql =/home/lidan3/local/mysql5 \
-- With-libxml-Dir =/home/lidan3/local/libxml2 \
-- With-JPEG-Dir \
-- With-PNG-Dir \
With-bz2 \
-- With-FreeType-Dir \
-- With-iconv-Dir \
Make & make install
Add the following to HTTP. conf:
Addtype application/X-httpd-PHP. php
At the same time, add index. php to the end of directoryindex.
Restart Apache:
CD/home/work/local/apache2/bin;./apachectl-K restart