Monday, 16 June 2014

Installing Apache And Configuring YUM Client Repository

# yum install httpd* -y

# vim /etc/httpd/conf/httpd.conf
              DocumentRoot /rhel6

              <Directory /rhel6>
                      Options FollowSymLinks
                      AllowOverride None
              </Directory>
 

              <Directory /rhel6>
                      Options Indexes FollowSymLinks
                      AllowOverride None
                      Order allow,deny
                      Allow from all
              </Directory>



              NameVirtualHost 192.168.1.1:80

              <VirtualHost 192.168.1.1:80>
                       ServerAdmin webmaster@dynamite.com
                       DocumentRoot /rhel6
                       ServerName server.dynamite.com
                       ErrorLog logs/server.dynamite.com-error_log                                     

                       CustomLog logs/server.dynamite.com-access_log common
              </VirtualHost>
 

# chkconfig httpd on

# service httpd start

# vim /etc/hosts
        192.168.1.1              server.dynamite.com       server

# getenforce             (If SELinux is in Enforcing mode then type the following command)

chcon -R -t httpd_sys_content_t   /rhel6


Open firefox and confirm the results with 
http://server.dynamite.com/dvd

If it shows the all the RHEL6 DVD content then configuration is perfect.

Setting Up YUM Client Repository :


In the client system 

# vim /etc/hosts
        192.168.1.1              server.dynamite.com       server

# cd/etc/yum.repos.d/ 

# mv * /tmp

# vim client.repo
         [client]
         name=RedHat Enterprise Linux 6 Client Repository
         baseurl=http://server.dynamite.com/dvd
         gpgcheck=0
         enabled=1

# yum clean all

# yum list

No comments:

Post a Comment