Install OpenLiteSpeed on CentOS
To install OpenLiteSpeed web server on CentOS, install repository for your CentOS version
For CentOS 6
1 |
rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el6.noarch.rpm |
For CentOS 7
1 |
rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm |
For CentOS 8
1 |
rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm |
To install OpenLiteSpeed, run
1 |
yum install openlitespeed |
Before you can install PHP, you need epel repository enabled with
1 |
yum install epel-release |
Install PHP with
1 |
yum install lsphp73 lsphp73-common lsphp73-mysql lsphp73-gd lsphp73-process lsphp73-mbstring lsphp73-xml lsphp73-mcrypt lsphp73-pdo lsphp73-imap lsphp73-soap lsphp73-bcmath lsphp73-json lsphp73-mysqlnd |
Set symlink
1 |
ln -sf /usr/local/lsws/lsphp73/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5 |
Start OpenLiteSpeed with
1 |
/usr/local/lsws/bin/lswsctrl start |
To stop OpenLiteSpeed, run
1 |
/usr/local/lsws/bin/lswsctrl stop |
By default, OpenLiteSpeed will run on port 8088
1 |
http://YOUR_SERVER_IP_HERE:8088 |
You can login to Admin Interface at
1 2 3 |
http://YOUR_SERVER_IP_HERE:7080 User = admin PW = 123456 |
By default, you see an example application. The configuration file for this is at
1 |
/usr/local/lsws/conf/vhosts/Example/vhconf.conf |
Default DocumentRoot is /usr/local/lsws/Example/html. To change, edit file
1 |
vi /usr/local/lsws/conf/vhosts/Example/vhconf.conf |
Find
1 |
docRoot $VH_ROOT/html/ |
Replace $VH_ROOT/html/ with whatever path you need. You need to restart OpenLiteSpeed to make the change go live
1 |
/usr/local/lsws/bin/lswsctrl restart |