Let's build the The Hitchhiker's Guide to the VPS

mamcx

Perch
Comming from a Windows background and having only experience in Ubuntu, I found challenging setup the VPS in general.

I want setup a VPS for run django (a python stack similar to ruby in rails) and requiere a lot of things that I found hard to do in CentOs 3.

Also, despite the good support I'm having in this 3 days here at JodoHost, we know than in the case of VPS, we are "alone" with the VPS (because JodoHost only build the VPS, not configure it)

Is true that for a dedicated VPS is hard to pretend that JodoHost do the work. A lot of diferent things can happend. For example, I know my requeriments are not that common (anyway PHP in the dominant plataform now, the VB of the web).

Now, I have my little VPS crashed... while we solve the problem, I put only the things I remember from memory

In the other hand, why not share our experiences in how sucesfully admin this baby?


The Hitchhiker's Guide to the VPS (Don't Panic!):

* What OS is installed in the VPS (reseller package and exlusive VPS account)?

CentOS 3 (... what specific version??? 3.3,3.5.3.7...)

* How much RAM is used by the OS at the start?

8 MB of RAM

* How much processes are running at start?

5-8 ???

* How update the system?

The VPS have 2 ways preinstalled to update the system. RPM and up2date.

RPM is good for install specific RPM packages and up2date for more generic installations.

YUM is not installed by default


For download the most recent packages for CentOs run:

up2date -h

and wait.

I found that YUM not work under the VPS (I install YUM up2date yum, then restart the VPS then yum install anything and look like nothing happend. The process is ALWAYS killed at the end)

Also, YUM consume more process. So if you can, try to stick to the preinstalled option.

APT also work. Install up2date apt

Run with apt-get install something

However, apt-get have little support for CentOs 3 packages.

* What webserver is best for VPS?

Options:

- Apache.

Talk about how install. How RAM is consumend. How much process are running

- ligthttpd

Talk about how install. How RAM is consumend. How much process are running

- liteSpeed

Talk about how install. How RAM is consumend. How much process are running


* How secure the VPS

By the way, the VPS by default not have a firewall, so:

- How configure a firewall (iptables?)

- How move ssh to another port

- How test if is secure???

* Specific apps instalation:

- How Install MySql/Postgree

- How Install a new python (2.3, 2.4) == my wish ;)

- How install ruby

(I think the main adopters of a VPS plataform are the guys looking for a way to run their FastCGI-enable toys)

Something more... share your tips ;)
 
Just want to clarify for other users, this is Linux VPS accounts, not Windows VPS.

This sounds like a great idea :)

BTW, it is 3.6, you can get this doing:
cat /etc/release
 
More updated info:

- RAM used after the setup: 4 MB. 6MB with SSH and SFTP
- DiskSpace:
- Process used: 8

I found after try to configure 3 diferents VPS that 10 process is too low. 15-20 is something more workable. (With 10 SSH can fail with error triying to fork )

Where get packages:

http://dag.wieers.com/

How do this thing in a automated fashion:

Go: /etc/sysconfig/rhn/
Edit file sources

Add:

### Dag RPM Repository for Red Hat Enterprise Linux
yum dag http://apt.sw.be/redhat/el3/en/$ARCH/dag


For update the system:

Source: http://www.centos.org/modules/smartfaq/faq.php?faqid=19



CentOS 3 is closely related to Red Hat Ent 3 (correct?).

Installing apt (after more info, look like apt is good for CentOs):

Source: http://www.linode.com/forums/archive/o_t/t_1027/how_to_setup_your_linode_with_centos.html
mkdir downloads
cd downloads
wget http://dag.wieers.com/packages/apt/apt-0.5.15cnc6-4.1.el3.rf.i386.rpm
rpm -Uvh apt*
apt-get update
apt-get upgrade

Ok, lets be specific. For example, install subversion:

NOTE: This not work if you don't add the dag repository to sources file!!!
up2date install subversion

Installing Lighttpd:
Code:
up2date lighttpd

Note how the dependencies are solved automagically!

Enough by now ;)
 
Ok. Now we have a decent stack. For start the webserver:

lighttpd -f /etc/lighttpd/lighttpd.conf

But this not work after a shutdown. Is necesary start it!

So go:

/etc/rc.d

Edit file rc.local

Add:

# Incializa el servidor web!
lighttpd -f /etc/lighttpd/lighttpd.conf

Now, if you go to the IP or domain address of the VPS you must see a welcome page.

Now, this is *the* reason to use lighttp for a VPS:

RAM after lighttp first start: aprox 7-8 MB RAM
Processes : 12

So, have reason to be called "light" ;)

I need more hack inspiration to put python 2.4: This is hard. Lets see...
 
Back
Top