This tutorial will walk you through installing the LiteSpeed web-server on CentOS 5.2.
The tutorial assumes the following:
Contents |
The first thing we need to do is make sure your Cloud Server has all of it's security patches. Connect to your Cloud Server with SSH (or the Console from the Control Panel) and login as your normal user. For the purposes of this walk-through our sample user is conveniently named 'user'.
Execute the YUM package manager and use the 'upgrade' command to upgrade the system:
# sudo yum upgrade
A series of items will fly by and you will be prompted to install... press Y followed by Enter. This will take a few minutes.
It is a good idea to restart your Cloud Server to make sure any new packages that were downloaded are freshly loaded.
# sudo reboot
You can use the ping command to check when your server has come back online.
$ ping 67.23.13.230 PING 67.23.13.230 (67.23.13.230) 56(84) bytes of data. 64 bytes from 67.23.13.230: icmp_seq=33 ttl=56 time=19.1 ms 64 bytes from 67.23.13.230: icmp_seq=34 ttl=56 time=9.52 ms 64 bytes from 67.23.13.230: icmp_seq=35 ttl=56 time=10.4 ms ...
Once it is responding to ping requests go ahead and connect to your Cloud Server again.
If you haven't installed them already, you should install the CentOS standard developer tools to cover a requirement for glibc (and because the dev tools can be useful to have around).
sudo yum groupinstall 'Development Tools'
Now we need to download the LiteSpeed web server. This walk-through will cover installation of the free Standard Edition.
To download the software you will need to do the following:
Another option is to copy the direct link and download the file manually on your Cloud Server. For purposes of demonstration we will show you this option. The link below was valid at the time of writing and may have changed -- please adjust accordingly.
# cd ~ # wget http://www.litespeedtech.com/packages/4.0/lsws-4.0.3-std-i386-linux.tar.gz
You will see the wget utility appear and it will download the file. Once it has finished you will be returned to the prompt.
We need to unpack the LiteSpeed package that we downloaded. Type the following command to unpack: (note that your file name may be different)
# sudo tar -zxvf lsws-4.0.3-std-i386-linux.tar.gz
Now we need to enter the directory that we extracted the files into:
# cd lsws-4.0.3
We are now ready to start the installer. Type the following command to start the installer:
# sudo ./install.sh
You will be prompted with a license agreement. Read the agreement and press the space bar multiple times until you reach the end.
After you 'space' through the license you will be prompted with the following:
IMPORTANT: In order to continue installation you must agree with above
license terms by typing "Yes" with capital "Y"!
Do you agree with above license?
Type Yes at this point and press Enter. Note that you *must* put a capital Y.
The next screen that appears will ask you what directory you would like to install LiteSpeed. The default directory is sufficient. Simple press Enter to accept the default.
Please specify the destination directory. You must have permissions to
create and manage the directory. It is recommended to install the web server
at /opt/lsws, /usr/local/lsws or in your home directory like '~/lsws'.
ATTENTION: The user 'nobody' must be able to access the destination
directory.
Destination [/usr/local/lsws]:
The next prompt will ask you for the administrative login that you would like to use for the administrative console. Simply press Enter to accept the default.
Please specify the user name of the administrator. This is the user name required to log into the administration web interface. User name [admin]:
Enter the password that you'd like to use for administering your web server. Please make sure this is secure as it has the power to stop your server! Press Enter once you have entered it.
Please specify the administrator's password. This is the password required to log into the administration web interface. Password:
Retype the password again.
Enter an e-mail address for the server administrator. This will be displayed on error messages so the server administrator may be contacted in the event of server failure.
Please specify administrators' email addresses. It is recommended to specify a real email address, Multiple email addresses can be set by a comma delimited list of email addresses. Whenever something abnormal happened, a notificiation will be sent to emails listed here. Email addresses [root@localhost]:
Next you will be prompted for the user that the web server should run as. Leave it the default user of nobody and press Enter.
As you are the root user, you must choose the user and group whom the web server will be running as. For security reason, you should choose a non-system user who does not have login shell and home directory such as 'nobody'. User [nobody]:
You will be asked for the group next. Press Enter.
Please choose the group that the web server running as. User 'nobody' is the member of following group(s): nobody Group [nobody]:
Next you will be prompted for the port that the web server should answer on. Default HTTP traffic is port 80. Because the default port that the server selects is not correct, type in 80 and press Enter.
Please specify the port for normal HTTP service. Port 80 is the standard HTTP port, only 'root' user is allowed to use port 80, if you have another web server running on port 80, you need to specify another port or stop the other web server before starting LiteSpeed Web Server. You can access the normal web page at http://<YOUR_HOST>:<HTTP_PORT>/ HTTP port [8088]: 80
You will be prompted for the port that the administrative control panel should answer on. We will select the default port of 7080. Simply press Enter.
Please specify the HTTP port for the administration web interface, which can be accessed through http://<YOUR_HOST>:<ADMIN_PORT>/ Admin HTTP port [7080]:
You will be asked if you would like to install PHP support. For our demonstration we will turn on PHP support. Type Y and press Enter.
You can setup a global script handler for PHP with the pre-built PHP engine shipped with this package now. The PHP engine runs as Fast CGI which outperforms Apache's mod_php. You can always replace the pre-built PHP engine with your customized PHP engine. Setup up PHP [Y/n]: Y
You will then be asked for the default PHP extension. Select the default PHP and press Enter.
Suffix for PHP script(comma separated list) [php]:
Next you will be prompted to install AWStats, a web-traffic logger. For our demonstration we have chosen to not install it. Press N and then press Enter.
AWStats is a popular log analyzer that generates advanced web server
statistics. LiteSpeed web server seamlessly integrates AWStats into
its Web Admin Interface. AWStats configuration and statistics update
have been taken care of by LiteSpeed web server.
Note: If AWStats has been installed already, you do not need to
install again unless a new version of AWStats is available.
Would you like to install AWStats Add-on module [y/N]? NA large amount of text will pass (please read!) and then you will be prompted if you would like LiteSpeed to start automatically. Press Y and then Enter.
Would you like to have LiteSpeed Web Server started automatically when the server restarts [Y/n]? Y
If that step completes successfully you will be asked if you would like to start LiteSpeed now. Press Y and then press Enter.
[OK] The startup script has been successfully installed! Would you like to start it right now [Y/n]? Y
If the server starts successfully you will be given an output that looks similar to the one below:
[OK] lshttpd: pid=4517. LiteSpeed Web Server started successfully! Have fun!
Open up your web-browser and point it to your Cloud Server's IP address (or domain name if you have DNS setup). You should see something like the following:

If you receive a similar screen then you have successfully installed LiteSpeed! Be sure to check out your administrative control panel at http://12.34.56.78:7080/. Change 12.34.56.78 to your IP address. If you changed the administrative port number you will have to change that as well.
--Kelly Koehn 14:32, 15 May 2009 (CDT)
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

18 Comments
bad ELF interpreter
/usr/local/lsws/bin/lswsctrl: ./litespeed: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[ERROR] Failed to start litespeed!
While was fixed by typing
yum install ld-linux.so.2
Then after that installed type
/usr/local/lsws/bin/lswsctrl start
Re: elf
I receive the same error
Re: error
yum install libgcc.i686
yum install glibc.i686
The base 64 bit images are missing these two packages.
re: glibc
I absolutely cannot make this work
2012-11-01 01:25:22.115 [NOTICE] Start to clean up cache directory, pid=4301
2012-11-01 01:25:22.323 [INFO] Stop listener *:80.
2012-11-01 01:25:22.323 [INFO] Stop listener *:7080.
2012-11-01 01:25:22.323 [NOTICE] [Child: 4299] Start shutting down gracefully ...
2012-11-01 01:25:22.323 [NOTICE] New litespeed process is ready, stop listeners
2012-11-01 01:25:22.323 [INFO] Stop listener *:80.
2012-11-01 01:25:22.323 [INFO] Stop listener *:7080.
2012-11-01 01:25:22.323 [NOTICE] [Child: 4299] Shut down successfully!
2012-11-01 01:25:22.324 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets of process with pid=4299 !
2012-11-01 01:25:22.425 [NOTICE] [AutoRestarter] child process with pid=4299 exited with status=0!
2012-11-01 01:25:22.425 [NOTICE] [PID:4295] Server Stopped!
It apparently starts, for a split second, and dies. As I've tried multiple versions on various distros, and various computers. The installation - unless I'm really missing something - is nothing short of brain dead. What could possibly be going on here? When I try to start it, it simply says it can't be started and to read the docs..... Thanks for any clues.
Re: I absolutely cannot make this work
The problem...
Install light speed on centos 5.8 and 5.6
sudo reboot
sudo yum groupinstall 'Development Tools'
cd ~
wget http://www.litespeedtech.com/packages/4.0/lsws-4.2.1-std-i386-linux.tar.gz
sudo tar -zxvf lsws-4.2.1-std-i386-linux.tar.gz
cd lsws-4.2.1
sudo ./install.sh
***** finish the setup process ****
** DO not inastall AWstatus
//open port 80 and 7080
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 7080 -j ACCEPT
sudo service iptables save
New litespeed 4.2.2
sudo yum upgrade
sudo reboot
sudo yum groupinstall 'Development Tools'
cd ~
wget http://www.litespeedtech.com/packages/4.0/lsws-4.2.2-std-i386-linux.tar.gz
sudo tar -zxvf lsws-4.2.2-std-i386-linux.tar.gz
cd lsws-4.2.2
sudo ./install.sh
***** finish the setup process ****
** DO not inastall AWstatus
//open port 80 and 7080
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 7080 -j ACCEPT
sudo service iptables save
Update PHP 4 to 5 (for lightspeed)
----------------------------
yum install libxml2-devel.x86_64 openssl-devel.x86_64 bzip2-devel.x86_64 libcurl-devel.x86_64 db4-devel.x86_64 \
libjpeg-devel.x86_64 libpng-devel.x86_64 libXpm-devel.x86_64 freetype-devel.x86_64 gmp-devel.x86_64 \
libc-client-devel.x86_64 openldap-devel.x86_64 libmcrypt-devel.x86_64 mhash-devel.x86_64 freetds-devel.x86_64 \
zlib-devel.x86_64 mysql-devel.x86_64 ncurses-devel.x86_64 pcre-devel.x86_64 unixODBC-devel.x86_64 postgresql-devel.x86_64 \
sqlite-devel.x86_64 aspell-devel.x86_64 readline-devel.x86_64 recode-devel.x86_64 net-snmp-devel.x86_64 \
libtidy-devel.x86_64 libxslt-devel.x86_64 t1lib-devel.x86_64
----------------------------
Light speed forum link: http://www.litespeedtech.com/support/forum/showthread.php?t=6463
-
re: php
Thanks for your appreciation.
installed but
Any ideas?
re: admin area
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 7080 -j ACCEPT
sudo service iptables save
That should make sure port 7080 is open in the firewall. If you open the port and still can't connect, check the litespeed logs to see if it's getting the connection and failing to handle it for another reason.
did you change your admin
Thanks
Add new comment