1.安装wget
yum install -y wget
2.备份配置文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
3.下载国内yum源文件(centOs7,比如阿里)
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
(红帽同理 (RHEL 7))
(wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo)
4.清理缓存: yum clean all
5.重新生成缓存: yum makecache
Centos创建用户
添加用户:useradd 用户名
设置密码:passwd 用户名 回车输入两遍密码
授权:whereis sudoers
编辑权限:vim /etc/sudoers(在此文件夹中增加用户和权限) I插入 esc键:wq!保存
下一篇:基于微信小程序的一款小程序版知乎