Home > Backend Development > PHP Tutorial > php5 MySQL5 Apache2 phpMyAdmin ZendOptimizer installation and configuration under Linux [Picture and Text]_PHP Tutorial

php5 MySQL5 Apache2 phpMyAdmin ZendOptimizer installation and configuration under Linux [Picture and Text]_PHP Tutorial

WBOY
Release: 2016-07-21 15:49:08
Original
839 people have browsed it

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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319573.htmlTechArticleEveryone needs to be careful and patient. You will experience these during the installation process. Please correct and criticize any incorrect points. . This example is php5.2.1 apache2.2.4 MySQL5.0.37 phpmyadmin2...
under red hat 9
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template