On Saturday I moved Tombuntu to a new virtual private server at Linode (the computer in my basement just wasn’t enough anymore). I chose Linode (referral link) because they sell unmanaged Linux VPS systems, so I can continue to run whatever software I like.

I used Linode’s control panel to install Ubuntu 8.04 64 bit. Their Ubuntu images are not exactly the same as an installation from a CD, so I learned a few things while setting up.

Install a more comfortable environment
The Linode Ubuntu system is extremely minimal, things like man pages and tab-completion are not installed to save space. Install the ubuntu-standard metapackage to get a more comfortable command line environment:
apt-get install ubuntu-standard

Setting up users
A Linode Ubuntu system comes configured for only the root user. I prefer the Ubuntu way of using sudo instead of logging in as root.

Create a new user:
adduser myuser

This new user doesn’t have permission to use sudo yet. Open the sudo configuration file (let’s use the simpler nano editor instead of vi):
EDITOR=/usr/bin/nano visudo

Add this line to allow users in the admin group to use sudo:
%admin ALL=(ALL) ALL

Save and close the editor. The admin group may not exists yet, so create it:
groupadd admin

And add the new user to the group:
usermod -g admin myuser

Fix locale warnings
While installing updates and starting some programs, I noticed warnings similar to this one:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_CA.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Installing the language-pack-en package fixed these warnings:
apt-get install language-pack-en

Install the LAMP stack
I’m used to installing server systems using Ubuntu’s Install LAMP server option from the CD. The LAMP stack can also be installed using this command:
apt-get install lamp-server^

Disable root logins on SSH
For security reasons, it’s not a good idea to allow the root user to log in over SSH. Usually this is not a problem in Ubuntu, but the Linode system has the root user enabled. I disabled SSH root logins to be safe. Open the SSH daemon configuration file:
nano /etc/ssh/sshd_config

Find the PermitRootLogin option and change it to no. Then restart SSH:
/etc/init.d/ssh restart

Reconfiguring the timezone
The Linode system was not set to my timezone. Running the following command will allow you to chose a new location to set the timezone too:
dpkg-reconfigure tzdata

Enable mod_rewrite
This isn’t really Linode related, but I couldn’t remember how I had enabled mod_rewite on the old server. Here’s the command to do it:
a2enmod rewrite

Restoring the database
I make database backups using the mysqldump tool:
mysqldump -u root -p databasename > backupname.sql

To move Tombuntu, I created a backup and moved it to the new server to restore it. To restore a database backed up with mysqldump, first create the database. Do this by logging into mysql:
mysql -u root -p

Create the database to restore:
create database databasename;

Quit MySQL, and then restore from the backup:
mysql -u root -p databasename < backupname.sql

So far I've been very pleased with Linode. Anyone else using them already?

Related Posts