Showing posts with label centos5. Show all posts
Showing posts with label centos5. Show all posts

Monday, April 12, 2010

Centos Setup buildtools

1. Install Build tools for centos

yum install autoconf automake bison byacc ctags cvs flex gcc-c++ gdb gettext libtool patchutils pkgconfig redhat-rpm-config strace subversion git valgrind boost-devel bzip2-devel cyrus-sasl-devel gmp-devel python-devel readline-devel zlib-devel

Sunday, April 11, 2010

Basic Centos Setup #1

1. Change the default email to whatever external mail might be
echo ${EMAIL} >> /root/.forward

2. Logwatch
yum install logwatch

2.1. Edit the conf file /usr/share/logwatch/default.conf/logfiles/cron.conf
Replace line 20
Archive=cron.*
with
Archive=/var/log/cron.*

3. Aide
yum install aide

3.1. Initialize the database
aide --init

3.2. Copy the database to the regular spot
cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz

3.3. Add a cron script to run aide daily
/etc/cron.daily/aide.cron
#!/bin/bash
/usr/sbin/aide --check | /bin/mail -s "Daily AIDE check" ${EMAIL}

Using Dag Wiers RPMForge with centos5

Original Source: Centos RPMForge Setup

1. Install priorities plugin for yum
yum install yum-priorities

2. Enable plugins (usually turned on by default)
/etc/yum/pluginconf.d/priorities.conf
[main]
enabled=1

3. Edit all the repos.conf

3.1. /etc/yum.repos.d/CentOS-Base.repo
[base], [updates], [addons] [extras] ... priority=1
[centosplus] [contrib] ... priority=2


3.2. /etc/yum.repos.d/vz.repo
[vz-base] ... priority=3
[vz-updates] ... priority=4

4. Get Dag RPM
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm

5. Import the GPG key for Dag's repo
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

6. Verify the RPM package
rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm

7. Install RPM
rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm

8. Reset the RPMForge priority. Edit /etc/yum.repos.d/rpmforge.repo
[rpmforge]
priority=10

9. Test the setup
yum check-update

Thursday, April 1, 2010

Centos 5 Logwatch bug

Centos 5 seems to have a bug in the default version of logwatch that is in the repos. If you are getting :

system cat failed: 256 at /usr/sbin/logwatch line 880

Then, there is a problem wit the cron configuration. Make the following change in file /usr/share/logwatch/default.conf/logfiles/cron.conf line 20 to
Archive = /var/log/cron.*

The problem was that the cron file filter was picking up cron.* (i.e. cron.daily, cron.monthly etc) which was causing a the cat to fail, as they are directories and not simple files.