1.SecureCRT无法连接centos7解决
今日偶然发现我的机器上,secureCRT无法连接到本机vmware上的centos7,一直是连接超时,如下图所示,
问题VMNet8默认网关要与虚拟机的默认网关一致
NAT对应的VMNet8的192.168.22.1
默认的网关:192.168.22.255
虚拟机的ip的地址:192.168.62.131
默认的网关:192.168.62.255
解决方法
修改VMNet8默认网关及IP地址改成与虚拟机的一致
在主机ping 192.168.62.131出现说明已经主机已连到虚拟机上。
在虚拟机上ping 198.168.1.7 说明虚拟机已经连上主机
2、yum无法使用;
Linux(CentOS7)修改默认yum源为国内的阿里云、网易yum源
修改方式:
1 备份当前的yum源
mv /etc/yum.repos.d /etc/yum.repos.d.backup4comex
echo 备份当前的yum源
mv /etc/yum.repos.d /etc/yum.repos.d.backup4comex
echo 新建空的yum源设置目录
mkdir /etc/yum.repos.d
echo 下载阿里云的yum源配置
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
然后重建缓存:
yum clean all
yum makecache
3.执行报错“-bash: wget: command not found”的解决方式
原来默认的centos最小版是没有安装wget的。我们需要先yum安装一下。
回滚配置
cp /etc/yum.repos.d.backup4comex/* /etc/yum.repos.d
然后yum安装wget
yum -y install wget
然后再次获取:
rm -rf /etc/yum.repos.d
mkdir /etc/yum.repos.d
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
**
4.已加载插件:fastestmirror, langpacks File contains no section headers. file: file:///etc/yum.repos.d/con
删除原有的文件:
rm -f /etc/yum.repos.d/CentOS-Base.repo
然后重新下载阿里的:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
清理缓存:
yum clean all
测试下载安装:
yum install gcc
完成!