Centos7 use the yum command to install the LAMP environment (php + Apache + Mysql) and php extension, centos7yum
1. yum-y update // update the system
2. Install mysql
(2.1) yum-y install mariadb-client mariadb-server mariadb-devel
2.2) start: systemctl start mariadb. service
2.3) set the automatic start: systemctl enable mariadb
2.4) set the root password: mysqladmin-u root password "123456"
2.5) set root Remote Access: log on to mysql => use mysql; => update user set host = '%' where user = 'root' and host = 'localhost '; => flush privileges; => exit; => systemctl restart mariadb. service
3. install apache
(3.1) yum-y install httpd
3.2) start: systemctl start httpd. service
3.3) set the automatic start: systemctl enable httpd
4. Install php7
4.1) Please refer to https://webtatic.com/packages/php70/
4.2) rpm-Uvh https://Dl.fedoraproject.org/Pub/Epel/Epel-release-latest-7.noarch.rpm
4.3) rpm-Uvh https://Pai.webtatic.com/Yum/El7/Webtatic-release.rpm
4.4) yum-y install php70w php70w-opcache php70w-common php70w-fpm php70w-mbstring
4.5) after installing php, restart httpd and systemctl restart httpd.
5. Install phpredis Extension
(5.1) yum-y install redis php-redis
5.2) restart httpd and systemctl restart httpd
6. Deployment successful