Monday, October 15, 2012

Serial key for VMware Workstation 9




Serial key for VMware Workstation 9

 
     VMWare workstation is a free virtualization product that installs on any existing server or powerful PC hardware and partitions a physical computer or server into multiple virtual machines by abstracting processor, memory, storage and networking resources, and thus able to further fully utilize the hardware and have the flexibility to run another same or operating system without the need of new computer.

To install VMWare Workstation, users need to have serial number or product key. 

VMware Workstation 8 Serial Key: 

0A494-8U0EM-UZ2A9-0105M-A303M
MA406-25387-7ZNW8-F197P-1AL2D
4A4GP-6PLD0-QZTP9-WK0NK-C3UQD
4A2XP-D03DN-7Z6H9-Z2ANM-0C9PFD
0F0G8-FK29Q-AZ529-2J1NP-AC02F 

VMware Workstation 9 Serial Key: 

0F23V-4D38L-9ZQ38-2K37H-83C50
0F03K-80JEQ-8ZF89-8287H-A2R47
0A22R-400EM-EZ4W8-3K9NK-3AUPL
NA64Z-0V054-UZVC0-2L370-837K4 

Try above serial keys

Friday, September 28, 2012

Configuring A High Availability Cluster (Heartbeat) On CentOS


      In this example we will configure a webserver using apache and we will cluster it. It can be implemented on centos, fedora and other redhat flavors.

Pre-Configuration Requirements

1] Following are the hostnames and ipv4 addresses that will be used:
  • Primary Node : IP - 192.168.1.1 Hostname - server1.linuxhome.in 
  • Secondary Node : IP - 192.168.1.2 Hostname - server2.linuxhome.in 
  • Virtual IP for Apache - 192.168.1.100
Assign virtual IP address using following steps on both node :
# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
DEVICE=eth0 :0
BOOTPROTO=none
BROADCAST=192.168.1.255
HWADDR=00:15:17:a3:92:04
IPADDR=192.168.1.100
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet

2] Download and install the heartbeat package. In our case we are using CentOS so we will install heartbeat with yum:

[root@server1 ~]# yum install heartbeat

or download below package
heartbeat-2.08
heartbeat-pils-2.08
heartbeat-stonith-2.08

3] Now we have to configure heartbeat on our two node cluster. We will deal with three files. These are: (authkeys, ha.cf, haresources)

[root@server1 ~]# cp /usr/share/doc/heartbeat-2.1.2/{authkeys,ha.cf,haresources} /etc/ha.d/

4] First we will deal with the authkeys file, we will use authentication method 2 (sha1). For this we will make changes in the authkeys file as below.

[root@server1 ~]# vi /etc/ha.d/authkeys
Add the following lines at the end of file & save:
auth 2
2 sha1 test-ha
5] Also the authkeys file must be read only root:

[root@server1 ~]# chmod 600 /etc/ha.d/authkeys

6] Make changes in second file of hearteat (haresources) :

[root@server1 ~]# vi /etc/ha.d/ haresources
#Add the following line at the end of file & save:
server1.linuxhome.in  192.168.1.100  httpd

7] The final piece of work in our configuration is to edit the ha.cf file which is important :

[root@server1 ~]# vi /etc/ha.d/ha.cf
#Add / Uncommnet below lines in ha.cf file & save.
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
initdead 120
bcast eth0
udpport 694
auto_failback on
node server1.linuxhome.in
node server2.linuxhome.in

8] As we want httpd highly enabled let's start configuring httpd:

[root@server1 ~]# vi /etc/httpd/conf/httpd.conf
#Add following line:
Listen 192.168.1.100:80

9] Copy the /etc/ha.d/ directory from server1 to server2:

[root@server1 ~]# scp -rvp /etc/ha.d/ root@server2.linuxhome.in:/etc/

10] Copy httpd.conf file from server1 to server2:

[root@server1 ~]# scp -rvp /etc/httpd/conf/httpd.conf root@server2.linuxhome.in:/etc/httpd/conf/

11] Create index.html file on both server under /var/www/html directory.

On server1.linuxhome.in
[root@server1 ~]# echo "SERVER1 Apache test server" > /var/www/html/index.html

On server2.linuxhome.in
[root@server2 ~]# echo "SERVER2 Apache test server" > /var/www/html/index.html

12 ] Now start heartbeat on the primary server1 and slave server2:
# /etc/init.d/heartbeat start
13] Open web-browser and type in the URL:
http://192.168.1.100
It will show server1.linuxhome.in apache test server.
13. Now stop the hearbeat daemon on server1.linuxhome.in:
# /etc/init.d/heartbeat stop
In your browser type in the URL http://192.168.1.100 and press enter.
It will show server2.linuxhome.in apache test server.

Tuesday, September 25, 2012

Install and configure Apache with PHP on Windows machine

-->

Install and configure Apache with PHP on Windows machine :

Apache Installation :
1] Download the latest apache at http://httpd.apache.org/download.cgi

2] Run the installer apache_2.2.9-win32-x86-no_ssl-r2.msi.

3] First screen is the welcome note. Click Next.

4] Second screen is the licence agreement. Accept the terms in the license agreement, click Next.

5] Third screen, brief desription of the software. Next.

6] Server Information Dialogue will ask you for the following values:
Network Domain – name of your computer across a network connection. To know the Full Computer Name, right-click My Computer icon, choose Properties, click Computer Name Tab, and look for Full computer name. Or you can simply type localhost as its value.
Server Name – the same value with the Network Domain. Or localhost.
Admnistrator’s Email Address
Choose the radio button for All Users, on Port 80, as a Service. Click Next.
7] Select Typical for Set up Type. Next

8] Select Typical for Set up Type. Next

9] Destination Folder. Leave the default value, click Next.

10] Next screen is Ready to Install the Program. Click Install.

11] To Test Your Installation
Open a browser and point to
http://localhost or http://127.0.0.1/. You should see the Apache Installation page.

PHP Configuration :

1] Download the latest php at http://www.php.net/downloads.php .

2] Unzip the contents of php-5.2.6-Win32.zip package to C:\PHP folder.

3] Find and rename the file php.ini-recommended to php.ini under PHP folder.

4] Open the file php.ini, look and uncomment the following directives (Click Edit > Find or Ctrl F) and save file.
[ Uncomment – remove the ; before a directive to activate it. ]
-->
display_errors = on
register_globals = off
magic_quotes_gpc = on
extension_dir = /PHP/ext
session.save_path = /tmp Create a folder named TMP under the root directory (Drive C:)
extension=php_mbstring.dll
extension=php_mysql.dll

--> 5] Attach PHP to Apache as a module. Open the Apache configuration file (C:\Program Files\Apache Software Foundation\Apache2.2\Conf\httpd.conf).
Search for LoadModule. Add this at the end:
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule php5_module "c:/php/php5apache2_2.dll"
PHPIniDir "C:/PHP"

Search for DirectoryIndex and add index.php.<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
Add the following under <IfModule mime_module>:AddType application/x-httpd-php .php

6] Copy libmysql.dll file from your C:\PHP folder to the C:\WINNT\system32 directory or C:\Windows\System32 directory(Windows XP).

7] Restart Apache.
To Test PHP
Create phpinfo.php, type:<?php echo phpinfo(); ?>
Save as phpinfo.php in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\
8] Open a browser and point to http://localhost/phpinfo.php or http://127.0.0.1/phpinfo.php .

Friday, September 21, 2012

Find and Replace work in Multiple Files

Easy Search and Replace word in Multiple Files on Linux Command Line


I was trying to find a solution to do a find & replace word across multiple files which was purely command line based. There are plenty of scripts out there which will accomplish this but I needed a single line command. After some google searches and some experimentation I came up with this snippet.

Syntax : [root@server ~]# grep -lr -e '<oldword>' * | xargs sed -i 's/<oldword>/<newword>/g'

Example : [root@server ~]# grep -lr -e 'country' * | xargs sed -i 's/country/India/g'

This command broken down:
  • grep for the word in a files, use recursion (to find files in sub directories), and list only file matches
  • xargs passes the results from the grep command to sed
  • sed -i uses a regular expression (regex) to evaluate the change: s (search) / search word / target word / g (global replace)
Find & Replace word of specific files:
I want to replace the word “country” with “India” from those files which are having “.php” extension. To do so use the following command :
Syntax : [root@server ~]# find . -name “*.php” -print | xargs sed -i 's/old word/new word/g'
Example : [root@server ~]# find . -name “*.php” -print | xargs sed -i 's/country/India/g'

It looks bit complicated but quite simple. There are three components to the command.
  1. find . -name "*.php" -print – Find all files (recursively) which has “.php” in the file and print them out. This will give you output like this:
    ./file.php
    ./includes/test.php
    ./classes/class.php
  2. xargs- This command is used when you want to pass a lot of arguments to one command. xargs will combine the single line output of find and run commands with multiple
    arguments, multiple times if necessary to avoid the max chars per line limit. In this case we combine xargs with sed
  3. sed -i 's/country/India/g' – Stream Editor is a tool which should be in every sys admin’s toolkit. In this case every occurence of “country” is replaced by “India” in all the files found using the “find” command. Sed simply parses input and applies certain text transformations to it.

Saturday, May 19, 2012

How to Find and Check Number of Connections to a Server



    Whenever a client connects to a server via network, a connection is established and opened on the system. On a busy high load server, the number of connections connected to the server can be run into large amount till hundreds if not thousands. Find out and get a list of connections on the server by each node, client or IP address is useful for system scaling planning, and in most cases, detect and determine whether a web server is under DoS or DDoS attack (Distributed Denial of Service), where an IP sends large amount of connections to the server. To check connection numbers on the server, administrators and webmasters can make use of netstat command.

      Below is some of the example a typically use command syntax for ‘netstat’ to check and show the number of connections a server has. Users can also use ‘man netstat’ command to get detailed netstat help and manual where there are lots of configurable options and flags to get meaningful lists and ​.

1] Display all active Internet connections to the servers and only established connections are included.
[root@server ~]# netstat -na

2] Show only active Internet connections to the server at port 80 and sort the results. Useful in detecting single flood by allowing users to recognize many connections coming from one IP.

[root@server ~]# netstat -an | grep :80 | sort

3] Let users know how many active SYNC_REC are occurring and happening on the server. The number should be pretty low, preferably less than 5. On DoS attack incident or mail bombed, the number can jump to twins. However, the value always depends on system, so a high value may be average in another server.

[root@server ~]# netstat -n -p|grep SYN_REC | wc -l

4] List out the all IP addresses involved instead of just count.
[root@server ~]# netstat -n -p | grep SYN_REC | sort -u

5] List all the unique IP addresses of the node that are sending SYN_REC connection status.
[root@server ~]# netstat -n -p | grep SYN_REC | awk '{print $5}' | awk -F: '{print $1}'

6] Use netstat command to calculate and count the number of connections each IP address makes to the server.

[root@server ~]# netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

7] List count of number of connections the IPs are connected to the server using TCP or UDP protocol.

[root@server ~]# netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

8] Check on ESTABLISHED connections instead of all connections, and displays the connections count for each IP.

[root@server ~]# netstat -ntu | grep ESTAB | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr

9] Show and list IP address and its connection count that connect to port 80 on the server. Port 80 is used mainly by HTTP web page request.

[root@server ~]# netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1

Saturday, February 25, 2012

Basic OpenVz Commands


1] To Start the VPS.
[root@server ~]# vzctl start 101

2] To Stop the VPS.
[root@server ~]# vzctl stop 101

3] To stop the VPS quickly and forcefully.
[root@server ~]# vzctl stop 101 –fast

4] To restart the VPS.
[root@server ~]# vzctl restart 101

5] To destroy VPS.
[root@server ~]# vzctl destroy 101 (good idea to stop it first)

6] To enter into VPS.
[root@server ~]# vzctl enter 101

7] To logout from VPS.
[root@101 ~]# exit

8] To display the list of active VPS's.
[root@server ~]# vzlist

9] To display the list of all VPS.
[root@server ~]# vzlist -a

10] To check the status of a VPS.
[root@server ~]# vzctl status 101

11] To show resource usage on VPS.
[root@server ~]# vzcalc -v 101

12] Execute commands against the VPS.
[root@server ~]# vzctl exec 101 df -h

13] To set the Hostname of a VPS.
[root@server ~]# vzctl set 101 --hostname server.linuxhome.in --save

14] To set new IP to the VPS.
[root@server ~]# vzctl set 101 --ipadd 192.168.1.1 --save

15] To remove IP of VPS.
[root@server ~]# vzctl set 101 --ipdel 192.168.1.1 --save

16] To set the nameserver for VPS.
[root@server ~]# vzctl set 101 --nameserver 192.168.1.254 --save

17] To set root password of VPS.
[root@server ~]# vzctl set 101 --userpasswd root:test
18] To set boot status.
[root@server ~]# vzctl set 101 --onboot yes --save

19] To check CPU Power and Utilization.
[root@server ~]# vzcpucheck -v

20] To set the number of CPUs available to a VPS.
[root@server ~]# vzctl set 101 --cpus 2 --save

21] To set the minimum and maximum CPU limits.
[root@server ~]# vzctl set 101 --cpuunits 1500 --cpulimit 4 --save

22] To check Container's Resources Usage.
[root@server ~]# vzcalc -v 101

23] To set quota & hardisk space.
[root@server ~]# vzctl set 101 --diskspace 10G:11G --save

24] To check the disk quota of a VPS.
[root@server ~]# vzquota stat 101 -t

25] To check memory consumption.
[root@server ~]# vzmemcheck -v

26] To assign disk inodes.
[root@server ~]# vzctl set 101 --diskinodes 90000:91000 --save

27] To run yum update on VPS.
[root@server ~]# vzyum 101 -y update

28] To install package using yum on VPS.
[root@server ~]# vzyum 101 -y install vsftpd*

29] To install package using rpm on VPS.
[root@server ~]# vzrpm 101 -Uvh vsftpd*

30] To find out the templates installed on your system.
[root@server ~]# vzpkgls

Install OpenVz on RedHat


Introduction:-
OpenVZ is a complete server automation and virtualization software. OpenVZ creates multiple isolated Virtual Private Servers (VPSs) on a single physical server to share hardware and management effort with maximum efficiency. Each VPS performs and executes exactly like a stand-alone server for its users and applications as it can be rebooted independently and has its own root access, users, IP addresses, memory, processes, files, applications, system libraries, and configuration files.

Note:- Following steps I have used to install OpenVz on Red Hat Enterprise Linux 5.4 [32 bit].

Per quest:-
  • Configure IP = 192.168.1.1 & Hostname = server.rootuser.in
  • Create separate partition for container's private directories i.e. /vz.
  • Firewall and Selinux should be off.
  • Download Kernel and OpenVz Utilities from following link and save it on Desktop & also download precreate OS template.

Kernel Download link = http://wiki.openvz.org/Download/kernel/rhel5/
vzctl utility = http://wiki.openvz.org/Download/vzctl
vzctl-lib=http://download.openvz.org/utils/vzctl/3.0.30.2/vzctl-lib-3.0.30.2-1.i386.rpm
vzquota utility = http://wiki.openvz.org/Download/vzquota
OS template = http://download.openvz.org/template/precreated/

Install OpenVz on redhat:-
1] Install kernel binary rpm.
[root@server ~]# cd Desktop
[root@server Desktop]# rpm -i ovzkernel-2.6.18-274.12.1.el5.028stab096.1.i686

2] There are a number of kernel limits that should be set for OpenVZ to work correctly.
Edit and append sysctl.conf file.
[root@server ~]# vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
:wq

3] To apply changes use following command.
[root@server ~]# sysctl -p

4] Make sure SELinux is disabled.
[root@server ~]# vi /etc/sysconfig/selinux
SELINUX = disabled
:wq

5] Now, you should reboot your computer and choose "OpenVZ" kernel from the boot loader menu.

[root@server ~]# reboot

6] Install opevz utilities.
[root@server ~]# cd Desktop
[root@server Desktop]# rpm -ivh vzctl-lib-3.0.30.2-1.i386.rpm
[root@server Desktop]# rpm -ivh vzctl-3.0.23-1.i386.rpm
[root@server Desktop]# rpm -ivh vzquota-3.0.12-1.i386.rpm

7] Start vz service.
[root@server ~]# service vz start
[root@server ~]# chkconfig –level 235 vz on

Creating New Virtual Private Server:-

1] Download the corresponding OS template and place it to the /vz/template/cache directory of the physical machine.

2] Create new VPS by using following command.
Syntax :- # vzctl create <Container ID> --ostemplate <templage name> --config basic
Example :-
[root@server ~]# vzctl create 101 --ostemplate centos-5-x86 --config basic

This will create a Virtual Private Server with ID 101, the private area based on

the centos-5-x86 OS template.

3] To check container is created or not.
[root@server ~]# vzlist -a

Monday, February 20, 2012

SSH Server Configuration with Advance Option


Introduction:-
ssh is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. The ssh client connects and logs into the specified host name. The user must provide his identity to the remote machine as specified in the sshd_config file, which can usually be found in /etc/ssh directory.

Per quest:-
  • Configure Server IP – 192.168.1.1 & Hostname = server.rootuser.in
  • Configure Client IP – 192.168.1.10 & Hostname = client.rootuser.in
  • Firewall should be off on server.
SSH Server Side Configuration:-
1] Three packages require to configure SSH server.
[root@server ~]# yum install openssh-server portmap xinetd

2] Now start the service sshd, xinetd, portmap
[root@server ~]# service sshd start
[root@server ~]# service xinetd start
[root@server ~]# service portmap start

3] Now make these service's on after reboot by using chkconfig command.
[root@server ~]# chkconfig –level 235 sshd on
[root@server ~]# chkconfig –level 235 xinetd on
[root@server ~]# chkconfig –level 235 portmap on

4] Create new user's.
[root@server ~]# useradd anup
[root@server ~]# passwd anup
[root@server ~]# useradd shubham
[root@server ~]# passwd shubham

SSH Client Side Configuration:-
1] Check communication with server.
[root@client ~]# ping 192.168.1.1

2] Now conncet SSH server using ssh command with root username & password.
[root@client ~]# ssh root@192.168.1.1

Advace SSH Server Configuration:-
  • Block access to root user over ssh session, By default root user able to login through ssh.
1] Edit option from main configuration file.
[root@server ~]# vi /etc/ssh/sshd_config
From - #PermitRootLogin no --> PermitRootLogin yes
    • Save file and restart sshd service and try to login from client using root user.
2] Change default port no. (22) of ssh service.
[root@server ~]# vi /etc/ssh/sshd_config [ Remove port no. from following line & add new one.]
# What ports, IPs and protocols we listen for
From - Port 22 --> Port 2705
[root@server ~]# service sshd restart
    • To Login with new port number we have to use -p option with new port no.
[root@client ~]# ssh root@192.168.1.1 -p 2705

3] SSH logins can be limited to only certain users who need remote access.
[root@server ~]# vi /etc/ssh/sshd_config [ Add following line at end of file. ]
AllowUsers anup shubham
:wq

4] Disconnect network after 3 invalid login attempt.
[root@server ~]# vi /etc/ssh/sshd_config [ Edit following line & Restart sshd service ]
From:- #MaxAuthTries = 6 To:- MaxAuthTries = 3
:wq

5] Restrict SSH access by IP address/hostname.
[root@server ~]# vi /etc/hosts.deny [ Insert the following line at end of file ]
sshd: 192.168.1.10 OR
sshd: client.rootuser.in
:wq
[root@server ~]# service sshd restart

Wednesday, February 08, 2012

Apache with DNS Server


Introduction:-
The DNS translates Internet domain and host names to IP addresses. DNS automatically converts the names we type in our Web browser address bar to the IP addresses of Web servers hosting those sites. Domain Name System to determine the IP address associated with a domain name. This process is also known as forward DNS resolution. Reverse DNS lookup is the inverse process, the resolution of an IP address to its designated domain name.

Requirement:-
  • Package = bind, caching, httpd
  • Service = named, httpd
  • Port no. = 53 – DNS, 80 – HTTP
  • Configuration file = /etc/named.caching-nameserver.conf
           /etc/named.rfc1912.zones
           /etc/httpd/conf/httpd.conf
Per quest:-
  • Configure Server IP - 192.168.1.1
  • Configure Virtual IP – 192.168.1.10 & 192.168.1.20
  • Configure Server Hostname – server.rootuser.in
Configure DNS Server:-
1] Install required packages for DNS.
[root@server ~]# yum install bind* caching* -y

2] Edit main configuration file of DNS.
[root@server ~]# vi /etc/named.caching-nameserver.conf
listen-on port 53 { 127.0.0.1; 192.168.1.1;};
allow-query { none; 192.168.1.0/24;};
match-clients { none; 192.168.1.0/24;};
:wq

3] Add the website zone in rfc1912.zones file.
[root@server ~]# vi /etc/named.rfc1912.zones
#Go to end of the file and type as follows.
zone “rootuser.in” IN {
type master;
file “localhost.zone”;
allow-update { none; };
};
zone “anup.com” IN {
type master;
file “localhost.zone”;
allow-update { none; };
};
zone “shubham.com” IN {
type master;
file “localhost.zone”;
allow-update { none; };
};
zone “1.168.192.in-addr.arpa” IN {
type master;
file “named.local”;
allow-update { none; };
};
:wq

4] Now configure zone files.
[root@server ~]# cd /var/named/chroot/var/named
[root@server named]# cp localhost.zone localhost.zone.backup
[root@server named]# vi localhost.zone
$TTL 86400
@          SOA         server.rootuser.in.       root (
                                              42 ; serial
                                              3H ; refresh
                                              15M ; retry
                                              1W ; expiry
                                              1D ) ; minimum
                                 IN NS server.rootuser.in.
rootuser.in               IN A 192.168.1.1
www.anup.com         IN A 192.168.1.10
www.shubham.com  IN A 192.168.1.20
:wq

[root@server named]# cp named.local named.local.backup
[root@server named]# vi named.local
$TTL 86400
@          SOA         server.rootuser.in.      root.localhost. (
                                            1997022700 ; Serial
                                            28800 ; Refresh
                                            14400 ; Retry
                                            3600000 ; Expiry
                                            86400 ) ; Minimum
             IN NS server.rotuser.in.
1           IN PTR server.rootuser.in.
10         IN PTR www.anup.com.
20         IN PTR www.shubham.com.
:wq

[root@server named]# cd

5] Set primary DNS server.
[root@server ~]# vi /etc/resolv.conf
nameserver 192.168.1.1
:wq

6] Start named service.
[root@server ~]# service named start
[root@server ~]# chkconfig named on

7] Use following command to test DNS server.
[root@server ~]# dig server.rootuser.in
[root@server ~]# dig www.anup.com
[root@server ~]# dig www.shubham.com
[root@server ~]# nslookup anup.com
[root@server ~]# nslookup shubham.com

Configure Aapche Web Server:-
8] Now install packeges for apache web server.
[root@server ~]# yum install http* -y

9] Edit & Append the following line in httpd.conf file.
[root@server ~]# vi /etc/httpd/conf/httpd.conf
#Name VirtualHosts *:80 --> Name VirtualHosts 192.168.1.1:80

#Go to end of file.
<VirtualHost 192.168.1.1:80>
ServerAdmin root@server.rootuser.in
DocumentRoot /var/www/html/rootuser.in
ServerName server.rootuser.in
DirectoryIndex index.html
</VirtualHost>

<VirtualHost 192.168.1.1:80>
ServerAdmin root@server.rootuser.in
DocumentRoot /var/www/html/anup.com
ServerName www.anup.com
DirectoryIndex index.html
</VirtualHost>

<VirtualHost 192.168.1.1:80>
ServerAdmin root@server.rootuser.in
DocumentRoot /var/www/html/shubham.com
ServerName www.shubham.com
DirectoryIndex index.html
</VirtualHost>
:wq

10] Create web pages for website.
[root@server ~]# cd /var/www/html
[root@server html]# mkdir rootuser.in anup.com shubham.com
[root@server ~]# cd rootuser.in
[root@server rootuser.in]# cat > index.html
<b><font size=15 color=orange><center>This is Rootuser.in</center></font></b>
^+d

[root@server rootuser.in]# cd ..
[root@server html]# cd anup.com
[root@server anup.com]# cat > index.html
<b><font size=15 color=blue><center>This is Anup.com</center></font></b>
^+d

[root@server anup.com]# cd ..
[root@server html]# cd shubham.com
[root@server shubham.com]# cat > index.html
<b><font size=15 color=green><center>This is Shubham.com</center></font></b>
^+d
[root@server shubham.com]# cd

11] Start httpd service.
[root@server ~]# service httpd start
[root@server ~]# chkconfig httpd on

12] Point your Web Browser to following URL.
http://server.rootuser.in
http://www.anup.com
http://www.shubham.com