


php5 MySQL5 Apache2 phpMyAdmin ZendOptimizer installation and configuration under Linux [Picture and Text]_PHP Tutorial
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
More articles php fan site http://www.phpfans.net
11. Click the Esc key. Return to the vi command line.
Enter: wq and click back Car
where:wq is the command to save and exit
As shown

Install ZendOptimizer
1. Execute cd /usr/down
to return to the directory where the ZendOptimizer source code is located. As shown in the figure

2. Execute tar -zxvf ZendOptimizer -3.2.6-linux-glibc21-i386.tar.gz
As shown in the picture

3. Execute cd ZendOptimizer-3.2.6-linux-glibc21-i386
As shown in the picture

4. Execute ./install

5. Enter the following ZendOptimizer installation interface. Click Press Enter
as shown in the picture

6. Click Enter
as shown in the picture

7. In Click Enter on Yes

8. Fill in the ZendOptimizer installation path here. We will install it under /server/ZendOptimizer
. Fill in /server/ZendOptimizer and click Tab button. Click Enter on ok
as shown in the picture

9. Select the location of php.ini here. We have copied php.ini in the previous installation It’s under /usr/local/lib
. So there is no need to modify it here. Click Enter on OK
More articles php fans site http://www.phpfans.net

10. We are using apache. Click Enter on Yes

11. Fill in the location of apachectl here. Ours is at / 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 the picture

12. Click Enter

13. Click Enter

14. Click Enter to restart apache

15. Click Enter to complete the installation of ZendOptimizer

environment Test
After the installation is complete, let’s test whether the previously configured environment is correct
1. Restart apache again. Execute /server/apache/bin/apachectl -k restart
Although apache has been restarted when installing ZendOptimizer, we still need to execute the following command to restart apache
to ensure that the modified configuration of apache has been reloaded. Please be sure not to miss this step.
as shown in

2. Execute vi /server/apache/htdocs/phpinfo.php
to create a phpinfo.php file in the root directory of the website. As shown in the figure
where /server /apache/htdocs/ is the root directory of our website. We just need to put the web page here
More articles php fans site http://www.phpfans.net

3. Click the i key to enter the insert editing mode. As shown in the figure

4. Enter
phpinfo();
?>
As shown in the picture

5. Click the Esc key to return to the vi command line. Enter: wq and press Enter
The system will save phpinfo. php file, and exit the vi editor
as shown in the figure

6. Open http://localhost/phpinfo.php in the browser
If the following interface appears It means that php has been installed. If a download dialog box appears, please look down, there are solutions

If a download dialog box appears This interface. Please confirm that you have done the first step of environment testing: execute /server/apache/bin/apachectl -k restart.
If it still doesn’t work, it is recommended to restart Linux. Then execute /server/apache/bin/apachectl start starts apache. It should be fine.

7. Test whether php is associated with mysql.
Execute vi /server/apache/htdocs/test.php
I forgot to take a screenshot of this step. Just execute it.
8. Click the i key to enter the insert editing mode. And enter
//phpfans http://www.phpfans. net
$conn = mysql_connect("localhost","root","");
if($conn) echo "
succeed
";else echo "< h1>fail":
?>
As shown in the picture

9. Click the Esc key to return to the vi command line mode. And enter: wq and then click Enter
as shown in the picture

10. Open http://localhost/test.php in the browser
If the following interface appears, it means php Mysql has been successfully associated

Install phpMyAdmin
1 . Execute cd /usr/down
to return to the directory where the phpmyadmin source code is located. As shown in the figure

2. Execute tar -zxvf phpMyAdmin-2.10.0.2-all-languages. tar.gz
Extract phpmyadmin. As shown in the figure

3. Execute cp -r phpMyAdmin-2.10.0.2-all-languages/ /server/apache/htdocs/phpmyadmin /
Cut phpmyadmin to the root directory of the website. As shown in the figure

4. Open http://localhost/phpmyadmin/
in the browser and it will appear The following interface shows that phpmyadmin is installed as

Please familiarize yourself with the specific functions of phpMyAdmin and will not go into details here.
under red hat 9

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

Gate.io is a highly acclaimed cryptocurrency trading platform known for its extensive token selection, low transaction fees and a user-friendly interface. With its advanced security features and excellent customer service, Gate.io provides traders with a reliable and convenient cryptocurrency trading environment. If you want to join Gate.io, please click the link provided to download the official registration installation package to start your cryptocurrency trading journey.

This tutorial guides you through installing and configuring Nginx and phpMyAdmin on an Ubuntu system, potentially alongside an existing Apache server. We'll cover setting up Nginx, resolving potential port conflicts with Apache, installing MariaDB (
