can refer to, but I install the process is not exactly the same http://www.cnblogs.com/liulun/p/3535346.html
I first installed Apache, directly executed by yum-y install httpd
I checked the Apache-related packages
Install Apache complete
Test
Then install PHP, directly execute the yum-y install PHP
Then found that access to the PHP file directly display the source code, and then executed the
Yum-y Install Httpd-devel
Yum-u Install Php-devel
And then the visit was successful.
Then the MARIADB, because Centos7 has changed to this branch, the last installation of this hole.
But only installs the MARIADB still cannot execute, when connects the database and looks at the mariadb running state, discovers not even, at the same time the service does not rise, as
Then you have to install Mariadb-server,
After the installation is successful and then check his running status, the same is not started but the content is not the same, this time is purely not activated
Connect to the database because there are no passwords
Set boot up
Additional Configuration Reference
Http://www.linuxidc.com/Linux/2016-03/128880.htm
Digression: In fact, the last installation and this process is not quite the same. More direct installation of httpd and Httpd-devel as in the previous connection
Previously written installation steps, changed the port
Install Apache:
Yum Install httpd Httpd-devel
To start Apache:
/ETC/INIT.D/HTTPD start
Enter the server's IP address at this time, you should see the Apache service page, the port does not lose, Apache default is to use 80 port
Profile: Listening port in/etc/httpd/httpd.conf 80 to 81
Install PHP
Yum Install PHP Php-devel
Restart Apache to make PHP effective
/ETC/INIT.D/HTTPD restart
In this case, you can create a php file under directory:/var/www/html/
Code:
<?php phpinfo ();?>
Then access this file, you can see some PHP information, the path of the php.ini configuration file can be seen on this page
Install Extensions for PHP
Yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
You need to restart Apache again after installing the extension
/ETC/INIT.D/HTTPD restart
Installing the PHP Runtime environment on CentOS