一、軟件準備:linux
VMware-workstation-full-14.1.2-8497320.exevim
CentOS-7-x86_64-DVD-1804.iso網絡
二、VMare激活碼:dom
AU5WA-0EF9M-0811P-REP5X-ZFK9A
ZV382-6VX96-H81LP-1ZZG9-PVKF4
GU34A-41G4Q-H88CY-3WPNT-XUK8Fspa
三、安裝CentOSrest
機器名 | IP | 內存 | 硬盤 | CPU |
cdh1 | 192.168.43.101 | 8 | 40 | 1cpu,2內核 |
cdh2 | 192.168.43.102 | 4 | 30 | 1cpu,2內核 |
安裝過程「軟件選擇」項中能夠選擇KDE圖形化操做界面,linux命令不太熟悉的選擇此項能夠方便操做,以下圖:code
四、配置網絡blog
虛機按裝完成以後,先設置靜態IP:ip
/etc/sysconfig/network-scripts/ifcfg-ens33內存
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=007cf143-2860-4e41-aa44-e3e27bcd3fac
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.43.101
GATEWAY=192.168.43.2
NETMASK=255.255.255.0
DNS1=192.168.43.2
設置虛擬網絡:
配置完成以後重啓網絡:
[root@localhost ~]# systemctl restart network
ifconfig命令查看網絡:
五、關閉防火牆和selinux:
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# systemctl disable firewalld.service
[root@localhost ~]# vim /etc/selinux/config .config/
將selinux=enforcing改爲selinux=disabled
六、修改主機名:
修改hostname文件
命令:vim /etc/hostname
命名爲cdh1 ,另一臺命名爲cdh2
七、修改hosts文件,輸入ip和主機名的對應關係,全部機器都修改爲同樣的:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.43.101 cdh1 192.168.43.102 cdh2
八、重啓虛擬機