VMware 15 installed CentOS 7

1.VMware File -> New Virtual Machine (N) ...

 2. Virtual machine configuration (The following are personalized settings can be changed according to different needs)

  2.1 Custom (Advanced) (C)

  2.2 Hardware Compatibility (H): Select Workstation 15.x

   2.3 later choose to install the system

   2.4 is selected from the Linux operating system; CentOS 7 64 bit version of the option

 

   2.5-configured virtual machine name and location of the installation

  2.6 configures the processor number and the number of cores according to their computer

   2.7 subsequent configured as follows

    Computer memory configured in accordance with configuration options

     Network type is selected from (NAT) (E)

     SCSI Controller option is recommended, followed by the same type of disk

    Choose to create a new virtual disk

     Configured disk size, I've selected "virtual disk stored as a single file," because I rarely copy the virtual machine system to another computer use

     The default shortcut name can be changed from time to change

     Click Finish

3. Click on Edit virtual machine settings

4. In the election downloaded Centos 7 system image file, then click OK

 Commonly used open source image station 163, as well as some universities Ali mirror sites

5. Click to enable virtual machine installation interface

 6.Install Centos 7 -> Select Language -> Start installation -> Configure Root Password

7. Restart

 

 

 8. Enter the password into the interface

 

 9. Review the card, configure a static IP

Command: ip addr

 Edit card:

[root@bogon ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33

Edit follows:

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
#改为static静态
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=81fd865b-0262-47a1-ac39-aa7e1233774b
DEVICE=ens33
#改为yes,开机激活网卡
ONBOOT=yes
#配置静态地址(以下额外增加的配置)
IPADDR=192.168.7.100
GATEWAY=192.168.7.2 NETMASK=255.255.255.0 DNS1=114.114.114.114

网关(GATEWAY)的值在虚拟机中查看:编辑 --> 虚拟网络编辑器(N)... --> 选择NAT模式的虚拟网卡  --> NAT 设置... --> 查看网关IP

重启网卡:

[root@bogon ~]# systemctl restart network

 ping测试:

[root@bogon ~]# ping www.baidu.com
PING www.a.shifen.com (163.177.151.110) 56(84) bytes of data.
64 bytes from 163.177.151.110 (163.177.151.110): icmp_seq=1 ttl=128 time=77.8 ms
64 bytes from 163.177.151.110 (163.177.151.110): icmp_seq=2 ttl=128 time=44.8 ms
64 bytes from 163.177.151.110 (163.177.151.110): icmp_seq=3 ttl=128 time=136 ms
64 bytes from 163.177.151.110 (163.177.151.110): icmp_seq=4 ttl=128 time=63.6 ms
64 bytes from 163.177.151.110 (163.177.151.110): icmp_seq=5 ttl=128 time=82.7 ms

 查看IP:

[root@bogon ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:3b:67:2b brd ff:ff:ff:ff:ff:ff
    inet 192.168.7.100/24 brd 192.168.7.255 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::cd54:b21f:78b:f521/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

 

防火墙关闭、端口开放可以参考:CentOS 7 开放端口命令

Guess you like

Origin www.cnblogs.com/youngyajun/p/11939475.html