Fixing the annoying “perl: warning: Setting locale failed” error message

Fixing the annoying “perl: warning: Setting locale failed” error message

I was getting really annoyed getting these messages while managing my Debian and Ubuntu VPSes perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.utf8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). Turns out the solution is simply to run these commands export LANGUAGE=en_US.UTF-8 export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 locale-gen en_US.UTF-8 apt-get install locales dpkg-reconfigure locales The export lines above can also be saved into either ~/.profile or ~/.bashrc or...

Read More

Debian Lenny to Squeeze upgrade

Debian Lenny to Squeeze upgrade

Debian 6 i.e. “Squeeze” was released almost a month ago. Although there are still about 11 months more before Debian 5 “Lenny” is no longer supported, I figured I would upgrade one Debian Lenny Xen-based VPS hosted on a Rackspace Cloud,  currently functioning as an OpenLDAP server, as a weekend project. The upgrade steps were straightforward: 1. Edit /etc/apt/sources.list and change all instances of lenny to squeeze. 2. Run the following commands in succession in terminal sudo apt-get update sudo apt-get install apt dpkg aptitude sudo apt-get dist-upgrade Surprisingly enough the upgrade went well with Apache and even OpenLDAP migrated successfully. Just the following issues related to phpldapadmin were encountered: 1. The upgraded...

Read More

Logwatch, Exim4 & SSH Attack Dictionary Prevention on Debian Lenny VPS

Logwatch, Exim4 & SSH Attack Dictionary Prevention on Debian Lenny VPS

Thanks to the excellent tutorials over at Slicehost, I got an idea of some the things you need to do to secure your brand new virtual private server (VPS) straight away.  To me, the main takeaways with regard to security would be: 1. create a privileged user with Sudo access 2. disable the root account login 3. use strong passwords e.g. a combination of letters in upper and lower case, numbers and other characters 4. setup iptables firewalls I had no idea how well these steps were working though in preventing unauthorised access and I don’t really have the time to access the the system logs every day. Wouldn’t it be great if there were a way you could just receive a daily email summarising significant security-related server activities? Well there is!...

Read More

Backing up your Debian/Ubuntu VPS to Rackspace Cloud Files

Backing up your Debian/Ubuntu VPS to Rackspace Cloud Files

There are quite a number of tutorials available on backing up to Amazon S3, which is popular due to its redundancy and low cost (15cents per gigabyte). I prefer Rackspace Cloud Files though due to its lower upload fees (8cents vs 10cents per gigabyte of bandwidth).  We will use duplicity to create the backups because it is bandwidth efficient and also allows us to encrypt our backups. We will also be setting up the cloudcity script to make it easier to automate the backup and restore process. First set up build essential so that you can do necessary compiling later. apt-get install build-essential Install duplicity Debian Lenny and Ubuntu < 10.04 come with older versions of Duplicity. We need to add additional repositories to install a newer version of...

Read More