1-Click Install

From OpenLiteSpeed Wiki

Revision as of 20:51, 11 August 2016 by Rholda (talk | contribs)

ols1clk is our one click script to install OpenLiteSpeed. It can also install WordPress, lsphp, and MySQL


  • Operating System:
    • CentOS 5,6,7
    • Debian 7, 8, 9
    • Ubuntu 12,14,16
  • User Permission:
    • Must be run with superuser access (you may run it as root or use the sudo command).


  • Download
    • You can download this directly from the command line using:

wget --no-check-certificate
curl -k -O

  • Run the ols1clk script ./
    • This will install OpenLiteSpeed and lsphp.
    • To install WordPress and (if not already present) MySQL as well, run ./ -w.
  • Answer any prompts within the script and you're done!

CLI Installation

  • Simply run the following command with any necessary flags added in:

bash <(curl [ flags ]


The ols1clk flags are listed below with the following format [ flag ] <parameter>

  • [ -a | --adminpassword ] <-- webAdminPassword> - Set the webAdmin password for OpenLiteSpeed instead of a random one.
    • If you omit <-- webAdminPassword>, ols1clk will prompt you to provide this password during installation.
  • [ -e | --email ] <EMAIL> - Set the email of the administrator.
  • --lsphpversion <VERSION> - Set the version of lsphp, such as 56. Currently we support '54 55 56 70'.
  • [ -w | --wordpress ] - Install and setup wordpress.
  • --wordpresspath <WORDPRESSPATH> - Use an existing wordpress installation if one is detected at <WORDPRESSPATH>, otherwise install wordpress there.
  • [ -r | --rootpassworddb ] <-- mysqlRootPassword> - Set the mysql server root password instead of using a random one.
    • If you omit <-- mysqlRootPassword>, ols1clk will prompt you to provide this password during installation.
  • [ -d | --databasename ] <DATABASENAME> - Set the database name to be used by wordpress.
  • [ -u | --usernamedb ] <DBUSERNAME> - Set the username of wordpress in mysql.
  • [ -p | --passworddb ] <-- databasePassword> - Set the password of wordpress in mysql instead of using a random one.
    • If you omit <-- databasePassword>, ols1clk will prompt you to provide this password during installation.
  • [ -l | --listenport ] <WORDPRESSPORT> - Set the listener port, default is 80.
  • --uninstall - Uninstall OpenLiteSpeed and remove installation directory
  • --purgeall - Uninstall OpenLiteSpeed, remove installation directory, and purge all data in mysql.
  • [ -h | --help ] - Display usage.


  1. bash -r -- rootpass -a -- 123456 --lsphpversion 70 -w
  2. bash -r -a -w
    • This will ask the password of MySQL and the WebAdmin during installation.
  3. bash -w
    • Will install WordPress and OLS using random passwords which will be written to a file when done.


Why should I use this?

If you are trying to install WordPress on your own machine and have no idea where to start, this is your one stop shop! This will install the web server, and optionally MySQL and WordPress as well, giving you a running start. After the script finishes, you can get straight to configuring the web server or jump right into setting up WordPress.

Do I need super user access?

Yes, you need root access to use the script. You may use a super user account, or you may use sudo as well.

Where is OLS installed to?


Where is WordPress installed?

By default, WordPress is installed to: /usr/local/lsws/wordpress/

What PHP version is installed?

The latest version from our repositories. Currently, it is version 5.6.x

I tried installing OLS once and it threw a bunch of text at me saying there was an error!

This one click install script should automatically install any dependencies you are missing.

Can I use it for my existing WordPress installation?

Yes! All you need to do is point the script to the installation path using the --wordpresspath option.

Will it break my existing WordPress installation?

Open LiteSpeed cannot read .htaccess files. However, this script will parse your .htaccess file and try to extract the relevant rewrite rules. Depending on how complex the file is, there may be issues in the conversion.

What happens when there is an OLS update?

The Web Admin says there is an update for OLS! The script installs using your OS's package manager. Just run update in the package manager to update your installation. e.g. yum update