We need to be careful and patient. These are in the process of installation you will be able to understand. The wrong place to correct the criticism.
This example is under Red Hat 9
php5.2.1
apache2.2.4
MySQL5.0.37
phpmyadmin2.10.0.2
ZendOptimizer-3.2.6
libxml2-2.6.11
Installation and configuration of
where libxml2-2.6.11 i download in the/usr/directory
Others are downloaded in the/usr/down directory. These directories are used during the installation process below
About the PHP environment configuration under Windows can refer to http://www.jb51.net/article/8569.htm
Installation Prerequisites
Installing GCC
Linux and C are inherently inseparable, the main part of the Linux kernel is written in C, and many other Linux service software is written in C,
If the Mssql,apache is written in C. If you don't install the GCC compiler, the software is not installed.
There is a similar message that already has GCC, if you do not, please take the installation CD first and install it.
Thread model:posix gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)
1. Click the Red Hat menu > System settings > Add/Remove Applications as shown
2. If GCC is not installed, the hook on the front of the development tool is not on the hook. Check the development tools. Click on the lower right corner of the update.
You will be prompted to insert the Linux system disk during installation. Insert System disk Complete installation
Install LIBXML2
1. Click the Red Hat menu > System Tools > Terminal
2. Enter Command cd/usr/carriage return
Enter LIBXML2 Source Directory
3. Implementation of TAR-ZXVF libxml2-2.6.11.tar.gz
Extract LIBXML2 source code. As shown
4. The system automatically lists each decompression item.
Small tip: After the decompression is complete, you can execute clear command screen
As shown in figure
5. Perform CD libxml2-2.6.11
Enter the extracted directory.
6. Implementation./configure
As shown in figure
7. Execute make
Compile the source code, as shown
Some of the source code compiled at a considerable time. We must be patient.
8. Execute make Install
Install LIBXML2. As pictured
More articles PHP enthusiasts station http://www.phpfans.net
installing MySQL
1. Executive Cd/usr/down
Go to MySQL source directory.
Execute ls-l
You can list the file lists for the current directory.
2. Execute Groupadd MySQL
As shown in figure
3. Execute useradd-g mysql MySQL
As shown in figure
4. Implementation of TAR-ZXVF mysql-5.0.37.tar.gz
Extract the MySQL source code, as shown
5. Perform CD mysql-5.0.37
Enter the directory you just extracted.
6. Implementation./configure--prefix=/server/mysql
Where the prefix parameter indicates the MySQL installation directory. We'll install it in the/server/mysql directory.
7. Execute make
As shown in figure
8. Execute make Install
As shown in figure
9. Implementation of/server/mysql/bin/mysql_install_db--user=mysql
As shown in figure
10. Perform CP support-files/my-medium.cnf/etc/my.cnf
Copy the MySQL configuration document to the/etc/directory and save as MY.CNF
As shown in figure
11. Perform CP Support-files/mysql.server/etc/rc.d/init.d/mysqld
As shown in figure
12. Implementation of chmod 700/etc/rc.d/init.d/mysqld
As shown in figure
13. Implementation of Chkconfig--add mysqld
As shown in figure
14. Executive Cd/server/mysql
Enter the MySQL installation directory.
and executes Chown-r root.
Note: Do not omit the "." In the back. As shown in figure
15. Execute Chown-r mysql var
As shown in figure
16. Execute Chgrp-r MySQL.
Don't miss the ".". As shown in figure
17. Executive/server/mysql/bin/mysqld_safe--user=mysql &
Start MySQL. As pictured
18. In the presence of mysqld ended. Click Enter. Back to command line
As shown in figure
19. Implementation of Bin/mysql-u Root-p
Login to MySQL. As pictured
20. The system prompts for a password. Because we did not install the password. So the default password is empty. Click Enter directly
As shown in figure
21. The following interface shows that MySQL is installed and ready to use.
As shown in figure
22. Let's test MySQL now.
Enter Selcet version ();
View the version of MySQL
NOTE: The SQL statement should be ";" End
More articles PHP enthusiasts station http://www.phpfans.net
23. As you can see, we just installed the mysql-5.0.37.
As shown in figure
24. Implementation of quit;
Exit the MySQL command line.
Install Apache
1. Executive Cd/usr/down
Back to the Apache source directory.
2. Implementation of TAR-ZXVF httpd-2.2.4.tar.gz
As shown in figure
3. Perform CD httpd-2.2.4
As shown in figure
4. Implementation./configure--prefix=/server/apache--enable-so
As shown in figure
5. Execute make
6. Execute make Install
7. Execute/server/apache/bin/apachectl Start
Start Apache.
8. Open http://localhost/or http://127.0.0.1 in the browser
If the following interface appears, Apache is already installed
Installing PHP
1. Executive Cd/usr/down
Back to the PHP source directory.
2. Implementation of TAR-ZXVF php-5.2.1.tar.gz
As shown in figure
3. Perform CD php-5.2.1
As shown in figure
4. Implementation./configure--prefix=/server/php--with-mysql=/server/mysql--with-apxs2=/server/apache/bin/apxs
5. Execute make
6. Execute make Install
7. Perform CP Php.ini-dist/usr/local/lib/php.ini
As shown in figure
More articles PHP enthusiasts station http://www.phpfans.net
Configure Apache associated PHP
The hidden contents of this post need to reply before you can browse
More articles PHP enthusiasts station http://www.phpfans.net
11. Click Esc. Back to VI command line mode.
Input: Wq then click Enter
Where: Wq is the command to save and exit
As shown in figure
Install Zendoptimizer
1. Executive Cd/usr/down
Back to Zendoptimizer source directory. As shown
2. Implementation of TAR-ZXVF zendoptimizer-3.2.6-linux-glibc21-i386.tar.gz
As shown in figure
3. Perform CD zendoptimizer-3.2.6-linux-glibc21-i386
As shown in figure
4. Implementation./install
5. Enter the following Zendoptimizer installation interface. Click Enter
As shown in figure
6. Click Enter
As shown in figure
7. Click on Yes to enter
8. Fill in the Zendoptimizer installation path here. We'll install it in/server/zendoptimizer.
After filling in the/server/zendoptimizer, click the Tab key. Click Enter on OK
As shown in figure
9. Select the location where PHP.ini is located. We have php.ini replicated to/usr/local/lib in our previous installation.
. So there's no need to change. Click Enter on OK
More articles PHP enthusiasts station http://www.phpfans.net
10. It's Apache we use. Click Enter on Yes
11. Fill in the Apachectl position here. We're in/server/apache/bin/apachectl.
After entering/server/apache/bin/apachectl, click the Tab key to move the cursor to OK. Then click Enter
As shown in figure
12. Click Enter
13. Click Enter
14. Click Return to restart Apache
15. Click Enter to complete Zendoptimizer installation
Environmental Testing
After the installation is complete. Let's test if the environment was configured correctly.
1. Restart Apache again. Execute/server/apache/bin/apachectl-k Restart
Although the Apache was restarted when the Zendoptimizer was installed, we still have to do the following to restart Apache
To ensure that the Apache modified configuration has been reloaded. Please do not miss this step.
As shown in figure
2. Executive vi/server/apache/htdocs/phpinfo.php
Create a phpinfo.php file in the root directory of the Web site. As shown in
Where/server/apache/htdocs/is our web site root directory. We just need to put the page in here.
More articles PHP enthusiasts station http://www.phpfans.net
3. Click the I key to enter the Insert edit mode.
4. Input
<?php
Phpinfo ();
?>
As shown in figure
5. Click the ESC key to return to the VI command line. Input: Wq carriage return
The system will save the phpinfo.php file and exit the VI editor
As shown in figure
6. Open http://localhost/phpinfo.php in Browser
If the following interface appears, PHP is already installed. If there is a download dialog box, please look down and there is a solution
If this is the interface. Please confirm that you have done the first step of environmental testing: Perform/server/apache/bin/apachectl-k restart.
If not, it is recommended that you restart Linux again. Then execute/SERVER/APACHE/BIN/APACHECTL start start Apache. It should be all right.
7. Test whether PHP is associated with MySQL.
Execute vi/server/apache/htdocs/test.php
This step forgot to take a screenshot. We'll do it.
8. Click the I key to enter the insert edit mode. and enter
<?php
Phpfans http://www.phpfans.net
$conn = mysql_connect ("localhost", "root", "");
if ($conn) echo "else echo "?>
As shown in figure
9. Click the ESC key to return to the VI command line. and enter: Wq then click Enter
As shown in figure
10. Open http://localhost/test.php in Browser
The following interface will show that PHP has successfully associated MySQL
Install phpMyAdmin
1. Executive Cd/usr/down
Back to phpMyAdmin source directory. As shown
2. Implementation of TAR-ZXVF phpmyadmin-2.10.0.2-all-languages.tar.gz
Extract phpMyAdmin. As pictured
3. Implementation of Cp-r phpmyadmin-2.10.0.2-all-languages//server/apache/htdocs/phpmyadmin/
Cut the phpMyAdmin to the root of the Web site. As shown
4. Open http://localhost/phpmyadmin/in Browser
The following interface shows that phpMyAdmin is installed
phpMyAdmin the specific function, please slowly familiar, here no longer repeat.