Everyone needs to be careful and patient. You will experience these during the installation process. Please correct and criticize any incorrect points.
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
Among them libxml2-2.6.11 I downloaded in /usr/ Directory
Others are downloaded in the /usr/down directory. These directories will be used in the following installation process
For the PHP environment configuration under windows, please refer to http://www.jb51.net /article/8569.htm
Installation prerequisites
Installing GCC
Linux and C are inherently confused The main part of the LINUX kernel is written in C. In addition, many service software under Linux are written in C.
For example, MSSQL and Apache are written in C. If you do not need to install the gcc compiler, simply install these software. No
If you have similar information above, you already have GCC. If you don’t have it, please get the installation CD and install it first
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 in the figure
2. If gcc is not installed yet, in front of the development tools The check is not checked. Check the development tools. Click Update in the lower right corner. As shown in the figure
During the installation process, you will be prompted to insert the Linux system disk. Insert the system disk to complete the installation
Install libxml2
1. Click Red Hat Menu> System Tools> Terminal
2. Enter the command cd /usr/ and press Enter
to enter the directory where the libxml2 source code is located
3. Execute tar -zxvf libxml2-2.6.11.tar.gz
to decompress the libxml2 source code .As shown in the picture
4. The system automatically lists each decompression item.
Tips: After the decompression is completed, you can execute the clear command to clear the screen
As shown in the picture
5. Execute cd libxml2-2.6.11
to enter the decompressed directory, as shown in the figure
6. Execute ./configure
as shown in the picture
7. Execute make
to compile the source code. As shown in the picture
some source codes take quite a long time to compile. Everyone Be patient
8. Execute make install
to install libxml2. As shown in the figure
More articles php Fan site http://www.phpfans.net
Install MySQL
1. Execute cd /usr/down
to go to the directory where the mysql source code is located.
Execute ls -l
to list the file list in the current directory, as shown in the figure
2. Execute groupadd mysql
as shown in the picture
3. Execute useradd -g mysql mysql
as shown in the picture
4. Execute tar -zxvf mysql-5.0.37.tar.gz
to decompress the mysql source code. As shown in the figure
5. Execute cd mysql-5.0.37
to enter the newly decompressed directory, as shown in the figure
6. Execute ./configure --prefix=/server /mysql
The prefix parameter specifies the mysql installation directory. We install it in the /server/mysql directory. As shown in the figure
7. Execute make
as shown Figure
8. Execute make install
As shown in
9. Execute /server/mysql/bin /mysql_install_db --user=mysql
As shown in the figure
10. Execute cp support-files/my-medium.cnf /etc/my.cnf
Copy the mysql configuration document to the /etc/ directory and save it as my.cnf
as shown in the figure
11. Execute cp support-files/mysql.server /etc/ rc.d/init.d/mysqld
as shown in the figure
12. Execute chmod 700 /etc/rc.d/init.d/mysqld
as shown Figure
13. Execute chkconfig --add mysqld
As shown in
14. Execute cd /server /mysql
Enter the mysql installation directory.
And execute chown -R root.
Note: Do not miss the "." at the end. As shown in the figure
15. Execute chown -R mysql var
As shown in the picture
16. Execute chgrp -R mysql.
Don’t miss the ".".As shown in 🎜>
17. Execute /server/mysql/bin/mysqld_safe --user=mysql &
Start mysql. As shown in the figure
18. When mysqld ended appears, click Enter and return to the command line
as shown in the figure
19. Execute bin/mysql -u root -p
Log in to mysql. As shown in the figure
20. The system will prompt you to enter the password. Since we did not set a password during installation, the default password is empty. Click back directly. Car enter
as shown in
21. When the following interface appears, it means that mysql is installed and ready for use.
as shown in
22. Let’s test mysql now.
Enter selcet version();
View the version of mysql
Note: The sql statement must end with ";"
More Article php fans site http://www.phpfans.net
23. As you can see, it is indeed the mysql-5.0.37 we just installed
as Figure
24. Execute quit;
to exit the mysql command line.
安装Apache
1. 执行 cd /usr/down
回到apache源码所在目录.如图
2. 执行 tar -zxvf httpd-2.2.4.tar.gz
如图
3. 执行 cd httpd-2.2.4
如图
4. 执行 ./configure --prefix=/server/apache --enable-so
如图
5. 执行 make
6. 执行 make install
7. 执行 /server/apache/bin/apachectl start
启动apache.如图
8. 在浏览器打开 http://localhost/ 或者 http://127.0.0.1
如果出现如下界面则说明apache已经安装好了
安装php
1. 执行 cd /usr/down
回到php源码所在目录.如图
2. 执行 tar -zxvf php-5.2.1.tar.gz
如图
3. 执行 cd php-5.2.1
如图
4. 执行 ./configure --prefix=/server/php --with-mysql=/server/mysql --with-apxs2=/server/apache/bin/apxs
5. 执行 make
6. 执行 make install
7. 执行 cp php.ini-dist /usr/local/lib/php.ini
如图
更多文章 php爱好者站 http://www.phpfans.net
配置Apache关联php