Tag: litespeed

  • How to update LiteSpeed License from command line

    How to update LiteSpeed License from command line

    If you want to change the License key for your LiteSpeed webserver, you can do the following.

    cd /usr/local/lsws/conf
    mv serial.no serial.no.old
    mv license.key license.key.old
    

    Create file

    vi serial.no
    

    Inside the file, paste your LiteSpeed webserver license key.

    Restart LiteSpeed

    /usr/local/lsws/bin/lshttpd -r
    /usr/local/lsws/bin/lswsctrl restart
    

    Verify LiteSpeed License with command

    /usr/local/lsws/bin/lshttpd -V
    

    verify litespeed license

    See LiteSpeed

  • Install LiteSpeed Web Server

    Install LiteSpeed Web Server

    LiteSpeed is a high performance web server. Unlike most other web servers, this is a paid software, so you will need to purchase a license or get trail key before you can use it.

    To install LiteSpeed, download latest version of the software from

    https://www.litespeedtech.com/products/litespeed-web-server/download

    At this time of writing this post, latest version of LiteSpeed is 5.4.7

    cd /usr/local/src
    wget https://www.litespeedtech.com/packages/5.0/lsws-5.4.7-ent-x86_64-linux.tar.gz
    tar -xvf lsws-5.4.7-ent-x86_64-linux.tar.gz
    cd lsws-5.4.7
    ./install.sh
    

    Before you can run the install.sh script, you need to copy your license key to this folder. It will ask you few questions. Once installed, admin interface will be available on URL

    http://your-server-ip-here:7080

    LiteSpeed Web Server

  • Install Zend OpCache on OpenLiteSpeed Server

    Install Zend OpCache on OpenLiteSpeed Server

    To install Zend OpCache on OpenLiteSpeed Server, run

    apt install -y lsphp73-opcache
    

    Now restart PHP with command

    killall -9 lsphp
    

    Zend OpCache GUI

    Zend OpCache GUI shows stats for OpCache. This is for monitoring purpose only.

    You can download it from

    https://github.com/amnuts/opcache-gui

    All you need to do is download the files, exact it, upload it to your web site. It will show nice graphs with cache statistics.

    Zend OpCache GUI

  • Install LiteSpeed Web Server on Cpanel Server

    To install LiteSpeed Web Server on Cpanel Server, run

    wget https://www.litespeedtech.com/packages/cpanel/lsws_whm_autoinstaller.sh
    chmod a+x lsws_whm_autoinstaller.sh
    ./lsws_whm_autoinstaller.sh TRIAL
    

    This will instal 15 day TRAIl version of the LiteSpeed Web Server. Once you purchased license, you will be able to update license key in WHM.

    LiteSpeed Web Server installed on folder

    /usr/src/lsws
    

    To restart LiteSpeed, run

    systemctl restart lsws
    

    Once LiteSpeed installed, you need to switch to LiteSpeed by running

    /usr/local/lsws/admin/misc/cp_switch_ws.sh lsws
    

    You can also do this in WHM.

    You can login to web interface at

    https://IPADDR:7080/login.php
    

    You will need admin password to login here, to set admin password, run

    /usr/local/lsws/admin/misc/admpass.sh
    

    See Litespeed Web Server

  • Enable CloudLinux PHP lsapi

    Enable CloudLinux PHP lsapi

    CloudLinux provides high performance PHP module lsapi. It is a replacement for suphp available on cpanel servers. lsapi module is a based on LiteSpeed Technologies API for PHP.

    To enable lsapi in CloudLinux Cpanel Server, go to

    WHM > EasyApache 4

    Provision profile

    CloudLinux + All PHP Options + OpCache + mod_lsapi
    CloudLinux lasapi php

    Click “Provision” and wait until the software is updated.

    Now you need to set lsapi as default PHP handler. To do this, go to

    WHM > MultiPHP Manager
    
    WHM Multi PHP Manager

    Click on “PHP Handlers”.

    On Next page, you can set handler for each PHP versions.

    You can set PHP handler to lsapi gloabally using following command

    /usr/bin/switch_mod_lsapi --enable-global
    

    Once you run it, all PHP version handlers will get chanegd to lsapi.

    If you check PHP info, you will see Server API listed as LiteSpeed.

    LiteSpeed Server API

    Back to lsapi

  • Install OpenLiteSpeed on Ubuntu/Debian

    Install OpenLiteSpeed on Ubuntu/Debian

    OpenLiteSpeed ia an Open Source version of LiteSpeed Web Server.

    To install OpenLiteSpeed, add repository by running

    wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debain_repo.sh | bash
    

    Now you have openlitespeed packages available on your server. Here is packages available on a Debian 9 server.

    OpenLiteSpeed Web Server

    To install OpenLiteSpeed, run

    apt install -y openlitespeed
    

    OpenLiteSpeed will be installed in folder

    /usr/local/lsws
    

    You can start/stop OpenLiteSpeed using command

    root@ok:~# /usr/local/lsws/bin/lswsctrl
    $Usage: /usr/local/lsws/bin/lswsctrl {start|stop|restart|reload|condrestrt|try-restart|status|help}
    
    start       - start web server
    stop        - stop web server
    restart     - gracefully restart web server with zero down time
    reload      - same as restart
    condrestart - gracefully restart web server if server is running
    try-restart - same as condrestart
    status      - show service status
    help        - this screen
    
    root@ok:~#
    

    Once installed, you will be able to login to WebAdmin at

    https://YOUR_SERVER_IP_ADDR:7080
    User = admin
    Pass = 123456
    

    You can change default admin passord by going to

    Admin > WebAdmin Settings > General > Users

    Click on edit icon right side of user “admin”.

    OpenLiteSpeed Change Admin Password

    You can also change OpenLiteSpeed Admin password by running following command as user root

    /usr/local/lsws/admin/misc/admpass.sh
    
  • Install CyberPanel on CentOS 7

    Install CyberPanel on CentOS 7

    CyberPanel is a hosting control panel. CyberPanel uses OpenLiteSpeed, an open-source version of LiteSpeed Web server.

    CyberPanel with OpenLitespeed is Free to use.

    To install CyberPanel, run

    yum install -y wget
    wget https://cyberpanel.net/install.sh
    bash install.sh

    It asks you the number of MySQL instances. I selected option 1

    LiteSpeed CyberPanel install

    On next screen, it ask you to select MariaDB version. MariaDB is a MySQL drop in replacement, it work exactly like MySQL. Once install completed, installer displays login user name and password.

    You wil be able to login to CyberPanel at

    https://SERVER_IP:8090
    Panel username: admin
    Panel password: 1234567

    See LiteSpeed

  • LiteSpeed Web Server

    LiteSpeed is a high performance web server.

    Login to the admin interface at

    https://IP_ADDR:7080/

    To check the version, run

    # /usr/local/lsws/bin/lshttpd -v
    LiteSpeed/5.3 Enterprise
    # 
    

    To check the license, run

    # /usr/local/lsws/bin/lshttpd -V
    [OK] Leased license key 1 will expire in 11 days!
    2018-09-26 19:32:39.183054 [NOTICE] Memory size is: 65633856KB.
    2018-09-26 19:32:39.622593 [NOTICE] [OK] Updated license key has been created at /usr/local/lsws/conf/license.key.
    # 
    

    To see status, run

    # /usr/local/lsws/bin/lswsctrl status
    litespeed is running with PID 19512.
    # 
    

    Restart litespeed

    /usr/local/lsws/bin/lswsctrl restart
    

    Reset admin password

    /usr/local/lsws/admin/misc/admpass.sh