Litespeed - installation
If you've been following our Ubuntu setup tutorials, you now have an up-to-date install with an optimised mysql and Ruby on Rails stack with subversion support.
Now we're going to install the Litespeed Webserver so our lovely Rails apps are served up quickly and easily (no messing with mongrels or external load balancers).
Note: If you are joining this tutorial from another install (i.e. you have not followed our Ubuntu setup tutorial), then you may need to create a 'sources' folder in your home directory:
mkdir ~/sources
Let's jump right in and install some needed ruby gems and libraries:
cd ~
sudo gem install ruby-lsapi --include-dependencies
If you are on a 64bit VPS, we need to install the 32bit libraries for our free version of Litespeed (Slicehost VPSs are all 64bit based):
sudo apt-get install ia32-libs -y
Now the needed programmes are installed, let's move to our 'sources' folder:
cd sources
Next we need to get the Litespeed source, unpack it and move to that directory:
wget http://www.litespeedtech.com/packages/3.0/lsws-3.1-std-i386-linux.tar.gz
tar xvfz lsws-3.1-std-i386-linux.tar.gz
cd lsws-3.1
Note: You might like to check the Litespeed website to see if a newer version is available. However, it does not really matter as the automatic update feature of Litespeed gives you the option of updating the installed version with the click of a link (nice eh?).
You have a few questions to answer when installing the server:
sudo ./install.sh
Look below, I have outlined how I install the server but you can change anything to your preferences (such as whether to install PHP or not - I suggest answering 'Y' here if you need PHP. We will upgrade to the latest version of PHP in the next tutorial).
Note the Admin HTTP port number (31000). If you remember, in the Ubuntu setup articles we set the iptables firewall to allow port 31000 to be open. I suggest changing both the admin port and the iptables to another port that you are happy with:
Do you agree with above license? Yes
Destination [/opt/lsws]: /usr/local/lsws
User name [admin]: admin
Password: youradminpassword
Retype password: youradminpassword
User [nobody]: www-data
Group [www-data]: www-data
HTTP port [8088]: 80
Admin HTTP port [7080]: 31000
Setup up PHP [Y/n]: y
Suffix for PHP script(comma separated list) [php]: php
Would you like to change PHP opcode cache setting [y/N]? n
Would you like to install AWStats Add-on module [y/N]? y
Would you like to import Apache configuration [y/N]? n
Would you like to have LiteSpeed Web Server started automatically when the machine restarts [Y/n]? y
Would you like to start it right now [Y/n]? y
Let's see if the server is up and running by navigating to your IP address (don't go to a domain pointing to your IP address as we haven't told Litespeed to resolve any domains yet). For example:
http://123.45.67.890/
You will see a Litespeed welcome page like this:
Try the tests on offer. Have a look at the Documentation. If you are going to use PHP have a look at the 'Test PHP' link - it gives you the phpinfo page. You'll notice that the default PHP version is 4.4.6. We'll change that in the next tutorial.
That's the install completed.
Now log in to the Litespeed administration area. Navigate to the Admin HTTP port set up earlier:
http://123.45.67.890:31000
Login to the Admin console using the User Name and password entered during the install phase.
Once logged in you will be presented with a GUI that controls all aspects of the server:
That's it for the basic install.
The next tutorial will deal with installing the latest PHP version, then securing the admin console with an SSL connection and ensuring that only your IP address can access it (although that has also been completed in the previous iptables configuration).
Plenty to come!
PickledOnion.
Digg it |
del.icio.us |
reddit |
StumbleUpon

Subscribe to Feed
Article Comments:
seaxneat 30 May, 2007
Thanks and high praise for this tutorial on setting up Litespeed. I had my server up and running on my dev machine in less than 20 minutes! Beautiful!!!
PickledOnion 30 May, 2007
seaxneat,
I'm glad you found them useful. I hope Litespeed serves you well.
PickledOnion