The author focuses on technologies such as Java, architecture, Linux, applets, crawlers, and automation. I sorted out some information with tears during the work, searched on WeChat for [Programmer Master Road], and responded to [java] [hacker] [crawler] [small program] [interview] and other keywords to obtain free information. Technical exchanges and project cooperation can be privately chatted.
Preface
Linux FAQ summary article: Linux FAQ summary
Here are the detailed steps:
Step1 Configure the local network card
Step2 Configure virtual network card
VMware Network Adapter VMnet8 network adapter IP settings and virtual machine IP need to be in the same network segment
Step3 Configure virtual network DHCP
Step4 NAT settings
Step5 ifcfg-eth*
修改/etc/sysconfig/network-scripts/ifcfg-eth0:
-
DEVICE=eth 0 #Network card interface name
-
TYPE=Ethernet #Network card type is Ethernet
-
ONBOOT=yes #Automatically activate the network card when the system starts
-
NM_CONTROLLED=
no
-
BOOTPROTO=none #There are usually four types of protocols: static dhcp bootp none
-
DEFROUTE = yes
-
PEERDNS=yes
-
PEERROUTES=yes
-
IPV4_FAILURE_FATAL=yes #Use IPV4 protocol version
-
IPV6INIT= no #Do not use IPV6 protocol version
-
NAME=
"System eth0"
-
= IPADDR 192.168 . 1.111 ip address of #linux
-
= GATEWAY 192.168 . 1.1 # Gateway
-
NETMASK = 255.255 . 255.0 #Subnet mask
-
DNS1= 114.114 . 114.114 #DNS server address
-
ARPCHECK=
no
step6 Permanently turn off the firewall
chkconfig iptables off
Step7 Add DNS under /etc/resolv.conf
nameserver 114.114.114.114
nameserver 8.8.8.8
Step8 Restart the network service
service network restart
Step9 If the above steps do not work, try another DNS
For example: change 192.168.1.1 to 192.168.1.55 (maybe 192.168.1.1 is occupied by someone else). If the
host ip address is changed, the ip address of linux should also be changed.
The author focuses on technologies such as Java, architecture, Linux, applets, crawlers, and automation. I sorted out some information with tears during the work, searched on WeChat for [Programmer Master Road], and responded to [java] [hacker] [crawler] [small program] [interview] and other keywords to obtain free information. Technical exchanges and project cooperation can be privately chatted.