You can install OpenLiteSpeed, lsphp, MySQL database, WordPress, LSCache and LiteSpeed Cache plugin for WordPress in 1 click!
ols1clk
is a one click installation script for OpenLiteSpeed. Using this script, you can quickly and easily install OpenLiteSpeed with it’s default settings, Using different parameters for ex. ./ols1clk.sh -w
you can install WordPress files and MySQL database associated with it, along with LSCache Module and LiteSpeed Cache Plugin for WordPress at the same time.
Requirements
Currently one click installation only supports Centos(6-7), Debian(7-9) and Ubuntu(14,16,18) with 64 bits platforms
- Operating System:
- User Permission:
ols1clk
be run with superuser access, You can either switch to the super user (root) with thesu
command or (you may run it as root or use thesudo
command). How you do this will depend upon which distribution you use. Some distributions enable the root user (such as CentOS), while some do not (such as Ubuntu and Debian).
Installation
ols1clk
installation can be done in two different methods.
Direct Download
- Download ols1clk from GitHub.
- Then run the ols1clk script on your server command line with the following for OpenLiteSpeed, LSPHP, MySQL, WordPress, LiteSpeed Cache for WordPress tegether or without “-w” for openlitespeed only:
./ols1clk.sh -w
orbash ols1clk.sh -w;
CLI Installation
- Run the following in the command line:
wget --no-check-certificate https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh && bash ols1clk.sh -w
OR
- Run the following in the command line:
bash <( curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh ) [options] [options] …
- Above methods will install OpenLiteSpeed and lsphp module.
- To install WordPress and (if not already present) along with MySQL database, along with LSCache Module and LiteSpeed Cache Plugin for WordPress, run
./ols1clk.sh -w
. - Answer any prompts within the script and you’re done!
Options
--adminpassword <PASSWORD> OR -a <PASSWORD>
Usage for --adminpassword
bash ols1clk.sh --adminpassword <PASSWORD>
Usage for -a
:
bash ols1clk.sh -a <PASSWORD>
Above options will set the webAdmin password for OpenLiteSpeed instead of a random one.
Please Note: <PASSWORD>
parameter is optional, If you omit this, ols1clk will prompt you to provide a password. If you omit this parameter, ols1clk will set a random password.
--email OR -e
Usage for --email
:
bash ols1clk.sh --email <EMAIL>
Usage for -e
:
bash ols1clk.sh -e <EMAIL>
ols1clk script will set the email of the administrator for webAdmin, WordPress may require formatting such as test@example.com
Please Note: <EMAIL> Parameter is mandatory here.
--lsphp <VERSION>
Usage for --lsphp <VERSION>
:
bash ols1clk.sh --lsphp <VERSION>
It will seet the version of lsphp, such as 56. Currently we support ’54 55 56 70′.
Please Note: <VERSION> Parameter is mandatory here.
--wordpress or -w
Usage for --wordpress
:
bash ols1clk.sh --wordpress
Usage for -w
:
bash ols1clk.sh -w
ols1clk script will Install and setup WordPress, along with LSCache Module and LiteSpeed Cache Plugin for WordPress. you will still need to access the /wp-admin/wp-config.php file to finish your WordPress installation.
--wordpressplus <SITEDOMAIN>
Usage for --wordpressplus <SITEDOMAIN>
:
bash ols1clk.sh --wordpressplus <SITEDOMAIN>
ols1clk script will install, setup, and configure WordPress, eliminating the need to use the /wp-admin/wp-config.php setup.
Please Note: <SITEDOMAIN> parameter is a Mandatory requirement.
--wordpresspath <WORDPRESSPATH>
Usage for --wordpresspath <WORDPRESSPATH>
:
bash ols1clk.sh --wordpresspath <WORDPRESSPATH>
ols1clk script will use an existing WordPress installation if one is detected at WORDPRESSPATH
, otherwise install WordPress at the specified path.
--dbrootpassword <PASSWORD> OR -r <PASSWORD>
Usage for --dbrootpassword <PASSWORD>
:
bash ols1clk.sh --dbrootpassword <PASSWORD>
Usage for -r <PASSWORD>
:
bash ols1clk.sh -r <PASSWORD>
Set the mysql/mariadb server root password instead of using a random one.
Please note: If you omit [PASSWORD]
, ols1clk will prompt you to provide a password. If you omit this flag, ols1clk will set a random password.
--dbname <DATABASENAME>
Usage for -dbname <DATABASENAME>
:
bash ols1clk.sh --dbname <DATABASENAME>
ols1clk script installs the database name to be used by WordPress.
--dbuser <DBUSERNAME>
Usage for --dbuser <DBUSERNAME>
:
bash ols1clk.sh --dbuser DBUSERNAME
Set the username of WordPress in mysql/mariadb.
--dbpassword <PASSWORD>
Usage for --dbpassword <PASSWORD>
:
bash ols1clk.sh --dbpassword <PASSWORD>
Set the password of WordPress in mysql/mariadb instead of using a random one.
Please note: If you omit <PASSWORD>
, ols1clk will prompt you to provide a password. If you omit this parameter, ols1clk will set a random password.
--listenport <WORDPRESSPORT>
Usage for --listenport <WORDPRESSPORT>
:
bash ols1clk.sh --listenport <WORDPRESSPORT>
By default ols1clk will install to post 80, If you want to set another post, you can use --listport
parameter.
--wpuser <WORDPRESSUSER>
Usage for --wpuser <WORDPRESSUSER>
:
bash ols1clk.sh --wpuser <WORDPRESSUSER>
Set the WordPress user for admin login to the WordPress dashboard, default is wpuser.
--wppassword <PASSWORD>
Usage for --wppassword <PASSWORD>
:
bash ols1clk.sh --wppassword <PASSWORD>
Set the WordPress password for admin login to the WordPress dashboard.
Please note: If you omit <PASSWORD>
, ols1clk will prompt you to provide a password. If you omit this parameter, ols1clk will set a random password.
--wplang <WORDPRESSLANGUAGE>
Usage for --wplang <WORDPRESSLANGUAGE>
:
bash ols1clk.sh --wplang <WORDPRESSLANGUAGE>
Set the WordPress language, default is “en” for English. Check out our list of language codes supported by WordPress.
--sitetitle <WORDPRESSSITETITLE>
Usage for --sitetitle <WORDPRESSSITETITLE>
:
bash ols1clk.sh --sitetitle <WORDPRESSSITETITLE>
Set the WordPress site title, default is mySite.
--uninstall
Usage for --uninstall
:
bash ols1clk.sh --uninstall
Uninstall OpenLiteSpeed and remove installation directory..
--purgeall
Usage for --purgeall
:
bash ols1clk.sh --purgeall
Uninstall OpenLiteSpeed, remove installation directory, and purge all data in mysql/mariadb.
--version or -v
Usage for --version
:
bash ols1clk.sh --version
Usage for -v
:
bash ols1clk.sh -v
Display version information.
--help OR -h
Usage for --help
:
bash ols1clk.sh --help
Usage for -h
:
bash ols1clk.sh --h
Display usage.
Examples
1.
bash ols1clk.sh -r rootpass -a 123456 --lsphpversion 70 -w
This will install OLS and WordPress, set the version of lsphp to 7.0, set the MySQL server root password to rootpass
and the WebAdmin password to 123456
.
2.
bash ols1clk.sh -r -a -w
This will install OLS and WordPress and ask for the MySQL server root password and the WebAdmin password during installation.
3.
bash ols1clk.sh -w
This will install OLS and WordPress using random passwords which will be written to a file when done, also install LSCache Module and LiteSpeed Cache Plugin for WordPress
FAQs
Why should I use ols1clk (1-Click Install) Script?
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?
/usr/local/lsws
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