You can also use the one-click Auto-Deploy Environment tool, see the user developed this tool
http://www.centos.bz/2013/08/ezhttp-tutorial/
Installation Apache:yum install httpd httpd-devel boot apache:/etc/init.d/httpd Start now enter the IP address of the server, you should see the Apache service page, the port does not lose, Apache default is to use 80 port installation mysql:yum install MySQL mysql-server boot mysql:/etc/init.d/mysqld start installation phpyum install PHP Php-devel restart Apache to make PHP effective/etc/init.d/httpd Restart at this point you can create a php file code in the directory:/var/www/html/:
<?php phpinfo(); ?>
Then access this file, you can see some PHP information, php.ini configuration file path can be seen on this page to install PHP extensions
yum
install
php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpcAfter installing the extension you need to restart apache/etc/init.d/httpd Restart test MySQL link successful php code <?php$con = mysql_connect ("[Email protected]@@", "@@", "@@"), if (! $con) {die (' Could not connect: '. Mysql_error ()); } mysql_select_db ("MyDB", $con); $result = mysql_query ("SELECT * from Sys_user"); while ($row = Mysql_fetch_array ($result)) {echo $row [' UserName ']. " " . $row [' PassWord ']. " " . $row [' id ']; echo "<br/>"; } mysql_close ($con);? > can pass the above code into the directory/var/www/html/can see the implementation of the situation
Build a PHP server environment on CentOS