where fluff meets grit
LAMP
Linux, Apache, MySQL and PHP
Ninja tools … or debugging network problems
Dec 18th
Having just come through a harrowing ‘network issue’ ordeal, I thought I’d best document the steps back to sanity from out of my naivety. A rough description of the scenario follows.
We have a client using Sage Line 50 who wanted to perform queries on their web members database in conjunction with their in-house accounting information. This set me down the path of setting up an on demand connection and synch, database to database. The solution was a VPN connection between the client’s LAN and their web server.
Having never played seriously with VPNs before, we secured the help of a good More >
NVIDIA and suspend issues
Sep 3rd
I’ve got the nvidia proprietary video drivers running on my Fedora laptop using the rpmfusion-nonfree yum repo.
I also installed the akmod-nvidia package as it recompiles the kernel module for the graphics each time a new kernel is installed. Super!
However I’ve been battling with power suspend failing when slamming the lid on my laptop.. it hangs and won’t power off/restart without a nasty 10 sec power button press and hold. I think I’ve finally figured the problem. It seems the kmod-nvidia- tries to install as well.
A bit of the following and all seems well in sleep world!
yum remove kmod-nvidia-
In /etc/yum.repos.d/rpmfusion-nonfree-updates.repo add More >
Plesk and Qmail into Virtualmin and Postfix
Feb 26th
Biggest headache!
I’ve spent hours trying to get the Maildir storage of a Postfix install working on a Virtualmin box that had been migrated from Plesk.
There a few critical steps to get everything working. There are lots of references out there, but none covered all my issues at once. All these bits might need setting or just verifying to make it all happy, and this is done on a CentOS 5 box. Ultra critical points for me were step 1 (6th line), step 6, step 7, step 9 and the last few command line instructions (especially the 1st line).
- Webmin -> Webmin More >
Is the PCI scan on your webmin revealing weak SSL ciphers?
Oct 12th
Mine was, but the fix was pretty straight forward.
- In Webmin go to Webmin -> Webmin Configuration -> SSL Encryption
- Enter the following into the Allowed SSL Ciphers field
ALL:!ADH:!LOW:!SSLv2:!EXP:+HIGH:+MEDIUMI grabbed this string from the hardened Apache SSL config provided by the excellent Atomic Secured Linux. - Restart webmin and you should be good to go.
You can test you were successful by following the instructions in the blog post referenced below.
References: Disable SSLv2 in Webmin | Noodles’ Blog.
Addendum:
After a bit more use/testing of these changes, it turns out this interfered with Eclipse/Trac/Mylyn when connecting to this server/repo.
I’ve just figured out to get this 100% happy, More >
Grub got hosed .. that’s a bad thing
Sep 8th
For some reason on upgrading my kernel on a Fedora 11 install just now, I found on reboot that my grub install was no longer working. I think possibly the offending laptop went into standby instead of a proper reboot (not my fault of course!)
Anyways a bit of research and use of a linux boot disk and I was able to restore grub.
- I had to boot from the Fedora 11 install DVD I originally installed with.
- I then went into rescue mode rather than going through with an install
- I asked the rescue mode to search for my local Fedora installs and More >
Fetching mail with fetchmail
Apr 24th
During a domain transfer, while DNS was still propogating I needed to retrieve mail from the old server to the new.
I did so thusly…
# yum install fetchmail
$ touch .fetchmailrc
$ chmod 600 .fetchmailc
I then added the following lines to .fetchmailrc
poll with proto POP3
user there with password "" is "" here
Then once ensuring you can POP3 out of the server (port 110) through the firewall, you can just run ‘fetchmail’ from the command line to grab the mail.
Topping it off with a cronjob for the duration of DNS propogation would probably be a sensible finish.
References:
http://theos.in/news/howto-configure-fetchmail-linux-or-unix-client-program-to-fetch-emails/
http://www.catb.org/~esr/fetchmail/fetchmail-FAQ.html
More >
KeePassX on CentOS
Feb 14th
Cross platform password safe
I’ve been playing with CentOS 5 lately, and really needed KeePassX on it. I ran into a few problems…
No rpms for Centos means you have to try and build from source. You also need qt-devel on the machine but it has to be version 4.3 or greater to compile.
So I had to enable atrpms-testing and use their bleeding edge qt44-devel.
This conflicts with qt-devel, so you need to ditch that first if it’s around. It also needed a few other dependencies that weren’t picked up.
# yum remove qt-devel qt4 dt4-devel
# yum install gcc-c++ libXtst-devel.x86_64 qt44 qt44-devel
For some More >
Speedy wamp
Oct 30th
To get a bit more speed out of your sluggish windows development machine (I use wampserver), add the following code to your php.ini.
; APC accellerator
extension=php_apc.dll
[APC]
apc.enabled = 1
apc.cache_by_default = 1
apc.enable_cli = 0
apc.shm_segments = 1
apc.shm_size = 64
apc.max_file_size = 1M
apc.stat=1
Also download the APC dll from here…
http://pecl4win.php.net/ext.php/php_apc.dll
and place it in your php ‘ext’ dir. Mine is here… D:\wamp\bin\php\php5.2.6\ext
Restart Apache and you should be a bit zippier.
memcached on CentOS
Jul 24th
When installing memcached on my CentOS 5.2 box using the rpmforge repo, I found apache/php complaining of API version problems.
To get round it I first used PECL to install memcached, then used yum to set memcached to work nicely with the Redhat style environment.
# pecl install memcache
# yum --enablerepo=rmpforge install memcached
# yum install php-pecl-memcache
Thinking back, I believe I needed libevent, libevent-devel, zlib and zlib-devel to get the PECL install to work too.
# yum install libevent libevent-devel zlib zlib-devel
I saw the errors initially when version checking PHP.. after restarting apache the following command seems happy…
# php More >
Plesk Hard disk quotas
Mar 17th
I had to enable quota support to my hard disk mounts on one of my new Plesk boxes today. This lets Plesk manage how much space is given to whomever… very necessary for a virtual hosting box.
I found these instructions on the Plesk forum, but not all in one place, hence…
Add ‘usrquota’ to the options in fstab. Mine looked like this before and after…
before
/dev/md0 / ext3 defaults 1 1
after
/dev/md0 / ext3 defaults,usrquota 1 1
Then run these to get quotas working…
# mount -o remount /
# quotaoff -av
# quotacheck -avum
# quotaon -av
..and that should More >
