Introducing LSWS One-Click Installation

LiteSpeed Web Server One Click Installation
Introducing a new way to install LiteSpeed Web Server with just one click! LiteSpeed Web Server One-Click Installation (lsws1clk.sh) comes with several options and can be used with any supported operating system. Using this versatile script, you can quickly and easily install our enterprise web server with its default settings, and you can choose to include other useful applications, including WordPress and the LiteSpeed Cache plugin.

The script includes a 15-day LiteSpeed Web Server trial license by default. After the trial period, you can apply your own license or enter your serial number using the --license [LICENSE_NO] parameter during installation. Don’t know what license is best for you? You can browse our licenses here. There’s a LiteSpeed Web Server license for every budget, starting at zero dollars!

Install LSWS and LSPHP

The default use for the one-click script sets a random admin password and installs only two pieces of software:

  • LiteSpeed Web Server
  • LSPHP
bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/lsws1clk/master/lsws1clk.sh )

Install LSWS and WordPress

If you want to host WordPress, the -W parameter installs all of the following:

  • LiteSpeed Web Server
  • LSPHP
  • MariaDB
  • WordPress
  • LiteSpeed Cache plugin
bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/lsws1clk/master/lsws1clk.sh ) -W

A few tips to keep in mind when using the script to install WordPress:

  • The -W parameter will install WordPress as shown above, but you will still need to configure the WordPress installation through the browser.
  • By default, a MariaDB database will be set up using this script. You can also specify another DB if needed, using the --with-mysql or --with-percona flags.
  • If you already have a WordPress installation running on another server, it can be imported into LiteSpeed with no hassle using the --wordpresspath parameter.
  • To completely install WordPress with your LiteSpeed installation, skipping the need for the browser installation process, use --wordpressplus [SITEDOMAIN]. The --wpuser, --wppassword, --wplang, and --sitetitle flags allow you to further customize the settings.

Other Examples

Here are a few more usage examples that you might find helpful:

  • ./lsws1clk.sh --lsphp 83: install LSWS with LSPHP v8.3 (also known as lsphp83)
  • ./lsws1clk.sh -A 123456 -E admin@example.com: install LSWS with WebAdmin password 123456 and email admin@example.com
  • ./lsws1clk.sh -R 123456 -W: install LSWS with WordPress and MariaDB root password 123456
  • ./lsws1clk.sh --wordpressplus example.com: install LSWS with a fully configured WordPress installation at example.com

Please see the documentation to learn how to use these and other options.

Additional Virtual Hosts

Any time you want to create an additional virtual host, we have another script for that. Create a vhost in seconds using vhsetup.sh with the -d option, like so:

/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) -d www.example.com

The document root in the example above would be /var/www/www.example.com. Be sure to substitute your own domain when you use the -d option.

Add Let’s Encrypt

Want to use Let’s Encrypt to get an SSL certificate? You can do that with the -le option, as long as you already have your domain configured to point to the server.

This example creates a www.example.com virtual host with the admin email address of admin@example.com. We used the -f option to force an HTTPS redirection:

/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) -d www.example.com -le admin@example.com -f

Make a WordPress vhost

If you want a WordPress virtual host, you can combine the -d and -w options, like so:

/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) -d www.example.com -w

This will create the www.example.com virtual host, and install all of the applications needed for WordPress.

NOTE: The first time you create an additional WordPress virtual host, you need to make sure the script can fetch your database root password. If you have a custom password, you can update /usr/local/lsws/password, or you can echo the password to /root/.db_password, like so:

echo 'root_mysql_pass="DB_ROOT_PASSWORD"' > /root/.db_password

Conclusion

The LiteSpeed Web Server one-click installation script has flexible options that allow you to make installation as simple or complex as you wish. Check out our documentation for more options, or watch our brief video to see lsws1clc in action.

If you’re an OpenLiteSpeed user, we’ve got a script for you, too. Find information about the OLS one-click script here.


Tags:

Related Posts


Comments