上网问题
1.查找位置
ls /etc/sysconfig/network-scripts/
-
编辑配置文件:vim ifcfg-ens33 修改ONBOOT=no 为 ONBOOT=yes
-
service network restart
sshd开启
-
vi /etc/ssh/sshd_config
-
听端口、监听地址前的 # 号去除
-
密码验证登录
-
sudo service sshd start
安装源配置
- yum -y install wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
yum下载文件的缓存位置
[root@localhost ~]# ls /var/cache/yum/x86_64/7/base/packages/
[root@localhost ~]# ls /var/cache/yum/x86_64/7/extras/packages/
[root@localhost ~]# ls /var/cache/yum/x86_64/7/updates/packages/
可以在 /etc/yum.conf 指定
cachedir=/var/cache/yum #存放目录
keepcache=1 #1为保存 0为不保存
metadata_expire=1800 #过期时间