1、安装centos7.6虚拟机,最好使用最小系统;
2、xshell或者secureCRT远程连接centos系统;
3、安装apache:
a) yum list installed | grep httpd // 查看本地httpd安装包
b) yum install httpd -y
c) systemctl start httpd.service
d) systemctl enable httpd.service // 开机启动
e) systemctl start firewalld // 开启防火墙
f) firewalld-cmd --zone=public --add-port=80/tcp --permanent // 开放80端口
g) firewalld-cmd --reload
g) firewalld-cmd --list-all // 查看80端口是否添加成功
4、安装php7, 不要用安装系统自带的php5
a) 下载php安装包:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
b) yum install php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring php70w-pecl-redis php70w-pecl-memcached php70w-devel
c) 重启php-fpm: service php-fpm restart; 或者重启apache:service httpd restart