Articles in the Linux Category
Apache, Linux, PHP »
I recently implemented a way to limit access by IP range on specific blogs on WordPress MU. As you know, WordPress MU uses Apache Rewrite engine to rewrite URLs. For instance, you have a blog on WordPress MU called “intranet”. Apache Rewrite takes the “intranet” string in the URL and automatically rewrites it as a value in the PHP script. A side effect to Apache Rewrite is that “Directory” .htaccess parameters don’t work. So, if you wanted only your company IPs to access an internal blog, you will need to use Apache Rewrite parameters instead. For the solution, read on…
Linux »
Recently, there was a Mailman upgrade that seems to break MailmanĀ if you don’t have a list called “mailman” on your server. Symptoms of this error include:
/var/log/mailman/error
mailmanctl(2801): PID unreadable in: /var/run/mailman/mailman.pid
mailmanctl(2801): [Errno 2] No such file or directory: '/var/run/mailman/mailman.pid'
mailmanctl(2801): Is qrunner even running?
If you try to restart mailman
/etc/rc2.d/S20mailman restart
and get the same error, then you need to check whether you have a “mailman” list on your server.
To install mailman list, follow this resource:
http://www.askdavetaylor.com/why_is_mailman_complaining_site_list_is_missing_mailman.html
After installing the mailman list, you can try restarting the mailman qrunner service to see if it works.
/etc/rc2.d/S20mailman start
Linux »
If you get a GPG error when doing an apt-get update, here’s the quickest way to fix it.The error message looks similar to:
W: GPG error: http://security.debian.org etch/updates Release:
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXX: There is no public key available for the following key IDs: W: You may want to run apt-get update to correct these problems
By default, it says “You may want to run apt-get update to correct these problems”. The problem is, apt-get update doesn’t fix the keys automagically. To fix, you will need to update the debian keyring by …
Linux, VMWARE »
Why install VMWARE Tools?
Improved display support with SVGA driver
Cut and paste from host onto the VMWare guest
Automation of guest operating system commands
Sync time
Shrinking disk space
Startup and shutdown scripts
In order to install VMWARE tools on Debian, you will need to make sure you have the package “linux-headers-[kernel version]” installed.
If not, you will get a prompt during the configuration asking for the path of the C header files.
To find the version of your kernel, type in:
uname -a
It should say something like Linux infomine 2.6.26-2-amd64 (with your current CPU architecture at the end)
****
NOTE: Do this at your own risk. If you put the …
Linux, VMWARE »
Ever change the Network MAC address setting in VMWARE and you can’t get the network to work?
Here’s a quick how-to on changing the MAC address on a Linux VM. This is useful if you want to clone an existing machine and want to have both machines running with network at the same time. I am using VMWARE Server 2.0. (free version)
Linux »
I’ve done multiple Debain upgrades from Etch to Lenny and have noticed there are some issues with grub breaking. The upgrade somehow puts the wrong hard drive information in the default grub file. Here’s some recommendations on how to perform the Lenny upgrade
Linux »
The Amanda backup system is a great resource for backing up your Linux system. One of the things I noticed with the latest version is that the exclusion list has been breaking. For instance, Amanda backups are now backing up the /tmp folder, which causes it complain with the PHP session lock files. All was needed to fix was adding a leading dot in front of each folder.
Linux »
I was helping one of the staff today with their Debian setup. KDE somehow broke after they did an apt-get update. Turns out there must have been like 40-50 packages that must have been in the update and thus one of them broke during the upgrade.
Upon startup, there was a unique error message that came up with KDE during the startup phase — “No greeter widget plugin loaded. Check the configuration.” with an OK box. Clicking the OK box would lead to KDE exiting to shell. Reinstalling kdm had no effect. The fix? Read the article to see…
Apache, Linux »
The fastest way to trim down large web log files is through UNIX/Linux shell. Large files exceeding 1 GB (millions of lines of logs) are not easily editable using a GUI interface, so theĀ fastest way is to parse them is via command line. You can trim them down according to a time range, remove internal requests from within the company, and remove bots/crawlers data from the log files.
For instance, I have a 4GB log file with about two years worth of info (2007-2009) in there. What if I just wanted the logs from 2008? First, run the “head -10″ command …
Apache, Linux »
Installing awstats in Debian with GeoIP caching
First, use apt-get to get the software:
apt-get install awstats
Configure awstats:
Instead of using the awstats configure tool (written in Perl), manually add in the awstats Apache configuration. Using the tutorial from debuntu, make a file inside your apache config folder called awstats.conf with the following lines.
Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Inside the Apache2.conf file (or virtual host conf file inside the sites-available folder) add this to the end of the file:
Include /etc/apache2/awstats.conf
Next, copy the /usr/lib/cgi-bin/awstats.pl file to the apache cgi-bin folder. If you have virtual hosts enabled, copy it to …
