There are a couple projects I work on that use LiteSpeed WebServer as the web server. LiteSpeed or LSWS comes out with releases on a fairly regular basis so it is important to upgrade often. This process is usually really easy as the server will send an email to the web server administrator email address notifying them of any new upgrades. Upon receiving the email you simply login to the LiteSpeed web administration interface, click on Version Manager, and then click the Upgrade link located to the right of the latest release that has typically already been automatically downloaded. A couple times I have run into an issue where some servers have downloaded the upgrade and others have not so I typically wait for all servers to download the upgrade before upgrading any of the servers. Tonight I decided to figure out how to jump start this automatic download process or force the download of new LiteSpeed versions so I wouldn’t have to wait for all of the servers to automatically download the latest version. Below I describe what the admin interface might look like while you are waiting for an upgrade to automatically download, how to force download the new LiteSpeed upgrade, and how to make sure that your server is configured to automatically download the latest software from LiteSpeed Technologies.
Latest LiteSpeed Version Shows A Download Link Instead Of Upgrade:
Typically I will get notifications for all of my LiteSpeed servers in a relatively short amount of time though there have been times such as the latest upgrade where the server appears to never download the software automatically. In this scenario your LiteSpeed (lsws) admin interface would look similar to the below and instead of showing an Upgrade link to the right of the latest software it would display a Download link instead.
Latest LiteSpeed Software Providing A Download Link:
So you can obviously click on the Download link which will send you to litespeedtech.com where you can download the latest LiteSpeed version for your operating system. I have found it easier though to sort of jump start the automatic upgrade process by using the below instructions.
Force LiteSpeed Software Download To Provide Automatic Upgrade Link:
The end result of the below steps will be to upgrade LiteSpeed using the Upgrade link which will appear to the right of the latest software version and in place of the current Download link.
- Obtain LiteSpeed Package URL: First from the LiteSpeed admin interface select Actions from the top navigation menu and select Version Manager from the drop down menu. This will display the LiteSpeed Version Manager as shown in the example image above. Click the Download link to the right of the latest LSWS version and then locate your operating system and LiteSpeed version and right click the Download link located to the right of the correct package and copy the URL to your clipboard. More than likely you are using the free version of LiteSpeed so scroll to the bottom and make sure to obtain the URL to the Standard LiteSpeed version which will have a “-std” at the end of the file name.
- Change Directory To LSWS autoupdate: Now login to the server you want to upgrade LiteSpeed on and change into the LSWS autoupdate directory. The path will depend on where LiteSpeed was installed for instance on the example server LiteSpeed was installed in “/var/lsws” so the autoupdate directory path is “/var/lsws/autoupdate”. If you list the contents of the directory you will see similar contents to the below.
Contents Of LiteSpeed Auto Update (autoupdate) Directory:bash
- [root@server autoupdate]# ls -alh
- total 43M
- drwx------ 8 lsadm lsadm 4.0K Mar 2 19:20 .
- drwxr-xr-x 17 root root 4.0K Jul 22 2009 ..
- -rw-r--r-- 1 root web 0 Mar 2 19:27 .last
- -rw------- 1 web web 4.3M Apr 15 2009 lsws-4.0.1-std-i386-linux.tar.gz
- -rw------- 1 web web 4.3M Aug 21 2009 lsws-4.0.10-std-i386-linux.tar.gz
- drwxr-xr-x 12 root web 4.0K Apr 25 2009 lsws-4.0.2
- -rw------- 1 web web 4.3M Apr 25 2009 lsws-4.0.2-std-i386-linux.tar.gz
- -rw------- 1 web web 4.3M May 13 2009 lsws-4.0.3-std-i386-linux.tar.gz
- drwxr-xr-x 12 root web 4.0K Jun 30 2009 lsws-4.0.4
- -rw------- 1 web web 4.4M Jun 12 2009 lsws-4.0.4-std-i386-linux.tar.gz
- drwxr-xr-x 12 root web 4.0K Jul 7 2009 lsws-4.0.5
- -rw------- 1 web web 4.3M Jul 7 2009 lsws-4.0.5-std-i386-linux.tar.gz
- drwxr-xr-x 12 root web 4.0K Jul 14 2009 lsws-4.0.6
- -rw------- 1 web web 4.3M Jul 13 2009 lsws-4.0.6-std-i386-linux.tar.gz
- -rw------- 1 web web 4.3M Jul 26 2009 lsws-4.0.7-std-i386-linux.tar.gz
- drwxr-xr-x 12 root web 4.0K Jul 28 2009 lsws-4.0.8
- -rw------- 1 web web 4.3M Jul 27 2009 lsws-4.0.8-std-i386-linux.tar.gz
- drwxr-xr-x 12 root web 4.0K Jul 28 2009 lsws-4.0.9
- -rw------- 1 web web 4.3M Jul 28 2009 lsws-4.0.9-std-i386-linux.tar.gz
- -rw-r--r-- 1 web web 53K Mar 2 19:20 update.log
- Download Latest LiteSpeed Software: Issue the below command from within the autoupdate directory to download the latest LiteSpeed WebServer software package. You will use the command below but instead of the exact URL after wget you should paste what was copied to your clipboard in step 1. The output of the command was also provided so you could see how it would look during the download.
Download Latest LiteSpeed WebServer Software Package:bash
- [root@server autoupdate]# wget http://www.litespeedtech.com/packages/4.0/lsws-4.0.13-std-i386-linux.tar.gz
- --19:47:48-- http://www.litespeedtech.com/packages/4.0/lsws-4.0.13-std-i386-linux.tar.gz
- Resolving www.litespeedtech.com... 188.8.131.52
- Connecting to www.litespeedtech.com|184.108.40.206|:80... connected.
- HTTP request sent, awaiting response... 200 OK
- Length: 4606927 (4.4M) [application/gzip]
- Saving to: `lsws-4.0.13-std-i386-linux.tar.gz'
- 100%[===========================================================================================>] 4,606,927 313K/s in 14s
- 19:48:03 (312 KB/s) - `lsws-4.0.13-std-i386-linux.tar.gz' saved [4606927/4606927]
- Modify LSWS Download File: Now you need to modify the LiteSpeed download file which is located right inside of the autoupdate directory you are already in. Use your favorite text editor and change the version located in the download file to the version you have just downloaded. In the case of this example the contents of the download file should be the text shown below.
Contents Of LiteSpeed Download File:code
- Upgrade LiteSpeed WebServer: Log back into the LiteSpeed web administration interface and open the Version Manager. Now instead of Download displaying to the right of the latest LSWS version it should display a link titled Upgrade as displayed in the below example image. Click on that link to upgrade LiteSpeed WebServer and then perform a graceful restart.
- Verify New LSWS Version: Now log back into the LiteSpeed WebServer admin interface and verify you are running the latest software version.
Now that LiteSpeed is upgraded to the latest version you should also verify that the server is configured to automatically download the latest LiteSpeed WebServer version to allow you the easiest method to upgrade in the future. Click on Configuration in the top navigation and select Server from the drop down menu. In the second section titled General Settings you should verify that Check For Update is set to Daily and Download Update is set to Yes as displayed in the below example image.
LiteSpeed WebServer Configuration: General Settings
As long as those configuration settings are there then the latest updates should automatically download and allow you a one click upgrade of LiteSpeed WebServer.