RSS

Nice Cacti Install How To

0 Comments | This entry was posted on Apr 21 2009
Go Daddy $7.49 .com domains 468x60

RedHat / CentOS Install and Configure Cacti Network Graphing Tool

Reset file permissions of RPM packages

0 Comments | This entry was posted on Apr 16 2009
Unlimited Online backup for 4.95/month

A disastrous mistake anyone can make on their Linux server is to chown or chmod their entire filesystem.

You can reset the permissions of packages installed with rpm.

To reset file permissions:

root@empulse:$ rpm --setperms {packagename}

To reset ownership permissions:

root@empulse:$ rpm --setugids {packagename}

One-Liners

0 Comments | This entry was posted on Apr 04 2009

Search for multiple processes in one command. Example in using multiple variables.

root@empulse:$ ps auxf | grep -P '(wincompd:|proftpd:)'

Lower the reserved disk space to 0%. By default Linux will reserve 5% of each file system as reserve free disk space.

root@empulse:$ tune2fs -m 0 /dev/hda5 remove reserved space

Compare two files on two remote file systems. I saw this on Command-line-fu.

root@empulse:$ diff <(ssh alice cat /etc/apt/sources.list) <(ssh bob cat /etc/apt/sources.list)
Stylus that Works for iPhone & iPod Touch

RPM Database Corruption

1 Comment | This entry was posted on Apr 03 2008

So I recently came across a situation where rpm would just hang or give out transaction errors. It turns out that the database cache files became corrupt. Here is an example of one of the errors:

warning: waiting for transaction lock on /var/lock/rpm/transaction

# cd /var/lib/rpm

Look for the files that start with double underscores “__”. These are the cache files, and you will want to delete all of them.

# rpm __*

# rpm –rebuilddb