An Ubuntu VPS on Slicehost: Basic Setup
As mentioned previously, I’ve recently moved this domain over to Slicehost. What follows is Part One of a guide, compiled from my notes, to setting up an Ubuntu Hardy VPS. See also Part Two, Part Three, and Part Four.
Slicehost has an excellent article repository, containing guides on a number of subjects. After building a fresh Slice, you should first follow Part 1 and Part 2 of Slicehost’s basic setup articles.
I use slightly different coloring in my bash prompt, so, rather than what Slicehost suggests in their article, I add the following to ~/.bashrc
:
1 |
|
This is a good time to protect SSH by installing DenyHosts, which I discuss here:
1 |
|
Ubuntu’s default text editor is nano, which I abhor. Real men use vim. Ubuntu comes with a slimmed down version of vim, but you’ll probably want the full version:
1 |
|
To change the global default editor variable, execute the following and select the editor of your choice:
1 |
|
This is also a perfect time to install GNU Screen.
1 |
|
If you’re not familiar with Screen, Red Hat Magazine has a nice little introduction
My .screenrc looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
I prefer to have my bash profile setup to connect me to Screen as soon as I login. If there are no running sessions, it will create one. If there is a current session, it will disconnect the session from wherever it is connected and connect it to my login. When I disconnect from screen, it automatically logs me out. To achieve this, I add the following to ~/.bashrc
:
1 2 3 4 5 |
|
I would also recommend following Slicehost’s guide to installing chkrootkit and rkhunter.
One more thing: let’s set the timezone of the server to whatever is local to you (Slicehost’s Ubuntu image defaults to UTC). To do that, run:
1 |
|
Next up: install a web server.