Install LiteSpeed web server on CentOS 7: LiteSpeed web server is a popular choice for replacing Apache web server. Its features include an optimization of the web content and content delivery which maximizes the download speed and combines better performance with a smaller memory footprint. Being compatible with Apache features is also an added benefit, which helps to reduce downtime during migration from Apache to LiteSpeed. This installation assumes that you have installed a clean CentOS 7 server.
LiteSpeed is a free and open-source web server that can replace httpd. The main feature of LiteSpeed is, It can manage thousands of simultaneous connections without any server load issue. Also, LiteSpeed has a user-friendly WebAdmin GUI.
Before going ahead with the installation, the software packages in the server needed to be updated. Use the following command to update the packages.
++There are some developing tools and libraries needed for Install LiteSpeed web server on CentOS 7.
#yum groupinstall 'Development Tools'
#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
After installing these packages, we can proceed with the LiteSpeed installation.
Download the tar file for installation on a custom directory.
Use wget command to download the LiteSpeed package.
Unpack the tar file. and copy the trial.key file in it.
#tar -zxvf lsws-5.0.12-ent-x86_64-linux.tar.gz
++Now change the directory to installation directory lsws-5.3.7 and also copy the trial key to this directory before proceeding installation.
Run the installation script.
By running this command a license agreement details will appear.
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 capital Y to continue with the LiteSpeed installation.
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.
Install in the default directory by pressing ENTER or choose the custom directory.
Please specify the user name of the administrator.
This is the user name required to log into the administration web interface.
User name [admin]:
Here you have to enter the administrator name and password for Web interface login
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 notification will be sent to
emails listed here.
Email addresses [[email protected]]:
Provide an email address to contact you to mail any information regarding LiteSpeed maintenance and updates.
Will you use LiteSpeed Web Server with a hosting control panel?
Please select (0-7) ? 0
Here you have to enter the number according to the control panel which is using on your server. Enter “0” for non control panel servers.
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'.
Here you have to enter a username which is in your server.You can either create a user without having root privileges or choose “nobody”.
Please choose the group that the web server running as.
User 'nobody' is the member of following group(s): nobody
Provide the group name same like user name.
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
You can access the normal web page at http://<YOUR_HOST>:<HTTP_PORT>/
HTTP port : 80
You have to provide the port number for LiteSpeed to listen. 80 is default for web servers and if you are using a custom port then you have to mention the port number after URL for accessing.
Please specify the HTTP port for the administration web interface, which can be accessed through http://<YOUR_HOST>:<ADMIN_PORT>/
Admin HTTP port :
Specify the port number for accessing the web interface.7080 is LiteSpeed default.
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]: N
This prompt will ask for php regarding details. If you are using WordPress or any other CMS then php must be enabled.
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
AWStats is an advanced web server statistics which is used to collect visitor information. Type “Y” if you want visitors information otherwise proceed with “N”
Would you like to have LiteSpeed Web Server started automatically
when the server restarts [Y/n]? Y
Type “Y” to avoid downtime on your server.
[OK] The startup script has been successfully installed!
Would you like to start it right now [Y/n]? Y
Proceed with “Y” for starting LiteSpeed right now or choose “N” to start manually.
LiteSpeed Web Server started successfully! Have fun!
Now the LiteSpeed web server installed and started successfully.