一键脚本搭建OpenLiteSpeed+PHP+MariaDB/MySQL+WordPress+LiteSpeedCache

由于更新快、插件多、主题多、开发人员也多,wordpress是当前全世界最流行使用人数最多的博客和CMS程序。在linux环境下搭建一个高性能的wordpress运作环境其实是个有挑战性的任务,目前比较公认的是OpenLiteSpeed配合wordpress再加上wordpress的插件LiteSpeedCache。就是单纯搭建个wordpress博客,很多人不想折腾,也有些人不会折腾,这里litespeedtech其实早就发布了一键搭建脚本,今天推荐给大家。

项目地址:https://github.com/litespeedtech/ols1clk

安装

安装OpenLiteSpeed、LSPHP、MariaDB、WordPress,、LiteSpeed Cache插件:

bash <( curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh ) -w

仅限安装OpenLiteSpeed和LSPHP:

bash <( curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh )

下方有一些额外的选项和用法示例

./ols1clk.sh [option] [option] …
OptOptionsDescription
--adminuser [USERNAME]To set the WebAdmin username for OpenLiteSpeed instead of admin.
-A--adminpassword [PASSWORD]To set the WebAdmin password for OpenLiteSpeed instead of using a random one.
--adminport [PORTNUMBER]To set the WebAdmin console port number instead of 7080.
-E--email [EMAIL]To set the administrator email.
--lsphp [VERSION]To set the LSPHP version, such as 82. We currently support versions ’71 72 73 74 80 81 82′.
--mariadbver [VERSION]To set MariaDB version, such as 10.9. We currently support versions ‘10.2 10.3 …10.11’.
-W--wordpressTo install WordPress. You will still need to complete the WordPress setup by browser
--wordpressplus [SITEDOMAIN]To install, set up, and configure WordPress, also LSCache will be enabled
--wordpresspath [WP_PATH]To specify a location for the new WordPress installation or use for an existing WordPress.
-R--dbrootpassword [PASSWORD]To set the database root password instead of using a random one.
--dbname [DATABASENAME]To set the database name to be used by WordPress.
--dbuser [DBUSERNAME]To set the WordPress username in the database.
--dbpassword [PASSWORD]To set the WordPress table password in MySQL instead of using a random one.
--prefix [PREFIXNAME]To set the WordPress table prefix.
--listenport [PORT]To set the HTTP server listener port, default is 80.
--ssllistenport [PORT]To set the HTTPS server listener port, default is 443.
--wpuser [WP_USER]To set the WordPress admin user for WordPress dashboard login. Default value is wpuser.
--wppassword [PASSWORD]To set the WordPress admin user password for WordPress dashboard login.
--wplang [WP_LANGUAGE]To set the WordPress language. Default value is “en_US” for English.
--sitetitle [WP_TITLE]To set the WordPress site title. Default value is mySite.
--pure-mariadbTo install OpenLiteSpeed and MariaDB.
--pure-mysqlTo install OpenLiteSpeed and MySQL.
--pure-perconaTo install OpenLiteSpeed and Percona.
--with-mysqlTo install OpenLiteSpeed/App with MySQL.
--with-perconaTo install OpenLiteSpeed/App with Percona.
--owasp-enableTo enable mod_security with OWASP rules. If OLS is installed, then enable the owasp directly
--owasp-disableTo disable mod_security with OWASP rules.
--proxy-rTo set a proxy with rewrite type.
--proxy-cTo set a proxy with config type.
-U--uninstallTo uninstall OpenLiteSpeed and remove installation directory.
-P--purgeallTo uninstall OpenLiteSpeed, remove installation directory, and purge all data in MySQL.
-Q--quietTo use quiet mode, won’t prompt to input anything.
-V--versionTo display the script version information.
-v--verboseTo display more messages during the installation.
--updateTo update ols1clk from github.
-H--helpTo display help messages.

Examples

ExamplesDescription
./ols1clk.shTo install OpenLiteSpeed with a random WebAdmin password.
./ols1clk.sh --lsphp 81To install OpenLiteSpeed with lsphp80.
./ols1clk.sh -A 123456 -e [email protected]To install OpenLiteSpeed with WebAdmin password “123456” and email [email protected].
./ols1clk.sh -R 123456 -WTo install OpenLiteSpeed with WordPress and MySQL root password “123456”.
./ols1clk.sh --wordpressplus a.comTo install OpenLiteSpeed with a fully configured WordPress installation at “a.com”.

比如,输入命令

bash ols1clk.sh –wordpressplus www.zhujiceping.com

来实现wordpress安装及完整配置。

原创文章,作者:陌涛,如若转载,请注明出处:https://imotao.com/8411.html

(0)
陌涛的头像陌涛
上一篇 2024年3月14日 上午10:24
下一篇 2024年3月22日 下午6:09

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据