How To Install the OpenLiteSpeed Web Server in CentOS 7
To Install the OpenLiteSpeed Web Server on CentOS 7
OpenLiteSpeed is a free web server that manages the web sites. It supports Apache rewrite rules, a web admin interface, and customised PHP processor for the server. Installation of OpenLiteSpeed is explained in this article.
To install OpenLiteSpeed
Before installing OpenLiteSpeed, install the following repo.
[root@linuxhelp1 ~]# rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm
Retrieving http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:litespeed-repo-1.1-1.el7.centos ################################# [100%]
Install the openlitespeed and mariadb.
[root@linuxhelp1 ~]# yum install openlitespeed mariadb mariadb-server -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.webwerks.com
* extras: centos.webwerks.com
* updates: mirror.nbrc.ac.in
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.47-1.el7_2 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.47-1.el7_2 for package: 1:mariadb-5.5.47-1.el7_2.x86_64
---> Package mariadb-server.x86_64 1:5.5.47-1.el7_2 will be installed
--> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.47-1.el7_2.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.47-1.el7_2.x86_64
.
.
.
Dependency Installed:
GeoIP.x86_64 0:1.5.0-9.el7 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7
perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBD-MySQL.x86_64 0:4.023-5.el7
perl-DBI.x86_64 0:1.627-4.el7 perl-Data-Dumper.x86_64 0:2.145-3.el7
perl-IO-Compress.noarch 0:2.061-2.el7 perl-Net-Daemon.noarch 0:0.48-5.el7
perl-PlRPC.noarch 0:0.2020-14.el7
Dependency Updated:
mariadb-libs.x86_64 1:5.5.47-1.el7_2
Complete!
To install PHP
Install the php for OpenLightSpeed.
[root@linuxhelp1 ~]# yum install lsphp56 lsphp56-mysql -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.webwerks.com
* extras: centos.webwerks.com
* updates: mirror.nbrc.ac.in
Resolving Dependencies
--> Running transaction check
---> Package lsphp56.x86_64 0:5.6.23-1.el7.centos will be installed
--> Processing Dependency: lsphp56-common(x86-64) = 5.6.23-1.el7.centos for package: lsphp56-5.6.23-1.el7.centos.x86_64
---> Package lsphp56-mysql.x86_64 0:5.6.23-1.el7.centos will be installed
.
.
.
Installed:
lsphp56.x86_64 0:5.6.23-1.el7.centos lsphp56-mysql.x86_64 0:5.6.23-1.el7.centos
Dependency Installed:
lsphp56-common.x86_64 0:5.6.23-1.el7.centos lsphp56-pdo.x86_64 0:5.6.23-1.el7.centos
Complete!
Utilise the following command to view the possible extensions available for OpenLiteSpeed PHP build.
[root@linuxhelp1 ~]# yum search lsphp56
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.webwerks.com
* extras: centos.webwerks.com
* updates: mirror.nbrc.ac.in
==================================================== N/S matched: lsphp56 =====================================================
lsphp56-debuginfo.x86_64 : Debug information for package lsphp56
lsphp56-pecl-igbinary-debuginfo.x86_64 : Debug information for package lsphp56-pecl-igbinary
lsphp56.x86_64 : PHP scripting language for creating dynamic web sites
lsphp56-bcmath.x86_64 : A module for PHP applications for using the bcmath library
lsphp56-common.x86_64 : Common files for PHP
.
.
.
lsphp56-xcache-admin.x86_64 : XCache Administration
lsphp56-xml.x86_64 : A module for PHP applications which use XML
lsphp56-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
Name and summary matches only, use " search all" for everything.
For installing all the extensions, run the following command.
[root@linuxhelp1 ~]# yum install lsphp56-*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.webwerks.com
* extras: centos.webwerks.com
* updates: mirror.nbrc.ac.in
Package lsphp56-pdo-5.6.23-1.el7.centos.x86_64 already installed and latest version
Package lsphp56-mysql-5.6.23-1.el7.centos.x86_64 already installed and latest version
Package lsphp56-common-5.6.23-1.el7.centos.x86_64 already installed and latest version
Package lsphp56-5.6.23-1.el7.centos.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package lsphp56-bcmath.x86_64 0:5.6.23-1.el7.centos will be installed
---> Package lsphp56-dba.x86_64 0:5.6.23-1.el7.centos will be installed
--> Processing Dependency: libtokyocabinet.so.9()(64bit) for package: lsphp56-dba-5.6.23-1.el7.centos.x86_64
---> Package lsphp56-dbg.x86_64 0:5.6.23-1.el7.centos will be installed
.
.
.
Dependency Updated:
net-snmp-libs.x86_64 1:5.7.2-24.el7_2.1 pcre.x86_64 0:8.32-15.el7_2.1
Skipped (dependency problems):
libevent-ls.x86_64 0:2.0.21-1.el7.centos libmemcached-ls-libs.x86_64 0:1.0.18-1.el7.centos
lsphp56-imap.x86_64 0:5.6.23-1.el7.centos lsphp56-mcrypt.x86_64 0:5.6.23-1.el7.centos
lsphp56-mysql56.x86_64 0:5.6.23-1.el7.centos lsphp56-mysqlnd.x86_64 0:5.6.23-1.el7.centos
lsphp56-pecl-memcached.x86_64 0:5.6.23-1.el7.centos lsphp56-tidy.x86_64 0:5.6.23-1.el7.centos
lsphp56-xcache.x86_64 0:5.6.23-1.el7.centos lsphp56-xcache-admin.x86_64 0:5.6.23-1.el7.centos
Complete!
Execute the following command to Change the Default Admin Password for OpenLiteSpeed
[root@linuxhelp1 ~]# /usr/local/lsws/admin/misc/admpass.sh
Please specify the user name of administrator.
This is the user name required to login the administration Web interface.
User name [admin]: linuxhelp1
Please specify the administrator' s password.
This is the password required to login the administration Web interface.
Password:
Retype password:
Administrator' s username/password is updated successfully!
Then Link the New PHP Version
[root@linuxhelp1 ~]# ln -sf /usr/local/lsws/lsphp56/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5
Start and enable the MariaDB Service.
[root@linuxhelp1 ~]# systemctl start mariadb [root@linuxhelp1 ~]# systemctl enable mariadb ln -s ' /usr/lib/systemd/system/mariadb.service' ' /etc/systemd/system/multi-user.target.wants/mariadb.service'
Run the following script to set an administrative password for mysql.
[root@linuxhelp1 ~]# mysql_secure_installation /usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we' ll need the current password for the root user. If you' ve just installed MariaDB, and you haven' t set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from ' localhost' . This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MariaDB comes with a database named ' test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you' ve completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
Verify the status of OpenLiteSpeed service.
[root@linuxhelp1 ~]# service lsws status
litespeed is running with PID 6867.
Open the web browser and navigate to https://< IP_address> :8088
Comments ( 0 )
No comments available