blog@msaifuddin.com I reject the reality and substitute my own!

14Jan/090

New VPS again

I've bought a new box a few weeks ago but haven't used it until today. I have just set up a simple HTTP server with PHP support using Lighttpd with PHPCGI. A step-by-step installation procedure is as below, starting from adding the repositories until getting the web server running. Btw, I'm using Ubuntu Linux as my distro (I like it very much!).

The first and basic thing to do is to install a text editor since a new box will only have server core without any softwares installed. I choose nano as it's the most basic and easiest text editor to use .

root@vps:~# apt-get install nano

Then, proceed with adding extra repositories.

root@vps:~# nano /etc/apt/sources.list

and add the Universe and Multiverse repositories.

deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe

deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse

Then run an update to get the latest release.

root@vps:~# apt-get update

Install new application in the box. In my case, I'll install zip, unzip, rar, unrar and wget since this will be handy should I downloaded something to my box and need to extract the contents.

root@vps:~# apt-get install {zip,unzip,rar,unrar,wget}

I'm using the { } (curly brackets) to install multiple files at once.

The next step is to install Lighttpd with all of the required components.

root@vps:~# apt-get install lighttpd
#this will install lighttpd web server

root@vps:~# apt-get install php5-cgi
#this will install php5-cgi (compatible with lighttpd)

root@vps:~# lighty-enable-mod fastcgi
#this will enable fastCGI support in lighttpd

root@vps:~# apt-get install php5-curl
#this will install curl for php

After that, reload the web server.

/etc/init.d/lighttpd force-reload

You can also edit the lighttpd server settings on /etc/lighttpd/lighttpd.conf and reload the server once more after making changes.

A new web server is now running and ready to serve!

No related posts.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.