>
Currently Browsing: Journal

CentOS 6.x and Nagios – Allow Nagios to run external commands…

After what seemed like days of messing with permissions, SELinux was the problem. To solve the dreaded Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!” error, when trying to reschedule a test or acknowledge an alert, a simple setenforce 0 was the solution. Though, permissions do also have to be correct. chown nagios.nagcmd /usr/local/nagios/var/rw chmod g+rwx /usr/local/nagios/var/rw chmod g+s /usr/local/nagios/var/rw
read more

Perl Scripting Fun: Building an array of filenames

Using a script to count login activities in a KF log file. I wanted to effectively go through all the *.log?? files, ignoring zipped files. Finally settled on: my $logpath=”/var/log/kforum”; chdir($logpath) or die “$!”; @files = glob “*.log *.log.[0-9] *.log.[0-9][0-9]”;
read more

Fun with iptables

In CentOS 6, on backwater, iptables was not starting cleanly. Found a patch for the init script. Create a file named centos.iptables.patch that contains: — 5350.orig.sh 2011-05-27 19:58:32.000000000 +0100 +++ 5350.sh 2011-05-27 19:57:32.000000000 +0100 @@ -120,6 +120,12 @@ for i in $tables; do echo -n “$i ” case “$i” in + security) + $IPTABLES -t security -P INPUT $policy \ + && $IPTABLES -t security -P OUTPUT $policy \ + && $IPTABLES -t security -P FORWARD $policy \ + || let ret+=1 + ;; raw) $IPTABLES -t raw -P PREROUTING $policy \ && $IPTABLES -t...
read more

Setting up Nagios on Backwater

The first thing I wanted to do was deal with the web server. I didn’t want apache serving any pages other than nagios. I decided to redirect everything to techmentor.com. To do this I has to allow overrides int the main conf file: <Directory “/var/www/html”>     Options Indexes FollowSymLinks    AllowOverride All    Order allow,deny    Allow from all </Directory> Then in /var/www/html I created the following .htaccess file: RewriteEngine on AddType text/cache-manifest manifest RewriteCond %{HTTP_HOST} ^backwater\.techmentor\.com$ RewriteRule ^/?$...
read more

Setting Up ResourceSpace on CentOS 5.8

yum install ghostscript yum install libtool yum install libtool-ltdl yum install lcms yum install zip yum install mysql yum install mysql-server yum install php53-gd yum install php53-mysql yum install php53-mbstring chkconfig httpd on chkconfig mysql on service httpd start (or restart) service mysql start
read more

Next Entries »