装系统
安装Centos7:https://www.cnblogs.com/blakflash000/p/9816213.html
开网络
-
启动网卡
cd /etc/sysconfig/network-scripts
vi ifcfg-em3
-
设置静态IP
修改ifcfg-em2文件的内容:
#设置网卡获得ip地址的方式,选项可以为static,dhcp或bootp
BOOTPROTO=static
#设置静态IP
IPADDR=***.***.***.***
#系统启动时是否设置此网络接口,设置为yes时,系统启动时激活此设备
ONBOOT=yes
- 重启网卡
systemctl restart network
装环境
安装LAMP环境
- 安装Apache HTTP服务器
yum –y install httpd
#完成后开启httpd服务,并且让其在重启系统时自启动。
systemctl start httpd.service
systemctl enable httpd.service
#接着配置防火墙允许服务器被外部访问
firewall-cmd --permanent --add-service=http
firewall-cmd –reload
systemctl res