DHCP it is provide the IP address Dynamically to the client System.
Install dhcp
[root@bashscript ~]# yum install dhcp*
Copy the configuration File
[root@bashscript ~]# cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
cp: overwrite `/etc/dhcpd.conf'? y
Edit the Configuration File
[root@bashscript ~]# vi /etc/dhcpd.conf
subnet 192.168.0.0 netmask 255.255.255.0 { -- line 4
range dynamic-bootp 192.168.0.128 192.168.0.254; --line 21
Then enable the DHCP in the client Network.
Restart the client system Network.
Using Ifconfig command identify the client system IP.
Configure And Maintain Apache Web Server
Install http service
1)[root@bashscript ~]#yum install http*
2)[root@bashscript ~]#cd /etc/httpd/conf/httpd.conf
Go to last 7 line edit as per below
<virtualhost 10.0.0.1:80> #Ipaddress:http port :80
Document Root /var/www/html/
ServerName www.server.com
</virtualhost>
3)Then go to the /var/www/html DirectoryCreate the Index page for that server
4)Setup your local system IP as 10.0.0.1 as www.server.com in /etc/hosts file
5)Restart the httpd service.
6)Then try in your browser as www.server.com
Add Virtual Web Host - VPS Virtual Private Server
go to the /etc/httpd/conf/httpd.conf
In the last line add these four lines
<virtualhost 10.0.0.1:80>
Document Root /var/www/virtual/
ServerName www1.server.com
</virtualhost>
/var/www/virtual/ create the index file for virtual web server.Then try in your browser as www1.server.com
Important File
DHCP
/usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample to /etc/dhcpd.conf
Webserver
/etc/httpd/conf/httpd.conf
Document root /var/www/html
0 Comments