How to Install LiteSpeed Web Server on CentOS Print

  • 1

LiteSpeed Web Server is compatible with commonly used Apache features, including mod_rewrite, .htaccess, and mod_security. LSWS can load Apache configuration files directly and works as a drop-in replacement for Apache with hosting control panels.

Here are some features:

  • LSWS is Apache Compatible
  • LSWS Increases Performance and Stability
  • LSWS Increases Server Security
  • LSWS Reduces Hardware and Support Costs
  • LSWS Increases Profit

Let's Start Installation:

Step 1: Updating the Software

We need to be sure server is completely up-to-date. Make sure that's the case by updating with yum.

        [root@localhost]# yum install glibc glibc.i686 -y

Step 2: Download and Install LiteSpeed Web Server

we're going to install LiteSpeed Standard. You can download this from the LiteSpeed website. Scroll down and look for the LiteSpeed Standard edition for Linux (x86).

Right-click the download button and copy the link so you will end up with a link like http://www.litespeedtech.com/packages/4.0/lsws-4.2.24-std-i386-linux.tar.gz.

In your server, execute below commands.

        [root@localhost]# cd /opt
        [root@localhost opt]# mkdir src
        [root@localhost opt]# cd src
        [root@localhost src]# wget http://www.litespeedtech.com/packages/4.0/lsws-4.2.24-std-i386-linux.tar.gz

Now unpack the LiteSpeed .tar.gz. In order to do this, execute:

[root@localhost src]# tar -zxvf lsws*

After downloading LiteSpeed, cd into the LiteSpeed folder and execute the install.sh file:

[root@localhost src]# cd lsws-4.2.24 
[root@localhost lsws-4.2.24]# ./install.sh
  • You will now see the terms End User License Agreement for LiteSpeed Software.If you agree to them, press the space bar several times to scroll down.You will get the step to accept license agreement.

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" with a capital Y if you agree.

  • You will now be asked where LiteSpeed will be installed. If you want to install it in the default directory, simply press enter.

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]:

  • You will now be asked to enter the username and password for the administrator so that you can login to the web interface.

Please specify the user name of the administrator.
This is the user name required to log into the administration web interface.

User name [admin]:

Please specify the administrator's password.

This is the password required to log into the administration web interface.

Password:

Retype:

  • Enter your Email address you will be get the notification regarding the servers.

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]:

  • If you are not sure what to enter here, just leave it as "nobody".Do the same for the next question.

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]:

Please choose the group that the web server running as. User 'nobody' is the member of following group(s): nobody

    Group [nobody]:
  • You will now be asked what port the web server listens on. Generally, you want to put this as port 80 as visitors will not need to enter a port after your URL. In specific situations, you might want to change this, but if there's no obvious reason to, simply put 80 here.

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

  • There is an administration web interface available to manage your LiteSpeed web server. This web interface will need to run on another port, such as 7080 (default). You can leave it as default, unless you want it to listen on another port. You will then be able to reach the administration web interface by typing http://domain.com:port.

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 now be asked if you want to use PHP. If you need to use a CMS (such as Joomla! or WordPress), you will need to enable this. Type Y to enable PHP or not to use it.

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
  • For the next question, simply press enter unless you're an advanced user and know what you're doing here.
        Suffix for PHP script(comma separated list) [php]:
  • You will now be asked if you want to use AWStats. AWStats is a program that generates statistics so you can see detailed information about visitors. Type y if you want to use AWStats,or N if you do not want this.

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]? N

  • Next you will be asked if you want LiteSpeed to start automatically when the server restarts. To prevent downtime, you probably want this, so type Y.

Would you like to have LiteSpeed Web Server started automatically.

when the server restarts [Y/n]? Y

  • If you want to start LiteSpeed now, type Y. If you want to start it later manually, type N.

[OK] The startup script has been successfully installed!
Would you like to start it right now [Y/n]? Y
If everything went fine, you should see the following message on SSH:

LiteSpeed Web Server started successfully! Have fun!

Step 3: Configuring Firewall

In order to allow traffic to our LiteSpeed web server, we need to open the port for our web server (80) and the administration web interface (7080):

iptables -I INPUT -p tcp --dport 80 -j ACCEPT

 

iptables -I INPUT -p tcp --dport 7080 -j ACCEPT

service iptables save

If you changed these ports during installation, make sure you change them in the iptables rules as well,
Congratulations!! you now have a fully functional LiteSpeed web server.

  • When you are going to access the LiteSpeed server with IP or domain name and port, you will able to see a default page. You can access the normal web page at http://<YOUR_HOST>:<HTTP_PORT>/ ,You can now get started creating websites!

DONE!


Was this answer helpful?

« Back