New look. New CentOS!
Sure, that is what CentOS 7 says.
Anyway, these days I put in CentOS 7 by way of VMware and the set up went fairly easily. Instantly after set up, I attempted to surf the online, however failed.
Whereas doing the essential troubleshooting I seen there was no IP deal with once I did that ifconfig
[chandan@localhost ~]$ ifconfig
ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:0c:29:68:22:e2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 body 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 service 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Native Loopback)
RX packets 642 bytes 55820 (54.5 KiB)
RX errors 0 dropped 0 overruns 0 body 0
TX packets 642 bytes 55820 (54.5 KiB)
TX errors 0 dropped 0 overruns 0 service 0 collisions 0
[chandan@localhost ~]$
Are you in the identical scenario as me?
On this article, I’ll speak about how one can repair it cannot get web on VMware with CentOS 7.
That leads me to assume that the community adapter is just not enabled or did not acquire a DHCP IP deal with.
Answer
- Entry terminal/console
- Turn out to be a root in the event you aren’t already
- To hold out
dhclient –v
command - You’ll discover that it has a certain IP deal with as proven beneath
[root@localhost network-scripts]# dhclient -v
Web Programs Consortium DHCP Consumer 4.2.5 Copyright 2004-2013
Web Programs Consortium. All rights reserved. For information, please go to https://www.isc.org/software program/dhcp/ Listening on LPF/ens32/00:0c:29:68:22:e2
Sending on LPF/ens32/00:0c:29:68:22:e2
Sending on Socket/fallback DHCPDISCOVER on ens32 to 255.255.255.255 port 67 interval 4 (xid=0x433a9e33) DHCPREQUEST on ens32 to 255.255.255.255 port 67 (xid=0x433a9e33)
DHCPOFFER from 172.16.179.254 DHCPACK from 172.16.179.254 (xid=0x433a9e33) certain to 172.16.179.136 -- renewal in 822 seconds.
[root@localhost network-scripts]#
Growth, that is all, it’s best to have web now. Additionally, you will discover IP once you try this ifconfig
[root@localhost network-scripts]# ifconfig
ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.179.136 netmask 255.255.255.0 broadcast 172.16.179.255
ether 00:0c:29:68:22:e2 txqueuelen 1000 (Ethernet)
RX packets 11 bytes 1255 (1.2 KiB)
RX errors 0 dropped 0 overruns 0 body 0
TX packets 23 bytes 3536 (3.4 KiB)
TX errors 0 dropped 0 overruns 0 service 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Native Loopback)
RX packets 770 bytes 66956 (65.3 KiB)
RX errors 0 dropped 0 overruns 0 body 0
TX packets 770 bytes 66956 (65.3 KiB)
TX errors 0 dropped 0 overruns 0 service 0 collisions 0
Add this on automated startup
It’s possible you’ll be taken with having this begin up mechanically so you do not have to do it each time you begin the CentOS VM.
For instance, you may set the script to autostart in order that it begins mechanically after the VM reboots.
- Go to /and many others/init.d
- Create a file with the next, I saved the title as “web autostart“
#!/bin/bash
# Answer for "No Web Connection from VMware"
#
### BEGIN INIT INFO
# Default-Begin: 2 3 4 5
# Default-Cease: 0 1 6
### END INIT INFO
dhclient -v
- Save the file
- Change the file permission as executable
chmod 755 net-autostart
- Add this script for automated begin
chkconfig
command
chkconfig --add net-autostart
- Restart the VM to check
I hope this helps.
In case you’re taken with mastering Linux administration abilities, try this course.