– Start The virtual machine and login with your root password.
– Edit the bridged network card configuration to get access to the internet
make sure to remove NM_CONTROLED=”yes”
vi /etc/sysconfig/network-scripts/ifcfg-eth0 #edit or add these options BOOTPROTO="dhcp" ONBOOT="yes" USERCTL="no" PEERDNS="no"
Now the virtual machine is part of your private network and you can get its IP this way
But if you are connected to a public network or you don’t have fixed network then you better use the host-only card we created.
– configure host-only card
vi /etc/sysconfig/network-scripts/ifcfg-eth1 #edit or add these options BOOTPROTO="none" ONBOOT="yes" USERCTL="no" PEERDNS="yes" IPADDR="192.168.126.128" NETMASK="255.255.255.0"
– Add nameservers to resolve.conf, say Google DNS
vi /etc/resolv.conf #add nameserver 22.214.171.124 nameserver 126.96.36.199
The server should now be connected to the internet and you can access the server through 192.168.126.128:22 with XShell
– Install important packages
yum -y install wget screen sudo unzip zip mailx logwatch openssl mlocate lynx gcc gcc-c++ make vsftpd sendmail sendmail-cf m4 pcre pcre-devel flex \ libxml2-devel bzip2-devel curl-devel libpng-devel libjpeg-devel autoconf gzip-devel libaio-devel glib2-devel openssl-devel httpd-devel bzip2 gamin-devel \ ImageMagick-devel readline-devel ncurses-devel gamin-devel freetype-devel vixie-cron;
– Edit your Windows hosts file and add “www.example.com 192.168.126.128”
– Edit your Linux /etc/hosts and add “192.168.126.128 www.example.com ”
– Check the Linux category for information on configuring the server
You may need to
Change server hostname
Also, take a look on these posts: