1. Environment
Host environment: ubuntu10.10
Virtual Machine: virtualbox 3.2.8
Centos version: cenos 5.4 (:Http://www.verycd.com/topics/2776496/)
Software Installation is all the yum commands that come with the system.
2. the VM installation process is very simple. I Want To Know About Baidu.
3. Install MySQL
Terminal code: Yum install MySQL mysql-Server
Set MySQL to boot: chkconfig -- levels 235 mysqld on
Start MySQL service:/etc/init. d/mysqld start
Set the MySQL connection password:Mysqladmin-u Root Password thepassword
4. install Apache
Terminal code: Yum install httpd
Set boot start: chkconfig -- levels 235 httpd on
Start Apache:/etc/init. d/httpd start
After accessing 127.0.0.1, you can see that Apache is successfully started:
5. Build a PHP Environment
Terminal command: Yum install PHP
Restart Apache:/etc/init. d/httpd restart
6. Connection between PHP and Apache
Terminal command: Yum search PHP (find the package to be installed)
Terminal command: Yum install PHP-mysql PHP-Gd PHP-imap PHP-ldap php-odbc php-pear PHP-xml php-XMLRPC
Restart Apache:/Etc/init. d/httpd restart
7. Check whether the operation is successful.
Create info. php under/var/www/html/. The content is as follows:
<? PHP
Phpinfo ()
?>
Browse: 127.0.0.1/info. php to view the connection status,