一.配置当前用户为sudoer缓存
1:切换到root用户ruby
[test@x-sco]$ su root Password: [root@x-sco]#
2 :赋予普通用户root权限网络
编辑/etc/sudoers配置文件,找到下面一行,在root下面添加一行,以下所示:
root ALL=(ALL) ALL
test ALL=(ALL) ALL
修改完毕,如今能够用test账号登陆,而后用命令 su - ,便可得到root权限进行操做。测试
3:退出root用户spa
[root@x-sco
]# exit exit [test@x-sco
]$x-scox-sco
二.配置网络(这一步可在安装时省略)rest
1. 使用root帐户登陆;
2. 切换当前目录:cd /etc/sysconfig/network-scripts/
3. 经过vi ifcfg-enoxxxx打开网络配置文件;
4. 修改网络配置文件并保存:
BOOTPROTO=dhcp(删除或使用#号注释该行,便可开启静态设置模式)
ONBOOT=YES(表示自动加载)
IPADDR0=192.168.1.xxx
GATEWAY0=192.168.1.1
DNS1=192.168.1.1
5. 重启网络服务:
service network restart
6. 使用ifconfig(CentOS 6)或者ip addr/link(CentOS 7)命令查看当前网络状态,测试网络配置是否生效;
三.更换源code
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
二、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
ip
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、
:运行yum makecache生成缓存get
yum clean allit
yum makecache