部署OpenShift基础环境
实验环境要求:
操作系统 | 主机名/IP地址 | 分配角色 | 硬件配置 |
---|---|---|---|
CentOS7.3 | master.example.com/192.168.183.110 | Master | 2核2GB硬盘100GB |
CentOS7.3 | node1.example.com/192.168.183.120 | Node | 2核2GB硬盘100GB |
CentOS7.3 | node1.example.com/192.168.183.130 | Node | 2核2GB硬盘100GB |
基础配置
配置网络
#重新配置网络;“ens33”是会变的,使用Tab键推出即可
nmcli connection modify "ens33" ipv4.method manual ipv4.addresses "192.168.183.110/24" ipv4.gateway "192.168.183.2" ipv4.dns "114.114.114.114" connection.autoconnect yes
#关闭网络并重启使配置生效
nmcli con down enss33
nmcli con up enss33
关闭防火墙及SELinux
systemctl stop firewalld.service && systemctl disabled firewalld.service
添加地址解析
使用vim /etc/hosts
添加如下内容:
192.168.183.110 master.example.com
192.168.183.120 node1.example.com
192.168.183.130 node2.example.com
安装基础包并更新内核
#安装基础软件包
yum install -y vim wget git net-tools bind-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct
#更新完系统后