Tag Archives: CentOS

Knowledge tree installation in CentOS 5

by Aravind

This blog explains the steps to install Knowledge Tree on a Cent OS server.

We were asked to install a Knowledge Management System called Knowledge Tree for one of our shared hosting clients, whose website is hosted in Centos 5.5 server.
Once we got this requirement I went through knowledgetree web site and I found that they do not provide the documentation for the installation in Centos server but they support RedHat Linux 5 and it is clearly explained in their Platform Requirements page.  So I decided to try it out on my own and once got it installed successfully, am sharing the steps with you.

Continue reading

Installing MRTG graphs on centos (linux) servers

1. Install snmp service and MRTG graph

Code:
yum -y net-snmp mrtg
yum -y install net-snmp mrtg

2. Open /etc/snmp/snmpd.conf

Please note that the file should be looked as below. (Comment (#) the lines as shown below in “Access Control Part”)

Quote:
# First, map the community name “public” into a “security name”

# sec.name source community
#com2sec notConfigUser default public

####
# Second, map the security name into a group name:

# groupName securityModel securityName
#group notConfigGroup v1 notConfigUser
#group notConfigGroup v2c notConfigUser

####
# Third, create a view for us to let the group have rights to:

# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
#view systemview included .1.3.6.1.2.1.1
#view systemview included .1.3.6.1.2.1.25.1.1

####
# Finally, grant the group read-only access to the systemview view.

# group context sec.model sec.level prefix read write notif
#access notConfigGroup “” any noauth exact systemview
#none none

# —————————————————————————–

# Here is a commented out example configuration that allows less
# restrictive access.

# YOU SHOULD CHANGE THE “COMMUNITY” TOKEN BELOW TO A NEW KEYWORD ONLY
# KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.

## sec.name source community
com2sec local localhost dingloo
#com2sec mynetwork NETWORK/24 COMMUNITY

## group.name sec.model sec.name
group MyRWGroup v1 local
#group MyROGroup any mynetwork
#
#group MyRWGroup any otherv3user
#…

## incl/excl subtree mask
view all included .1 80

## -or just the mib2 tree-

#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc

## context sec.model sec.level prefix read write notif
#access MyROGroup “” any noauth 0 all none none
access MyRWGroup “” any noauth exact all all all

Add or edit the bolded lines in /etc/snmp/snmpd.conf

3. Service snmpd restart

After restarting please look in /var/log/messages for any error message

4. Now change your directory to Apache DocumentRoot #cd /var/www/html or #/usr/local/apache/htdocs
5. Make a directory called graph #mkdir graph
6. #cd graph
7. Run the following command

Code:
#cfgmaker dingloo@127.0.0.1 > mrtg.cfg

8. This will generate mrtg.cfg file

9. Once the above is created Open the file and change “Workdir” to DocumentRoot (i.e., where file path for the file mrtg.cfg)

10. Now Run the following command

Code:
#env LANG=C /usr/bin/mrtg /var/www/html/graph/mrtg.cfg

You
will notice few warnings, Repeat the same command thrice or more, the
warnings will be stopped automatically. Now we can see some html and
files genertaed in graph folder.

11. Set this in cronjob, so that the graph will be generated automatically

Code:
*/5 * * * * env LANG=C /usr/bin/mrtg /var/www/html/graph/mrtg.cfg > /dev/null 2>&1

The above will be running for every five minutes.

Hope This article is useful..

Let me know, if anyone has doubts..