1. Installation Environment
Operating system: Red Hat Linux Enterprise as 4.0
Database: MySQL 5.0.24
Web server: Apache 2.2.3
Scripting language: PHP 5.1.6
2. Install MySQL 5.0.24
-------------Download package mysql-5.0.24.tar.gz, address http://www.mysql.com-------------
# tar ZVXF mysql-5.0.24.tar.gz//Decompression
# CD mysql-5.0.24//into the uncompressed file directory
#./configure--prefix=/usr/local/mysql \/Set installation directory
--enable-thread-safe-client \//Compile thread safe version of client library
--without-debug \//Turn off the debug feature
--localstatedir=/data/mysqldata \//Set database file directory
# Make//Compile
# make install//installation
#/USR/LOCAL/MYSQL/BIN/MYSQL_INSTALL_DB//initialization authorization
# chown–r Root:root/usr/local/mysql//File attribute changed to root user
# CP/USR/LOCAL/MYSQL/SHARE/MYSQL/MY-MEDIUM.CNF/ETC/MY.CNF//Copy configuration file
----------------------------------start the MySQL service----------------------------------
#/usr/local/mysql/bin/mysqld_safe--user=root &/Start MySQL
----------------------------------Modify the MySQL password----------------------------------
#/usr/local/mysql/bin/mysqladmin-uroot Password mysqlsecret//Change Password
----------------------------------shut down the MySQL service----------------------------------
#/usr/local/mysql/bin/mysqladmin-uroot-pmysqlsecret shutdown//close MySQL
3. Install Apache 2.2.3
-------------Download 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
--------------------- -------------turn off 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 package php-5.1.6.tar.gz, address 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 Apache service's httpd.conf file
* Add LoadModule php5_module to LoadModule place module/libphp5.so
* Add index.php at DirectoryIndex Place
* Add at AddType application
AddType application/x-httpd-php. php. phtml
AddType Applicatoin/x-httpd-php-source. Phps