Installing Apache
Yum-y Install httpd
Install PHP
Yum-y Install PHP
Installing PHP-FPM
Yum-y Install PHP-FPM
Install MySQL
Yum-y install MySQL
Installing Mysql-server
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
RPM-IVH mysql-community-release-el7-5.noarch.rpm
Yum-y Install Mysql-community-server
Installing Php-mysql
Yum-y Install Php-mysql
Installing the Apache Expansion pack
Yum-y Install httpd-manual mod_ssl mod_perl mod_auth_mysql
Installing the PHP expansion pack
Yum-y Install PHP-GD php-xml php-mbstring php-ldap php-pear php-xmlrpc php-devel
Installing the MySQL expansion pack
Yum-y Install MYSQL-CONNECTOR-ODBC mysql-devel libdbi-dbd-mysql
Configure Apache, MySQL boot
Systemctl Start Httpd.service #启动apache
Systemctl Stop Httpd.service #停止apache
Systemctl Restart Httpd.service #重启apache
Systemctl Enable Httpd.service #设置apache开机启动
Restart the corresponding service
Service mysqld Restart
Service PHP-FPM Start
Service httpd Restart
Replace a high version of PHP
Remove the previous PHP version
Yum Remove php* Php-common
RPM installation PHP7 the corresponding Yum source
RPM-UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Direct Yum Installation PHP7
Yum Install php70w
This article is from the "Scars" blog, make sure to keep this source http://9934547.blog.51cto.com/9924547/1969463
CENTOS7 build lamp (Apache PHP mysql environment)