Topics

Installing CentOS 6.2 on VMware

– Start the virtual machine to 6.2

  • Press Enter to start

  • Choose "Skip" then press enter to continue

  • Add server name, something like 'centos6.vmware.local'

  • Add your root password

  • Check "Use all space"

  • Choose "web server"

– 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"

Restart network

/etc/init.d/network restart

Now the virtual machine is part of your private network and you can get its IP this way

less  /var/lib/dhclient/dhclient-eth1.leases 

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 8.8.8.8
nameserver 8.8.4.4

Restart network

/etc/init.d/network restart

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 /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:

  • Disabling unneeded services on CentOS
  • synchronize clock on CentOS server
  • Configuring iptables on CentOS
  • Change ssh port and enable X11 forwarding
  • Adding new users and admins to Linux server
  • disable root login
  • Install MySQL 5.5.21 64-bit RPM on CentOS 6.2
  • Install PHP 5.3.10 with PHP-FPM on CentOS 6.2
  • Install Nginx 1.0.12 for PHP-FPM on CentOS 6.2
  • install curl 7.24 on CentOS 6.2
  • install memcached 1.4.13 on CentOS 6.2
  • Install Sphinx 2.0.4 on CentOS 6.2
  • Configuring vsFTPd on CentOS with different port
  • increase linux file descriptors
  • mounting partitions with noatime
  • Watch log files on Linux server with Swatch 3.2.3