摘要:环境准备虚拟机主机名角色虚拟机需要和外网通信,需要配置配置主机名配置网络代理有条件可选用户名密码代理端口用户名密码代理端口可选,如果访问外网需要代理请正确填写用户名密码代理和端口,追加以上内容到,执行命令使其生效配置代理有条件可选追加上一步
环境准备 虚拟机
主机名 | IP | OS | 角色 |
---|---|---|---|
host01 | 192.168.31.63 | CentOS 7 | Master & Node |
配置主机名</>复制代码
虚拟机需要和外网通信,需要配置EIP
</>复制代码
[root@host01 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.31.63 host01
配置网络代理(有条件可选)
</>复制代码
export http_proxy="http://用户名:密码@代理IP:端口"
export https_proxy="https://用户名:密码@代理IP:端口"
export NO_PROXY="127.0.0.1,localhost"
</>复制代码
可选,如果访问外网需要代理请正确填写用户名、密码、代理IP和端口,追加以上内容到/root/.bashrc,执行命令使其生效
</>复制代码
[root@host01 ~]# source /root/.bashrc
配置Yum代理(有条件可选)
追加上一步代理配置内容到/etc/yum.conf
关闭防火墙</>复制代码
[root@host01 ~]# systemctl stop firewalld
[root@host01 ~]# systemctl disable firewalld
禁用SELINUX
</>复制代码
[root@host01 ~]# cat /etc/selinux/config | grep SELINUX=
# SELINUX=disabled
SELINUX=disabled
[root@host01 ~]# setenforce 0
配置系统项</>复制代码
确保SELINUX=disabled
</>复制代码
[root@host01 ~]# cat /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
vm.swappiness=0
[root@host01 ~]# sysctl -p /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
vm.swappiness = 0
关闭SWAP</>复制代码
新建/etc/sysctl.d/k8s.conf并追加相应内容
</>复制代码
[root@host01 ~]# swapoff -a
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/32697.html
安装Docker 安装 [root@host01 ~]# yum makecache [root@host01 ~]# yum install docker [root@host01 ~]# yum install golang 启动 [root@host01 ~]# systemctl enable docker [root@host01 ~]# systemctl start docker [...
安装Docker 安装 [root@host01 ~]# yum makecache [root@host01 ~]# yum install docker [root@host01 ~]# yum install golang 启动 [root@host01 ~]# systemctl enable docker [root@host01 ~]# systemctl start docker [...
摘要:时间年月日星期日说明本文部分内容均来自慕课网。整体目录结构如下项目文件用于数据持久化配置项目配置配置视图解析器配置静态资源映射配置配置配置自定义指令配置解析器配置,类似于项目启动类新建,注册配置类,并将其和当前关联。 时间:2017年3月19日星期日说明:本文部分内容均来自慕课网。@慕课网:http://www.imooc.com教学示例源码:无个人学习源码:https://githu...
摘要:即将发布经过漫长的等待,即将发布。是一款很不错的组件库,虽然在的下载量仍远高于,但不可否认的是在生态和社区活跃度上,更胜一筹。 .markdown-body{word-break:break-word;line-height:1.75;font-weight:400;font-size:15px;overflow-x:hidden;color:#333}.markdown-body h1,...
阅读 3082·2021-10-20 13:46
阅读 2587·2021-08-12 13:22
阅读 2769·2019-08-30 15:54
阅读 2406·2019-08-30 15:53
阅读 665·2019-08-30 13:47
阅读 3645·2019-08-23 16:56
阅读 1794·2019-08-23 13:02
阅读 1863·2019-08-23 12:25