1.
# Yum Install PHP
(Relying on the package httpd also down the way)
# Systemctl Start Httpd.service
# Firewall-cmd--add-service=http
(Firewall unblock HTTP service)
# Firewall-cmd--permanent--add-service=http
(Firewall to unblock HTTP Service write config file)
(Can view/etc/firewalld/zones/public.xml and/usr/lib/firewalld/services/http.xml)
(PHP and HTTPD are now installed)
2.
# yum List MySQL
(No package ...) Awkward
(Go to http://dev.mysql.com/downloads/repo/yum/for a look)
# yum Install wget
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
# RPM-IVH mysql-community-release-el7-5.noarch.rpm
# yum Install MySQL Mysql-server
# Systemctl Start Mysqld.service
# mysql_secure_installation
(according to the prompt to set the password, the remaining options are lost Y, the special circumstances of their own judgment)
# mysql-u Root-p
(Password test succeeded)
Mysql> Grant all privileges on * * to ' lane ' @ '% ' identified by ' 123456 ' with GRANT option;
(User name Lane password 123456 allows all IP logins to give * *, all permissions, this is very dangerous, I am here to do the virtual machine test does not matter, the actual production environment, do not execute such a command)
mysql> flush Privileges;
Mysql> quit;
# Firewall-cmd--add-service=mysql
# Firewall-cmd--permanent--add-service=mysql
# yum Install Php-mysql
(Installation complete)
# systemctl Restart Httpd.service
# systemctl Restart Mysqld.service
lane-centos7-installing lamp as a Web service