略
centos7 初始 不联网
1.更改虚拟机网络链接为 桥接模式,并启用网络链接


2 修改配置文件
cd /etc/sysconfig/network-scripts/
vi ifcfg-en33 # en33 会有差异
修改文件中的ONBOOT=yes
3 配置静态ip

重启
service network restart
更新yum
1 安装wget
yum install wget
2 更换yum 源
备份一下原本的yum源:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载阿里云的yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
生成缓存
yum makecache
3 更新
yum update
配置ssh
检查有没有安装ssh服务:
rpm -qa | grep ssh

如果没有安装ssh服务就安装 :
yum install openssh-server
安装好后在ssh配置文件里进行配置 :
vi /etc/ssh/sshd_config


开启ssh服务
/bin/systemctl start sshd.service
检查ssh服务是否开启
ps -e | grep sshd
</