1. installation environment
Operating System: Red Hat Linux Enterprise as 4.0
Database: MySQL 5.0.24
Web server: Apache 2.2.3
Script Language: PhP 5.1.6
2. Install MySQL 5.0.24
-------------Download Software Package mysql-5.0.24.tar.gz, address http://www.mysql.com -------------
# Tar zvxf mysql-5.0.24.tar.gz // Extract
# Cd mysql-5.0.24 // enter the decompressed file directory
#./Configure -- prefix =/usr/local/MySQL \ // set the installation directory
-- Enable-thread-safe-client \ // compile the client library of thread security Edition
-- Without-Debug \ // disable the debug function
-- Localstatedir =/data/mysqldata \ // set the database file directory
# Make // compile
# Make install // install
#/Usr/local/MySQL/bin/mysql_install_db // initialize authorization
# Chown-r root: Root/usr/local/MySQL // change the file attribute to the root user
# Cp/usr/local/MySQL/share/MySQL/my-medium.cnf/etc/My. CNF // copy the configuration file
---------------------------------- Start the MySQL service ----------------------------------
#/Usr/local/MySQL/bin/mysqld_safe -- user = root & // start MySQL
-------------------------------- Change the MySQL password ----------------------------------
#/Usr/local/MySQL/bin/mysqladmin-uroot password mysqlsecret // change the password
---------------------------------- Close the MySQL service ----------------------------------
#/Usr/local/MySQL/bin/mysqladmin-uroot-pmysqlsecret shutdown // close MySQL
3. install Apache 2.2.3
-------------Download Software Package httpd-2.2.3.tar.gz, address http://www.apache.org -------------
# Tar zvxf httpd-2.2.3.tar.gz
# Cd httpd-2.2.3
#./Configure -- prefix =/usr/local/apache \
-- Enable-module = most \
-- Enable-shared = max
# Make
# Make install
---------------------------------- Start the apache service ----------------------------------
#/Usr/local/Apache/bin/apachectl start
---------------------------------- Close the apache service ----------------------------------
#/Usr/local/Apache/bin/apachectl stop
-------------------------------- Restart the apache service ----------------------------------
#/Usr/local/Apache/bin/apachectl restart
4. install PHP 5.1.6
-----------------Download the software package php-5.1.6.tar.gz at www.php.net --------------------
# Tar zvxf php-5.1.6.tar.gz
# Cd php-5.1.6
#./Configure -- prefix =/usr/local/PHP \
-- With-mysqld =/usr/local/MySQL \
-- With-apxs2 =/usr/local/Apache/bin/apxs
# Make
# Make install
# Cp PHP. ini-Dist/usr/local/PHP/lib/PHP. ini
5. Configure the httpd. conf file of the Apache service
* Add loadmodule php5_module module/libphp5.so to loadmodule.
* Add index. php at directoryindex
* Add in addtype Application
Addtype application/X-httpd-PHP. php. phtml
Addtype applicatoin/X-httpd-PHP-source. PHPs