主机名(FQDN) | IP地址(NAT) | 描述 |
linux-node1.example.com | eth0:192.168.56.11 | 1VCPU、2G内存、一块硬盘s da50G(动态扩展) |
linux-node2.example.com | eth0:192.168.56.12 | 1VCPU、2G内存、一块硬盘s da50G(动态扩展) |
linux-node3.example.com | eth0:192.168.56.13 | 1VCPU、2G内存、一块硬盘s da50G(动态扩展) |
备注 |
1.安装的时候将网卡命名为 eth0 html |
1. 网络选择:使用网络地址转换(NAT)。node
2. 软件包选择:Minimal Install。
3. 关闭 iptables 和 SELinux。 linux
下载系统镜像:能够在阿里云镜像站点下载 CentOS 镜像:https://mirrors.aliyun.com/centos/ vim
建立虚拟机点击链接查看:https://www.cnblogs.com/hwlong/p/9105227.htmlcentos
[root@linux-node1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet HWADDR=00:0C:29:CA:80:0D BOOTPROTO=static NAME=eth0 ONBOOT=yes IPADDR=192.168.56.11 NETMASK=255.255.255.0 GATEWAY=192.168.56.2
重启网络服务网络
[root@linux-node1 ~]# systemctl restart network
[root@linux-node1 ~]# systemctl disable firewalld
[root@linux-node1 ~]# systemctl disable NetworkManager
[root@linux-node1 ~]# vi /etc/hostname
linux-node1.example.com
[root@linux-node1 ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.56.11 linux-node1 linux-node1.example.com 192.168.56.12 linux-node2 linux-node2.example.com 192.168.56.13 linux-node3 linux-node3.example.com
[root@linux-node1 ~]# vi /etc/resolv.conf
nameserver 192.168.56.2
[root@linux-node1 ~]# rpm -ivh http://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm [root@linux-node1 ~]# yum -y install net-tools vim lrzsz tree screen lsof tcpdump nc mtr nmap wget unzip
[root@linux-node1 ~]# vim /etc/sysconfig/selinux
SELINUX=disabled #修改成 disabled
[root@linux-node1 ~]# reboot