- 查看网络
# ip addr
- 编辑网络
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
ONBOOT="yes"
IPADDR = "[在这里输入你的静态 IP]"
GATEWAY = "[输入你的默认网关]"
NETMASK="【子网掩码】"
DNS1 = "[你的DNS 1]"
DNS2 = "[你的DNS 2]"
# service network restart
- 更换yum源
# yum install wget
# cd /etc/yum.repo.d
# mv CentOS-Base.repo CentOS-Base.repo.bak
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# yum makecache
- 基础包安装
# yum groupinstall base -y
# yum install gcc gcc-c++ -y
# yum install net-tools -y
# yum install psmisc -y //centos7没有killall命令,要先安装
# yum install vim -y
# yum update -y
网友评论