1、安装准备:
Centos7保证网络连通,如果网络不能连通,可通过配置yum源使用代理服务。
vim /etc/yum.conf
The proxy server - proxy server:port
proxy=http://192.168.178.1:8080
The account details for yum connections
proxy_username=yum-user
proxy_password=qwerty
2、关闭SELinux、防火墙
sudo sed -i ‘s/^SELINUX=enforcing$/SELINUX=permissive/g’ /etc/selinux/config
systemctl stop firewalld.service
systemctl disable firewalld.service
centos7默认防火墙为firewalld,若已经安装iptables,可关闭iptables或者打开80端口,不然后续http请求失败
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
service iptables save
service iptables restart
3、执行以下命令启用EPEL仓库
yum install deltarpm epel-release
yum update
若内核更新,reboot重启虚拟机
4、安装环境使用依赖包
yum in