How To Set Up Your Server on Linode

This is supposed to be a step-by-step guide to getting started with LInode and getting up and running. It assumes that you want to host more than one website. Right now, however, it's more my notes on how I created my linode. To make matters worse, I don't have enough disk space to create a new linode and test this out again – but it worked for me several times. There's sections in it where I admit I don't know if I did the right thing -- all you UNIX gurus out there feel free to add, modify, deride, or suggest.

If you're new at this, and brave, you might give following the directions a try. Let me know what problems you run into. But remember, I'm still new at this myself.

0) Required Skill Level: You need to know how to access and comprehend man pages; how to edit text files using pico, vi, or some other editor, and the basics of Linux/UNIX usage. If you don't, you may not be ready for this install.

1) Set up your linodes. I have a 768 meg /home partition, 128 meg swap, and a 1152 meg / partition with the small Red Hat 9 image on it. The Drive Setup portion of my configuration screen on linode.com reads like this:

/dev/ubda Red Hat 9.0 (Small Disk Image)

/dev/ubdb Home Volume

/dev/ubdc 128MB Swap Image

I divided my space into three disks rather than two for the following reasons: (1) It keeps the rest of your system running if the /home partition runs out of space. (2) It makes it easier to set up quotas for your virtual servers. (This HOWTO will later cover quotas; I haven't been able to make them work yet.) Boot your server and log in via SSH.

2) In /etc/fstab, I duplicated the line that refers to / and changed it so it referred to my home partition. (You may need to change the device name for the swap partition as well.) Mine now looks like this:

/dev/ubda / ext3 defaults 1 1

/dev/ubdb /home ext3 defaults 1 1

none /dev/pts devpts gid=5,mode=620 0 0

none /proc proc defaults 0 0

none /dev/shm tmpfs defaults 0 0

/dev/ubdc swap swap defaults 0 0

3) I use apt-get to install and update software. (If your linode doesn't have it, use the instructions at http://freshrpms.net/apt/ .)

4) We remove mutt because apt-get complains about it; this may not be the best thing to do.

apt-get update

apt-get remove mutt

apt-get upgrade

During apt-get upgrade, I got the following error message:

11:sendmail warning: /etc/mail/submit.cf created as /etc/mail/submit.cf.rpmnew

So I did this:

rm /etc/mail/submit.cf

mv /etc/mail/submit.cf.rpmnew /etc/mail/submit.cf

6) Using instructions at http://www.webmin.com/download.html , install Webmin. (The file I used was webmin-1.110-1.noarch.rpm, which is corrupted on the Webmin download page. I downloaded from http://freshmeat.net/redir/webmin/11428 … noarch.rpm">http://freshmeat.net/redir/webmin/11428/url_rpm/webmin-1.110-1.noarch.rpm .) Make sure you check and make sure the file size is correct.

wget http://www.webmin.com/download/rpm/webm … noarch.rpm">http://www.webmin.com/download/rpm/webmin-1.110-1.noarch.rpm

rpm -Uvh webmin*

7) If you want to connect securely to Webmin, you should set up SSH. I haven't figured out how yet. In the meantime, you can create a secure connection from your linux or OS X box (Windows: sorry) by entering this command on your LOCAL box:

ssh -L 10000:localhost:10000 root@yourdomain.com

This creates a tunnel between port 10000 on the local machine and port 10000 on your linode server. Now you connect to Webmin via your web browser. If you enter http://yourdomain.com:10000 (the standard way of going to Webmin) you will have no protection. However, if you enter http://localhost:10000 in your browser, you will be going through the encrypted tunnel to your server. Cool, eh?

8) However you do it, start Webmin. Log in as root. Click Webmin --> Usermin Configuration. Click Install. Go to the Webmin configuration page for modules and add bind8. Add proftpd.

8.5) networking --> Network Configuration --> DNS Client. My Hostname defaulted to li2-142. It needs to be the fully qualified domain name, li2-142.members.linode.com in my case.

9) Next you'll need to install Virtualmin from the instructions at http://www.webmin.com/vdownload.html

10) In Webmin, we need to config a few things.

Click Servers --> Apache and follow the prompts.

servers --> mysql --> start

servers --> virtualmin --> start Bind

11) Now we need some things to start automatically. When following these directions, redhat-config-services opens on my home linux box in a GUI XWindow. If your system doesn't support that, what's a better, simpler way to do this?

apt-get install redhat-config-services

apt-get install proftpd

redhat-config-services and turn on mysqld, httpd, named, proftpd. Sendmail should be on.

12) reboot. (You'll have to recreate the ssh tunnel after reboot if you're doing that.)

13) Now we configure: http://www.swelltech.com/support/virtua … index.html">http://www.swelltech.com/support/virtual-servers/index.html . (I skipped all the quota stuff 'cause I don't need it and couldn't make it work.

14) Whew! Now you're ready to begin adding virtual servers. Go to it!

4 Replies

To get webmin to work in secure, mode just place https infront of the URL it works fine.

You will get an invalid server cert error but this is not a problem, the data is still encrypted.

You also have the option in webmin to always use a secure connection, you are usually prompted for this option during the installation of webmin.

For those on windows that do want to create an SSH tunnel it can be done using any good windows SSH client, putty for example.

It is really useful for forwarding samba to your local machine :-) , although it can be a bit slow.

Adam

Just thought I would point out if you where going to forward samba or similar apps, check to see if the port is blocked, 139 for example is blocked by theplanet.

Adam

Continue how to setup SSL

okay,being used webmin for a while, i also have tried many times to setup SSL, but there is always dependancy problem if use rpm, so build from the source the the best way to setup SSL connection.

The instruction that given by webmin website is pretty detailed already, due to their website is down today including swelltech.com, i can't refer you the link.

here is what i did to setup SSL connection (using RH9.0)

Do the following commands, it's pretty straight forward

1. Compile openSSL

wget http://www.openssl.org/source/openssl-0.9.7c.tar.gz

tar zxvf openssl-0.9.7c.tar.gz

cd openssl-0.9.7c

./config

make

make install

2. Compile Net_SSLeay

wget http://www.cpan.org/modules/by-module/N … .25.tar.gz">http://www.cpan.org/modules/by-module/Net/Net_SSLeay.pm-1.25.tar.gz

tar zxvf Net_SSLeay.pm-1.25.tar.gz

cd Net_SSLeay.pm-1.25

perl Makefile.PL

make install

3. test your install

perl -e 'use Net::SSLeay'

4. login your webmin, there is a setting that force http connection to https under webmin SSL setting, check it out.

i will share my experience using linode with webmin, i'm actually very new to all these stuff, if i'm wrong about my language or logic, etc. please let me know. :)


This article was very helpful for me. Thanks guys. :D

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct