• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to configure YUM with Apache server in Linux

    I have written new article with the steps to configure an offline yum repository using RHEL or CentOS iso image and use the same across the network using http server and to configure yum locally without internet connection using cache
    NOTE: Creating yum repository manually is not advisable if you are using Red hat. If so then you should switch to CentOS as it is a testing platform for red hat and you can get most of the RHEL features free of cost.

    Firstly you need to copy all the rpms from the source DVD to your local machine.
    In case of RHEL 5 the default location of package is as mentioned below

    # mkdir /var/www/html/yum
    # cp /dev/media/RHEL.x.x/Server/Packages/* /var/www/html/yum/

    In case of RHEL 6 the default location for all the packages is as mentioned below
    # mkdir /var/www/html/yum
    # cp /dev/media/RHEL.x.x/Packages/* /var/www/html/yum/

    So once the packages are created you need to create a repomd.xml file using createrepo but before that make sure that createrepo package is installed on your machine
    # rpm -ivh /var/www/html/yum/createrepo-x.x.rpm
    once the package is installed
    # createrepo /var/www/html/yum/
    Make an entry of the location of yum repository in yum.conf

    # vi /etc/yum.conf

    # yum clean all
    # yum update

    Now you can use yum to install the packages
    But if you want the packages to be visible on the browser then you will need to configure apache server for the same.
    # yum -y install httpd
    Make the changes in hostname as per your machine
    # vi /etc/httpd/conf/httpd.conf
    <VirtualHost *:80>
    ServerAdmin root@server.deepsoft.com
    ServerName server.deepsoft.com
    DocumentRoot /var/www/html/yum/
    <Directory /var/www/html/yum/>
    Options Indexes
    Order allow,deny
    Allow from all

    <Directory /var/www/html/yum/>
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all

    Go to the browser and type


    If you want to use the same yum repository on any other machine then specify the url of the browser in yum.conf file of that machine in the following way
    # vi /etc/yum.conf

    I hope the article was useful.
    Deepak Prasad

    is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+

    Do you also have something to share here?
    Join GoLinuxHub Team as an Author, Click here for more information
    How to configure YUM with Apache server in Linux How to configure YUM with Apache server in Linux Reviewed by Deepak Prasad on Friday, August 10, 2012 Rating: 5

    No comments:

    Powered by Blogger.