Installing YUM server in RHEL4

0 comments

If you are looking for YUM server in RHEL5 you can clickhere other wise just read on..
Recently I came across a strange issue.. ie implementing YUM(Yellow dog Updater and Modifier) server in RHEL4 :(. By the time of RHEL4 released there is no YUM server implementation..
so I did some research and collected some documentation on net and implemented YUM server in RHEL4
configuring YUM server in RHEL4 as follows..
Stpe1:Download following packages
sqlite-2.8.16-1.2.el4.rf.i386.rpm
python-sqlite-0.5.0-1.2.elr4.rf.i386.rpm
python-urlgrabber-2.9.6-1.2.el4.rf.noaarch.rpm
pytyhon-elementtree-1.26-1.2.el4.rf.noarch.rpm
python-celementtree-1.0.2-1.2.el4.rf.i386.rpm
yum-2.4.2-1.noarch.rpm
yum-utils-0.3.1-1.fc4.noarch.rpm ( we need for repository)
createrepo-0.3.1-1.noarch.rpm
Stpe2: Install the above mention packages in the same sequence once you download them.
rpm -Uvh sqlite-2.8.16-1.2.el4.rf.i386.rpm
rpm -Uvh python-sqlite-0.5.0-1.2.elr4.rf.i386.rpm
rpm -Uvh python-urlgrabber-2.9.6-1.2.el4.rf.noaarch.rpm
rpm -Uvh pytyhon-elementtree-1.26-1.2.el4.rf.noarch.rpm
rpm -Uvh python-celementtree-1.0.2-1.2.el4.rf.i386.rpm
rpm -Uvh yum-2.4.2-1.noarch.rpm
rpm -Uvh yum-utils-0.3.1-1.fc4.noarch.rpm
rpm -Uvh createrepo-0.3.1-1.noarch.rpm
Step3:Now dump your rpms from your RHEL4 cds/dvd
cp -ar * /var/ftp/pub/Server/
Step4: Create repository
#createrepo -v /var/ftp/pub/Server/
Here yum server will create a repository and metadata once creation of metadata is done we can configure yum client on the same mechine.. as follows
Step5:Creating a repo file and updating with the repository details
#vi /etc/yum.repo.d/server.repo
[server]
name= Redhat repository
gpgcheck=0
save the file and exit and start using yum to install packages in RHEL4.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Network monitoring/info gathering tools in linux

    2 comments

    NETWORK MONITORING/ INFO GATHERING TOOLS IN LINUX.
    1.Why we have to monitor Network ?
    Some times we have to monitor Network traffic in our LAN if there is any traffic issues such as "Broadcast Stroms". Here I am going to explain some Linux tools which are used to monitor network traffic.

    I used to struggle a lot initially to use these tools.

    Network monitoring tools can be divided in to three types :

    1. Traffic monitoring tools(which will do just monitoring traffic in network) .
    2. Network monitoring tools(these tools will do just monitoring such as services and devices).
    3. Network Info gathering tools(these tools will just get you info about your network, tools such as ifconfig, traceroute will come under this).


    Some of the tools which we are going to cover in it are:-

    1.nmap
    2.NGIOS
    3.echoping
    4.smokeping
    5.iptraf
    6.MRTG(Multi Router Traffic Grapher)
    7.rrdtool
    8.ntop
    9.mii-tool
    10.mii-diag
    11.tcpdump
    12.mtr

    I will give the explanation regarding above mentioned tools in my next posts.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • N.A.G.I.O.S

    6 comments

    N.A.G.I.O.S
    NAGIOS(N.A.G.I.O.S. is a recursive acronym: "Nagios Ain't Gonna Insist On Sainthood", "Sainthood" being a reference to the original name of the software, which was changed in response to a legal challenge by owners of a similar trademark). --wikipedia.org
    NAGIOS is a system and network monitoring application that watches host and services that we specify as well as alerting when finds any error.

    NAGIOS is implemented by using SNMP protocol, so which ever devices support SNMP we can monitor that device using NAGIOS.

    NAGIOS can do following things
    1.Monitor wide range of hosts like Servers,Switches,Routers etc.
    2.Monitor network services (Like :
    SMTP, POP3, HTTP, NNTP, ICMP, SNMP, FTP, SSH.)
    3.Monitor Host resources (Processor load, Running processes, Disk usage, System logs, etc)
    4.Monitor Host environments(Temperature, Alarms etc).
    Can alert you through e-mail, SMS, Pager etc.

    NAGIOS can not do Monitoring of Bandwidth utilization in network.


    Installing NAGIOS:

    Step1: Before installing NAGIOS we required some packages to be installed, These are listed as below.
    Apache(For accessing NAGIOS web interface),
    gcc compiler,glibc, glibc-common and gd development library(for compiling source code which we are going download ).

    # yum install httpd
    # yum install gcc
    # yum install glibc*
    # yum install gd*

    Step2 : First we have Create a new NAGIOS user account , group and its password.
    # useradd nagios
    # passwd nagios
    # groupadd nagcmd
    # usermod -G nagcmd nagios
    # usermod -G nagcmd apache

    We are adding "nagcmd" as secondary group to both "nagios" and "apache" user because some times we require to execute commands through web interface.

    Step3 : Create a directory called download and download Nagios and its pluggins.

    # mkdir ~/download
    # cd ~/download
    # cd
    # wget
    http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.2.tar.gz
    # wget
    http://osdn.dl.spurceforge.net/sourceforge/nagiosplug/nagios-pluggins-1.4.11.tar.gz


    If you are unable to download using wget then use the following link to download nagios through GUI and nagiosplug:- http://www.nagios.org/download

    Step4 : Now its time to Compile and install Nagios, to do this uncompress the tarball file and do as follows:

    # cd /root/download
    # tar -xvzf nagios-3.1.2.tar.gz ## extract the tar file.
    # cd nagio-3.1.2
    # ./configure --with-command-group=nagcmd
    # make all

    Stpe5 : Now Install binaries, init script, sample config file and set permissions on the external command(make install-commandmod) directory.

    # make install
    # make install-init
    # make install-config
    # make install-commandmod


    Now NAGIOS is installed and the configuring files are stored in /usr/local/nagios/etc


    Step6 : Install the NAGIOS web config file in the Apache conf.d directory.

    # make install-webconf

    Step7 : Create a nagiosadmin account for logging into the Nagios web interface.

    # htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

    Here it will ask for new password, enter the password and remember it in order to access NAGIOS web interface.



    Step8 : Start nagios service by using below commands and add the nagios service to run at system start-up time.


    # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

    When we execute the above command the output will be as below.

    Output like this:-
    Nagios 3.0.2
    Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org/)
    Last Modified: 05-19-2008
    License: GPL

    Reading configuration data...

    Running pre-flight check on configuration data...

    Checking services...
    Checked 35 services.
    Checking hosts...
    Checked 4 hosts.
    Checking host groups...
    Checked 1 host groups.
    Checking service groups...
    Checked 0 service groups.
    Checking contacts...
    Checked 1 contacts.
    Checking contact groups...
    Checked 1 contact groups.
    Checking service escalations...
    Checked 0 service escalations.
    Checking service dependencies...
    Checked 0 service dependencies.
    Checking host escalations...
    Checked 0 host escalations.
    Checking host dependencies...
    Checked 0 host dependencies.
    Checking commands...
    Checked 25 commands.
    Checking time periods...
    Checked 5 time periods.
    Checking for circular paths between hosts...
    Checking for circular host and service dependencies...
    Checking global event handlers...
    Checking obsessive compulsive processor commands...
    Checking misc settings...

    Total Warnings: 0
    Total Errors: 0

    Things look okay - No serious problems were detected during the pre-flight check.
    If output comes like this, it means there is no error.

    Step9 : start the nagios service and configure the service to run at start-up time of the system

    # service nagios start
    # chkconfig --add nagios
    # chkconfig nagios on

    Stpe10 : Use the following command to run the CGIs under the SElinux enforcing/targated mode. This will eliminate security loopholes.

    # chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
    # chcon -R -t httpd_sys_content_t /usr/local/nagios/share/

    Stpe11 : Now change the contact details in
    /usr/local/nagios/etc/objects/contacts.cfg, you will find nagiosadmin, change the e-mail id associated to it with your required e-mail id, so that alerts .


    Step12 : Now restart the apache server

    # service httpd restart


    Step13 : Access the Nagios web interface through your web browser:

    http://localhost/nagios/

    Note:- Here you will be prompted for the username (nagiosadmin) and password that is given by you at step7 ).

    I will update the blog how to monitor different devices such as Servers, Network devices and System resources and how to get alerts through SMS, e-mail and Pager. Please keep us visiting.


  • Like the post? Please Subscribe to free RSS feed to get updates
  • Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here