1, software environment
Linux version: redhat 6.2 Select full installation when installing
Apache version: apache_1.3.9.tar.gz
PHP version: PHP-4.0.2.tar.gz
MySQL version: mysql-3.23.38-1.i386.rpm
MySQL management: phpmyadmin.tar.gz
2, installation process
1) Install mysql
Because the RPM package is very simple and the success rate is high, I choose this installation.
method:
Clicking on this file under xwindows.
Enter the prompt:
Rpm -i mysql-3.23.38-1.i386.rpm
2) Install Apache and PHP
Note: Apache and PHP are installed together, this must be understood.
Proceed as follows:
a, first determine the path after Apache installation
b, install and compile PHP, install PHP as Apache modules to Apache installation path (ie apache decompressed path)
c, Install and compile Apache Because only first put the PHP as an Apache module (ie, the decompressed path of Apache), install Apache can make the apache execute a PHP file.
start installation:
Unpleaged files:
Tar zxvf apache_1.3.9.tar.gz
TAR ZXVF PHP-4.0.2.tar.gz
Configure Apache to determine the path after Apache installation:
CD Apache_1.3.9 ./configure --Prefix = / usr / local / apache
Enter the PHP decompression directory, enter:
./configure --with-apache = .. / apache_1.3.9 --with-mysql --disable-debug --enable-track-vars
Note: "../ Apache_1.3.9" indicates the decompression path of Apache. This path must be correct, I am putting Apache and PHP decompressed under the same path. This is to let PHP are installed as Apache's modules and Apache.
Next: Compile, install the original directory of PHP to Apache
Enter the prompt:
Make
Enter it after completion:
Make Install
Copy php.ini.dist to this directory: / usr / local / lib, and renamed PHP.ini
CP php.ini.dist / usr / local / lib
The last step is to install Apache
Enter the decompression directory input:
./configure --Prefix = / usr / local / apache --activate-module = src / modules / php4 / libphp4.a
Next:
Make
Make Install
To this installation work is completed.
You still need to change some places to let Apache execute PHP, as follows:
Edit Apache Profile:
/usr/local/apache/conf/httpd.conf
Find this line:
AddType Application / X-httpd-php3 .php3
Remove the front "#".
Plus the following lines:
AddType Application / X-httpd-php .php
AddType Application / X-httpd-php .php4
Restart Apache:
CD / usr / local / apache / bin ./apachectl restart
Test Apache and PHP under the browser with the following file:
Test.php
PHPINFO ();
?>
If there is information about PHP, you have succeeded! Pay attention to case!
Manage MySQL with phpMyadmin
Put the decompressed phpMyadmin directory into your apache's HTDOCS directory, modify this file to become Chinese interface: config.inc.php
Find a line of "English" words, change "English" to "Chinese_GB" storage, which is completed. This will then go to the browser to execute the index.php file in this directory, which should have a mysql management interface and it is also Chinese, is it very comfortable!