• 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

    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

    Follow the below links for more helpful tutorials

    Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
    How to secure Apache web server in Linux using password (.htaccess)
    Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
    15 tips to enhance security of your Linux machine
    Why is Linux more secure than windows and any other OS
    How to log iptables messages in different log file

    Deepak Prasad

    Deepak Prasad is an anonymous 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?

    Become an author and be a part of our GoLinuxHub Team, 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.