Nagios directory Structure


 

Nagios Directory Structure

Main Config File
/usr/local/nagios/etc/nagios.cfg

Log File
/usr/local/nagios/var/nagios.log

Object Config Files
/usr/local/nagios/etc/objects/*.cfg

Nagios Plugins

/usr/local/nagios/libexec // defined in /usr/local/nagios/etc/resource.cfg file

Nagios Web interface

/usr/local/nagios/etc/cgi.cfg

Nagios config file for Apache to interpret

/usr/local/apache/conf.d/nagios.conf

This contains directives for the following URLs

http://<nagios-host>/nagios/
http://<nagios-host>/nagios/cgi-bin/

Nagios Log rotation configuration File

/etc/logrotate.d/nagios

Install Rar/Unrar centos 6


You can install Rar/Unrar using the following steps.

for 64 bit

———

install unrar centos x64

———–
#wget http://pkgs.repoforge.org/unrar/unrar-4.0.7-1.el6.rf.x86_64.rpm
#rpm -Uvh unrar-4.0.7-1.el6.rf.x86_64.rpm

install rar centos x64

———-
#wget http://pkgs.repoforge.org/rar/rar-3.8.0-1.el6.rf.x86_64.rpm
#rpm -Uvh rar-3.8.0-1.el6.rf.x86_64.rpm

for 32 bit

———
install unrar centos 32

———
#wget http://pkgs.repoforge.org/unrar/unrar-4.0.7-1.el6.rf.i686.rpm
#rpm -Uvh unrar-4.0.7-1.el6.rf.i686.rpm
install rar centos 32

———–
#wget http://pkgs.repoforge.org/rar/rar-3.8.0-1.el6.rf.i686.rpm
#rpm -Uvh rar-3.8.0-1.el6.rf.i686.rpm

you can also use matching OS rpm from
http://pkgs.repoforge.org/rpmforge-release/

 

Could not open handle for fopen() while updating wordpress


Issue : I got the above while updating wordpress and the plugins.

Solution :

This might be due to the temporary directory created on the wordpress directory. You can resolve it using following steps.

1. Create a new directory “tmp” inside “wp-content” directory.

# mkdir tmp

2. Now give it 777 permission and correct it to user ownership.

#chmod 777 tmp

#chown user.user tmp

3. Now define the new directory in wordpress configuration file wp-config.php

define(‘WP_TEMP_DIR’,ABSPATH.’wp-content/tmp/’);

4. Try to update it now.

That’s all….!!!!

ERROR 1040 (08004): Too many connections


Issue : I got the above error while loading website on the browser.

ERROR 1040 (08004): Too many connections

Solution :

The issue is due to the maximum mysql connections set on the configuration file. You can change it on the my.cnf file like pasted below.

1. Open the file /etc/my.cnf and the following line.

max-connections=500

2.Restart the mysql service.

3. Try to load the website now and increase the value if the issue still persist.

That’s all….!!!!

IMAPsync


Imapsync is a program to synchronise two IMAP mailboxes, mailbox trees or servers.

imapsync installation

——————

You can  install imapsync on the server using the following commands.

perl -MCPAN -e "install Test::Inter"
perl -MCPAN -e "install Parse::RecDescent"
perl -MCPAN -e "install Getopt::Long"
perl -MCPAN -e "CPAN::Shell->force(qw(install Date::Manip));"
perl -MCPAN -e "CPAN::Shell->force(qw(install Mail::IMAPClient));"
perl -MCPAN -e "CPAN::Shell->force(qw(install Term::ReadKey));"

wget http://packages.sw.be/imapsync/imapsync-1.350-1.el5.rf.noarch.rpm
rpm -i --nodeps imapsync-1.350-1.el5.rf.noarch.rpm

Syntax to use imapsync :

imapsync --host1 <Source_Server> --user1  <source_server_username> --password1 <source_server_pass> --host2 <Desination_Server> --user2   <Destination_Server_username> --password2 <Destination_Server_pass>
example :

imapsync --host1 source.com --user1  user@source.com --password1 XXXXXXX --host2 localhost --user2  user@destination.com --password2 XXXXXX
That's all...!!!

Status of lfd:lfd is stopped


Issue :

When I checked the status of lfd it’s shown as stopped.

root@ded17 [~]# /etc/init.d/lfd status
Status of lfd:lfd is stopped

I have tried to start it and that didn’t help.

Solution :

1. Open the csf configuration files.

# vi  /etc/csf/csf.conf

2. Then change “Testing=0” to “Testing=1”

3. Now restart the lfd service.

That’s all…!!!!!

The CPU has been Maxed Out for more than a 6 hour Period


Issue :

IMPORTANT: Do not ignore this email.
This is cPanel stats runner on server.xxxxxxxxxxx.com
While processing the log files for user pointl2, the cpu has been
maxed out for more than a 6 hour period. The current load/uptime line on the server at the time of
this email is
19:48:00 up 151 days, 01:21, 0 users, load average: 6.4, 7.43, 8.8
You should check the server to see why the load is so high and take
steps to lower the load.

Solution :

If you get the above mail from cPanel stating that the cpu has been maxed out for more than 6 hour period, It means that the stats processing on your server has stopped. The stats software that cPanel provides pauses the processing when the load becomes too high. If it stops for more than 6 hours, it will generate this mail to let the admin know that stats have not completed as they should have.

You can check the current load stats of your server using top command and you can find if any process is taking all the load.

You can fix the stat process by following the instructions below,

1. log in to WHM

2. Go to WHM >> Server Configuration >> Tweak Settings

3. Under the tab Stats and Logs you can find the option “Extra CPUs for server load” you need to change the value there from 0 to1.

Now it should be started.

That’s all…!!!!

configure: error: *** zlib.h missing


Issue :

I got the above error when i try to upgrade openssh on the server.

Solution :

You can correct it by installing “zlib-devel” using the following command.

yum install zlib-devel

That’s all…!!!

configure: error: *** libwrap missing


Issue :

I got the above error when i try to upgrade openssh on the server.

Solution :

You can correct it by installing “tcp_wrappers-devel” using the following command.

yum install tcp_wrappers-devel

That’s all…!!!!

configure: error: PAM headers not found


Issue :

I got the above error when i try to upgrade openssh on the server.

Solution :

You can correct it by installing “pam-devel” using the following command.

yum install pam-devel

That’s all…!!!

Previous Older Entries

Blog Stats

  • 37,294 hits