1:安装rpm源
1 | rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm |
2:安装php
1 | yum install php71w php71w-cli php71w-common php71w-devel php71w-embedded php71w-fpm php71w-gd php71w-mbstring php71w-mysqlnd php71w-opcache php71w-pdo php71w-xml php71w-ldap php71w-mcrypt |
3:启动服务
1 | service php-fpm start |
4:版本检查
1 | php -v |
1:添加yum源
1 | sudo rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm |
2:安装
1 | sudo yum install nginx |
3:设置开机启动(可忽略)
1 | sudo systemctl enable nginx |
4:启动服务
1 | sudo systemctl start nginx |
5:打开防火墙端口
1 | sudo firewall-cmd --zone=public --permanent --add-service=http |
1:安装
1 | yum install httpd |
2:设置开机启动(可选)
1 | systemctl enable httpd.service |
3:Apache相关操作
1 | systemctl is-enabled httpd.service |