完成后就可以重启服务器
reboot
重启完成 , 在查看 ipvs 的配置效果
lsmod | grep --color=auto -e ip_vs -e nf_conntrack
二、报错1 域名解析不了ping: baidu.com: Name or service not known
0curl: (6) Could not resolve host: mirrors.aliyun.com
解决
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens160...GATEWAY="192.168.192.2" # 修改网关地址IPV6_PRIVACY="no"# 域名解析 , 网关也要对DNS1=114.114.114.114DNS2=8.8.8.8
重启
[root@localhost software]# nmcli c reload ens160[root@localhost software]# nmcli c up ens160[root@localhost yum.repos.d]# ping baidu.comPING baidu.com (110.242.68.66) 56(84) bytes of data.64 bytes from 110.242.68.66 (110.242.68.66): icmp_seq=1 ttl=128 time=24.0 ms64 bytes from 110.242.68.66 (110.242.68.66): icmp_seq=2 ttl=128 time=26.5 ms^C--- baidu.com ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 4msrtt min/avg/max/mdev = 24.005/25.233/26.462/1.238 ms
2 yum 安装出错[root@localhost yum.repos.d]# yum -y install epel-releaseCentOS-8 - AppStream81B/s |38B00:00Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
解决
如果仍然需要运行旧CentOS 8 , 可以在/etc/yum.repos中更新repos.d使用vault.centos.org代替mirror.centos.org
修改下面两个文件
cd /etc/yum.repos.dvi CentOS-Base.repovi CentOS-AppStream.repo
CentOS-BaseOS.repo的内容修改为
[baseos]name=CentOS Linux $releasever - BaseOS#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra#baseurl=http://mirror.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/baseurl=https://vault.centos.org/centos/$releasever/BaseOS/$basearch/os/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
CentOS-AppStream.repo的内容修改为
[appstream]name=CentOS Linux $releasever - AppStream#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra#baseurl=http://mirror.centos.org/$contentdir/$releasever/AppStream/$basearch/os/baseurl=https://vault.centos.org/centos/$releasever/AppStream/$basearch/os/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
再执行yum -y install epel-release
命令 , 发现成功了!!
三、安装 k8sCentOS 8.2 安装 kubernetes-1.25.1:https://www.cnblogs.com/huaxiayuyi/p/16794583.html
【CentOS 8.2 对k8s基础环境配置】
经验总结扩展阅读
- redis bitmap数据结构之java对等操作
- Docker | dockerfile构建centos镜像,以及CMD和ENTRYPOINT的区别
- 处女座男对有好感的表现处女座男遇到真爱的表现
- 没有爱情的婚姻也能幸福的星座配对
- 来者不拒是哪些星座对待爱情的态度
- 恋爱中对方做什么会让十二星座特别失望
- 总让人觉得他们已经离婚了的星座配对
- 恋爱期间不会去见对方家长的星座
- 在一起矛盾只会越来越多的星座配对
- 哪些星座配对是大家的爱情榜样