ip add # 获取网卡信息
vi /etc/sysconfig/network-scripts/ifcfg-eth0
HWADDR="00:00:00:F3:A2:DD"
BOOTPROTO=STATIC
IPADDR=192.168.129.129
NETMASK=255.255.255.0
GATEWAY=192.168.129.2
DNS1=114.114.114.114
IPV6INIT=NO
# IPV6*
# UUID
ONBOOT=YES
systemctl restart network.service # 重启网络设置
ping baidu.com # 检测网络
yum upgrade
yum install perl* # 安装Perl
更换yum源
ll /etc/yum.repos.d/
mkdir /opt/centos-yum.bak # 把默认Yum源备份
mv /etc/yum.repos.d/* /opt/centos-yum.bak/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo # 下载aliyun Yum源repo文件
yum clean all //清除缓存
yum makecache //把Yum源缓存到本地,加快软件的搜索好安装速度
yum list //总共列出了9954个包
yum -y install vim //测试
网友评论