### Setup Express Application Source: https://docs.litespeedtech.com/cloud/images/nodejs Commands to install Express and define a basic server startup file. ```bash npm install express --save ``` ```javascript const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => res.send('Hello World from OpenLitespeed Express JS!')) app.listen(port, () => console.log(`Example app listening on port ${port}!`)) ``` ```bash service lsws restart ``` -------------------------------- ### Start Demo Site Source: https://docs.litespeedtech.com/cloud/docker/prestashop Initializes the PrestaShop installation on the default localhost domain. ```bash bash bin/demosite.sh -P ``` -------------------------------- ### Install and Setup Ghost Source: https://docs.litespeedtech.com/cloud/images/nodejs Commands to install Ghost locally and perform initial configuration without Nginx or systemd. ```bash ghost install local ``` ```bash Ghost was installed successfully! To complete setup of your publication, visit: http://localhost:2368/ghost/ ``` ```bash ghost setup --no-setup-nginx --no-setup-systemd --no-setup-ssl --no-start ``` ```bash ? Enter your blog URL: http://example.com ? Enter your MySQL hostname: localhost ? Enter your MySQL username: root ? Enter your MySQL password: [hidden] ? Enter your Ghost database name: ghost_blog Ghost was installed successfully! To complete setup of your publication, visit: http://example.com/ghost/ ``` -------------------------------- ### Start Now Prompt Source: https://docs.litespeedtech.com/lsadc/installation Choose whether to start LiteSpeed Load Balancer immediately after installation. The default is 'Y' (Yes). ```text Would you like to start it right now [Y/n]? ``` -------------------------------- ### Navigate to Installation Directory and Run Install Script Source: https://docs.litespeedtech.com/lsadc/installation After downloading and decompressing, navigate to the extracted directory and execute the install script. ```bash cd lslb-xxxx ./install.sh ``` -------------------------------- ### Setup NestJS Project Source: https://docs.litespeedtech.com/cloud/images/nodejs Commands to install the NestJS CLI, create a project, and configure the application entry point. ```bash npm install -g @nestjs/cli nest new demo --package-manager npm ``` ```bash echo "require('./dist/main');" > demo/app.js ``` ```bash npm run build; pkill lsnode ``` ```bash npm i lscache-nestjs ``` -------------------------------- ### Execute Installation Script Source: https://docs.litespeedtech.com/lsws/installation Run the install script to begin the configuration process. ```bash ./install.sh ``` -------------------------------- ### Enable Redis Setup for Users Source: https://docs.litespeedtech.com/cp/plesk/configuration Creates the size entry for a user but does not start the service. Similar to `enable`, requires LiteSpeed home directory, user details, and size in MB. ```bash ./redis_user_action.sh enablesetup /usr/local/lsws user /var/www/vhosts/user 10 user2 /var/www/vhosts/user2 20 ``` -------------------------------- ### Get Command Syntax and Example Source: https://docs.litespeedtech.com/products/lsmcd/commands Retrieves the value associated with a specific key. ```text get ``` ```text get mykey ``` ```text VALUE mykey 0 10 myvalueabc END ``` -------------------------------- ### Access Installation Directory Source: https://docs.litespeedtech.com/lsws/installation Navigate into the extracted directory to prepare for installation. ```bash cd lsws-* ``` -------------------------------- ### Install cPanel ZeroConf Plugin Source: https://docs.litespeedtech.com/cp/cpanel/adc-zconf Steps to install the cPanel ZeroConf plugin by downloading the zip file, extracting it, and running the installation script. ```bash $ sudo mkdir /opt/whm_lsadc_zconf $ sudo unzip whm_lsadc_zconf-*.zip -d /opt/whm_lsadc_zconf $ sudo cd /opt/whm_lsadc_zconf $ sudo ./install.sh ``` -------------------------------- ### Install Ruby LSAPI from Source Source: https://docs.litespeedtech.com/lsws/extapp/ruby Manual installation steps for the Ruby LSAPI extension. Do not mix this with gem-based installations. ```bash tar zxvf ruby-lsapi.tar.gz cd ruby-lsapi ``` ```bash ruby setup.rb config ruby setup.rb setup ruby setup.rb install ``` -------------------------------- ### Interactive Setup Prompts Source: https://docs.litespeedtech.com/cloud/images/nodejs-ali Prompts displayed during the initial server setup script. ```text Please input a valid domain: Please verify it is correct. [y/N] ``` ```text Do you wish to issue a Let's encrypt certificate for this domain? [y/N] Please enter your E-mail: Please verify it is correct: [y/N] ``` ```text Do you wish to force HTTPS rewrite rule for this domain? [y/N] ``` ```text Do you wish to update the system which include the web server? [Y/n] ``` -------------------------------- ### Setup Virtual Host Script (Direct Execution) Source: https://docs.litespeedtech.com/cloud/images/nodejs Execute the virtual host setup script directly without downloading it first. This is useful for quick setup or in environments where downloading is restricted. ```bash /bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) ``` -------------------------------- ### Upgrade Magento Setup Source: https://docs.litespeedtech.com/lscache/litemage/installation Run the Magento setup upgrade process. ```bash php bin/magento setup:upgrade ``` -------------------------------- ### Install MySQL Server Source: https://docs.litespeedtech.com/cloud/images/nodejs Installs the MySQL server package. After installation, it shows how to log into MySQL and update the root user's authentication method and password. ```bash sudo apt install mysql-server ``` ```bash sudo mysql # Now update your user with this command # Replace 'password' with your password, but keep the quote marks! ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; quit ``` -------------------------------- ### Correct HTTP Request Start Line Source: https://docs.litespeedtech.com/lsws/troubleshooting This is an example of a correctly formatted HTTP request line, which should start with a method like GET or POST. ```http GET / HTTP/1.1 ``` -------------------------------- ### Setup Virtual Host Script (Download and Run) Source: https://docs.litespeedtech.com/cloud/images/nodejs Download, make executable, and run the virtual host setup script for interactive mode. This script automates the setup of Listener, VirtualHost, Force SSL, Let's Encrypt, and WordPress. ```bash wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh chmod +x vhsetup.sh bash vhsetup.sh ``` -------------------------------- ### Start LiteSpeed Web ADC Service Source: https://docs.litespeedtech.com/lsadc/installation This command starts the LiteSpeed Web ADC service after installation is complete. Replace '[your_install_dir]' with the actual installation path. ```bash [your_install_dir]/bin/lslbctrl start. ``` -------------------------------- ### Incorrect HTTP Request Start Line Example Source: https://docs.litespeedtech.com/lsws/troubleshooting This is an example of an incorrectly formatted HTTP request line that can cause 'Bad request' errors. It incorrectly starts with 'Connection: Close'. ```http Connection: Close ``` -------------------------------- ### Run examplesup.sh Script Source: https://docs.litespeedtech.com/cloud/kubernetes/samples This script uses `kubectl` commands to create deployments, expose them as services, and create an ingress resource for a fanout configuration. It's a demonstration of creating backends via command line parameters. ```bash #!/bin/bash NAMESPACE="sandbox" kubectl create deployment echoheadersx --image=k8s.gcr.io/echoserver:1.10 -n $NAMESPACE kubectl create deployment echoheadersy --image=k8s.gcr.io/echoserver:1.10 -n $NAMESPACE kubectl expose deployment echoheadersx --port=80 --target-port=8080 --name=echoheaders-x -n $NAMESPACE kubectl expose deployment echoheadersy --port=80 --target-port=8080 --name=echoheaders-y -n $NAMESPACE kubectl create -f examples/ingress.yaml -n $NAMESPACE kubectl get ing echomap -n $NAMESPACE ``` -------------------------------- ### Install LSPHP Version Source: https://docs.litespeedtech.com/lsws/standalone Install a specific version of LiteSpeed PHP (LSPHP). This example installs PHP 7.0. Replace '70' with your desired version. ```bash yum install lsphp70* ``` -------------------------------- ### Install Redis on Ubuntu Source: https://docs.litespeedtech.com/lscache/lscwp/admin Install the Redis server package on Ubuntu using apt. ```bash apt install redis ``` -------------------------------- ### Setup Virtual Host Script with CLI Arguments (Download and Run) Source: https://docs.litespeedtech.com/cloud/images/nodejs Download, make executable, and run the virtual host setup script in CLI mode with specified arguments. Use -d for domain, -le for email, -f for force, and -w for WordPress setup. ```bash wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh chmod +x vhsetup.sh bash vhsetup.sh -d www.example.com -le admin@example.com -f -w ``` -------------------------------- ### Install PHP Extension Dependencies Source: https://docs.litespeedtech.com/lsws/standalone Install necessary development packages and tools required for compiling PHP extensions. This example installs dependencies for PHP 7.3. ```bash yum install -y lsphp73-devel make gcc glibc-devel ``` -------------------------------- ### Create a New Domain and Virtual Host Source: https://docs.litespeedtech.com/cloud/docker/magento Adds a new domain and configures a virtual host for it. Replace 'example.com' with your desired domain name. Use the '-A' or '--add' flag. ```bash bash bin/domain.sh [-A, --add] example.com ``` -------------------------------- ### Demo Site Initialization Source: https://docs.litespeedtech.com/cloud/docker/lsws-wordpress Sets up a default WordPress demo site at http://localhost. ```bash bash bin/demosite.sh ``` -------------------------------- ### Install LSPHP (Ubuntu/Debian) Source: https://docs.litespeedtech.com/lsws/extapp/php/getting_started Install LSPHP and desired extensions like mysql using the system's package manager. This example installs lsphp83 and its MySQL extension. ```bash $ sudo apt-get install lsphp83 lsphp83-common lsphp83-mysql ``` -------------------------------- ### Install LSPHP (CentOS/RHEL) Source: https://docs.litespeedtech.com/lsws/extapp/php/getting_started Install LSPHP and desired extensions like mysqlnd using the system's package manager. This example installs lsphp83 and its MySQL extension. ```bash $ sudo dnf install lsphp83 lsphp83-common lsphp83-mysqlnd ``` ```bash $ sudo yum install lsphp83 lsphp83-common lsphp83-mysqlnd ``` -------------------------------- ### Install WordPress with LiteSpeed Source: https://docs.litespeedtech.com/lsws/script The `-W` parameter installs WordPress, but requires further configuration through a web browser. Use `--wordpressplus` for a fully automated setup. ```bash bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/lsws1clk/master/lsws1clk.sh ) -W ``` -------------------------------- ### Set up Welcome Banner for Ubuntu/Debian Source: https://docs.litespeedtech.com/shared/cloud/buildcyberpanel Downloads and sets up a welcome banner script for Ubuntu/Debian systems. Ensure the script is executable. ```bash curl -s https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Banner/cyberpanel \ -o /etc/update-motd.d/99-one-click ``` ```bash chmod +x /etc/update-motd.d/99-one-click ``` -------------------------------- ### status Source: https://docs.litespeedtech.com/lsws/cp/cpanel/whm-litespeed-plugin/cli-lscmctl Get the most up to date LSCWP status for the provided WordPress installation. ```APIDOC ## ./lscmctl status ### Description Get the most up to date LSCWP status for the provided WordPress installation. ### Parameters #### Path Parameters - **wp path** (string) - Required - Path to a single WordPress installation ### Request Example ./lscmctl status /home/user/public_html/wp ``` -------------------------------- ### Create Virtual Hosts with vhsetup.sh (Interactive) Source: https://docs.litespeedtech.com/cloud/images/classicpress Use this script to automatically set up Listeners, Virtual Hosts, Force SSL, Let's Encrypt, and ClassicPress. It can be run interactively after downloading and making it executable, or directly via bash. ```bash wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh chmod +x vhsetup.sh bash vhsetup.sh ``` ```bash /bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) ``` -------------------------------- ### Install and Execute Launch Script Source: https://docs.litespeedtech.com/shared/cloud/buildwordpress Installs the cloud-init launch script for system cleanup and security regeneration, then executes it. ```bash curl -s https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/launch.sh \ -o /opt/launch.sh ``` ```bash chmod +x /opt/launch.sh ``` ```bash /opt/launch.sh ``` -------------------------------- ### Install Magento Application with Sample Data Source: https://docs.litespeedtech.com/cloud/docker/magento Installs Magento along with sample data for a specified domain. Use the '-S' or '--sample' flag in addition to the application and domain flags. ```bash ./bin/appinstall.sh [-A, --app] Magento [-D, --domain] example.com [-S, --sample] ``` -------------------------------- ### Automated WordPress Installation Source: https://docs.litespeedtech.com/lsws/script Use `--wordpressplus [SITEDOMAIN]` to fully install and configure WordPress, including enabling LSCache, skipping the browser setup process. Additional flags like `--wpuser`, `--wppassword`, `--wplang`, and `--sitetitle` can customize the installation. ```bash bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/lsws1clk/master/lsws1clk.sh ) --wordpressplus [SITEDOMAIN] ``` -------------------------------- ### Setup Virtual Host Script (Interactive Mode) Source: https://docs.litespeedtech.com/cloud/images/nodejs-ali Use this script to automatically set up Listeners, Virtual Hosts, Force SSL, Let's Encrypt, and WordPress. Download and make executable, or run directly. ```bash wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh chmod +x vhsetup.sh bash vhsetup.sh ``` ```bash /bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) ``` -------------------------------- ### Gets Command Syntax and Example Source: https://docs.litespeedtech.com/products/lsmcd/commands Retrieves a value and its associated CAS token for use in CAS operations. ```text gets ``` ```text gets mykey ``` ```text VALUE mykey 0 10 9 myvalueabc END ``` -------------------------------- ### Set up Welcome Banner for CentOS Source: https://docs.litespeedtech.com/shared/cloud/buildcyberpanel Downloads and sets up a welcome banner script for CentOS systems. Ensure the script is executable. ```bash curl -s https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Banner/cyberpanel \ -o /etc/profile.d/99-one-click.sh ``` ```bash chmod +x /etc/update-motd.d/99-one-click.sh ``` ```bash systemctl restart sshd ``` -------------------------------- ### Setup Virtual Host Script (Download and Execute) Source: https://docs.litespeedtech.com/cloud/images/drupal Downloads and executes a script to set up a virtual host. This script can be run in interactive or CLI mode. ```bash wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh chmod +x vhsetup.sh bash vhsetup.sh ``` ```bash /bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) ``` ```bash wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh chmod +x vhsetup.sh bash vhsetup.sh -d www.example.com -le admin@example.com -f ``` ```bash /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 ``` -------------------------------- ### Apache Configuration Error Example Source: https://docs.litespeedtech.com/lsws/cp/cpanel/php-user-ini This error message indicates that the 'SetEnv' command is not recognized, likely because the mod_env Apache module is not installed or enabled. ```log Apr 05 16:21:46 cptest.com restartsrv_httpd[21931]: AH00526: Syntax error on line 1 of /etc/apache2/conf.d/userdata/std/2_4/wpuser99/wpuser99.com/ini.conf: Apr 05 16:21:46 cptest.com restartsrv_httpd[21931]: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration ``` -------------------------------- ### Start LiteSpeed Magento Demo Site with Sample Data Source: https://docs.litespeedtech.com/cloud/docker/magento Starts the Magento demo site and includes sample data for a more complete demonstration. Use the '-S' flag in addition to '-M'. ```bash bash bin/demosite.sh -M -S ``` -------------------------------- ### Compile PHP Extension using PECL Source: https://docs.litespeedtech.com/lsws/standalone Compile and install a PHP extension using PECL. This example compiles the 'timezonedb' extension for PHP 7.3. ```bash /usr/local/lsws/lsphp73/bin/pecl install timezonedb ``` -------------------------------- ### Create PostgreSQL Database and User Source: https://docs.litespeedtech.com/cloud/images/django Sets up the database and user for PostgreSQL. ```bash sudo -u postgres psql CREATE DATABASE demo; CREATE USER myprojectuser WITH PASSWORD 'password'; GRANT ALL PRIVILEGES ON DATABASE demo TO myprojectuser; \q ``` -------------------------------- ### Add CacheKeyModify Rule in .htaccess Source: https://docs.litespeedtech.com/lscache/start A simple example to add a CacheKeyModify rule directly to the .htaccess file to drop query strings starting with 'utm_medium'. ```apache CacheKeyModify -qs:utm_medium ``` -------------------------------- ### Start LSPHP with Environment Variables Source: https://docs.litespeedtech.com/lsws/extapp/php/advanced When running LSPHP as a service, you can specify environment variables like `PHP_LSAPI_CHILDREN` to manage concurrent requests. This example also includes `PHP_LSAPI_MAX_REQUESTS`. ```bash $ sudo PHP_LSAPI_MAX_REQUESTS=5000 PHP_LSAPI_CHILDREN=35 /path/to/lsphp -b
``` -------------------------------- ### Run lscmctl setcacheroot command Source: https://docs.litespeedtech.com/cp/cpanel/wp-cache-management Example of using the lscmctl CLI script to set the cache root. This command is equivalent to the GUI's Cache Root Setup. ```bash ./lscmctl setcacheroot ``` -------------------------------- ### LSWS Installation Prompt: Enable PHP_SUEXEC Source: https://docs.litespeedtech.com/lsws/cp/plesk/installation Configure how PHP processes run. A value of '2' is recommended for shared hosting. ```text Enable PHP_SUEXEC. Run PHP processes as the account owner. Available values: 0 (off), 1 (on), and 2 (user home directory only). ``` -------------------------------- ### Install PEAR/PECL (Manual) Source: https://docs.litespeedtech.com/lsws/extapp/php/extensions Manually install PEAR/PECL by downloading go-pear.phar and running it with PHP. This method is useful when repository packages are not available. Ensure you are in the correct PHP bin directory. ```bash $ sudo cd /usr/local/lsws/lsphpXX/bin $ wget http://pear.php.net/go-pear.phar $ sudo ./php go-pear.phar $ sed -i -e 's/-C -n/-C/g' ./pecl ``` -------------------------------- ### Create Django Index View Source: https://docs.litespeedtech.com/cloud/images/django Define a simple view function in your Django app that returns an 'Hello, world!' HTTP response. This is a basic example for testing the application setup. ```python def index(request): return HttpResponse("Hello, world!") ``` -------------------------------- ### Set Default GeoIP2 Environment Variable for Country Name Source: https://docs.litespeedtech.com/lsws/cp/cpanel/geoip This example shows the default environment variable configuration for retrieving the country name. The variable name must start with 'GEOIP_' for rewrite rule compatibility. ```text GEOIP_COUNTRY_NAME COUNTRY_DB/country/names/en ``` -------------------------------- ### Install Yarn Package Source: https://docs.litespeedtech.com/cloud/images/rails-ali Install the Yarn package manager by adding the Yarn repository and then installing it via apt. This is a prerequisite for installing webpacker. ```bash curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt update sudo apt install yarn -y ``` -------------------------------- ### Install Magento Application Source: https://docs.litespeedtech.com/cloud/docker/magento Installs the Magento application for a specified domain after the database has been configured. Use '-A Magento' and '-D example.com'. ```bash ./bin/appinstall.sh [-A, --app] Magento [-D, --domain] example.com ``` -------------------------------- ### Install LSMCD (Make Install) Source: https://docs.litespeedtech.com/products/lsmcd/getting_started Installs LSMCD after successful compilation. This command requires elevated privileges. ```bash sudo make install ``` -------------------------------- ### Create Virtual Hosts with vhsetup.sh (CLI Mode) Source: https://docs.litespeedtech.com/cloud/images/classicpress This script can also be run in CLI mode to set up virtual hosts with specific parameters. Ensure your domain points to the server and your environment has PHP/SQL services and a SQL root password if using the -C flag. ```bash wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh chmod +x vhsetup.sh bash vhsetup.sh -D www.example.com -LE admin@example.com -F -C ``` ```bash /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 -C ``` -------------------------------- ### LSWS Installation Prompt: lsws.options file Source: https://docs.litespeedtech.com/lsws/cp/plesk/installation This prompt appears if no 'lsws.options' file is found, indicating a detailed installation process. Press 'Y' to continue. ```text Could not find an lsws.options file. We will ask you for your preferred settings instead, but for automated bulk provisioning, you may want to exit and create an lsws.options file. Continue Installer(Y/N) ? ``` -------------------------------- ### lssetup Source: https://docs.litespeedtech.com/lsws/cli-cgroups Sets up the system by enabling cgroups and namespaces, and modifies LiteSpeed configuration. ```APIDOC ## lssetup ### Description This program will set up your system if it is missing a cgroups feature. It also modifies the LiteSpeed Configuration, enabling cgroups and namespaces to they can be enabled at the virtual host level. Note: All configuration will need to be done either running as root, or by using the `sudo` command as a prefix for your command. ### Method POST (implied) ### Endpoint ./lssetup ### Parameters #### Query Parameters - **-h**, **--help** (boolean) - Optional - Show usage information - **-l** (string) - Optional - Set log level: `10`=debug, `20`=info (default), `30`=warning, `40`=error - **--log** (string) - Optional - Set log level: `10`=debug, `20`=info (default), `30`=warning, `40`=error - **-q**, **--quiet** (boolean) - Optional - Turn off all logging and only output what is requested - **-s** (string) - Optional - Set the LiteSpeed server root - **--server_root** (string) - Optional - Set the LiteSpeed server root - **-c** (string) - Optional - Set the minimum value for cgroups - **--cgroups** (string) - Optional - Set the minimum value for cgroups - **-i** (string) - Optional - Set the cgroups value if not set currently - **--cgroups-init** (string) - Optional - Set the cgroups value if not set currently - **-n** (string) - Optional - Set the minimum value for namespace - **--namespace** (string) - Optional - Set the minimum value for namespace - **-m** (string) - Optional - Set the namespace value if not set currently - **--namespace-init** (string) - Optional - Set the namespace value if not set currently - **-g**, **--no-config** (boolean) - Optional - Skip checking of LiteSpeed Config - **-t**, **--no-subtree_control** (boolean) - Optional - Skip checking of system `cgroup.subtree_control` file - **-u**, **--no-upgrade** (boolean) - Optional - Do not check the version of LiteSpeed - **-r**, **--revert-config** (boolean) - Optional - Revert modified LiteSpeed config file ### Request Example ```json { "example": "sudo /usr/local/lsws/lsns/bin/lssetup" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates success or failure of the operation. ``` -------------------------------- ### Install LSMCD and Set Ownership (Debian/Ubuntu) Source: https://docs.litespeedtech.com/products/lsmcd/getting_started Installs LSMCD and sets the owner for the installation directory on Debian/Ubuntu systems. Replace 'username' with the actual user. ```bash sudo make install sudo chown -R username /usr/local/lsmcd ``` -------------------------------- ### Install Cert-Manager using Helm Source: https://docs.litespeedtech.com/cloud/kubernetes/usage Install cert-manager and its Custom Resource Definitions (CRDs) using Helm. Ensure you have Helm and kubectl installed and configured. ```bash helm repo add jetstack https://charts.jetstack.io helm repo update kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.9.1/cert-manager.crds.yaml helm install \ cert-manager jetstack/cert-manager \ --namespace cert-manager \ --create-namespace \ --version v1.9.1 ``` -------------------------------- ### Full PHP Script Path Example Source: https://docs.litespeedtech.com/extapp/php/configuration/options This example demonstrates how the full path to a PHP script can be displayed when LSAPI_MAX_CMD_SCRIPT_PATH_LEN is configured appropriately. ```text /home/username/public_html/thisismydomain.com/wp-content/plugins/sample/plugin.php ``` -------------------------------- ### Perl Installation Error (CPAN) Source: https://docs.litespeedtech.com/lsws/extapp/perl/configuration This error occurs when the 'perl-CPAN' package is not installed, preventing CPAN.pm from being located. Ensure CPAN is installed for Perl module management. ```perl Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .). BEGIN failed--compilation aborted. ``` -------------------------------- ### Scan for WordPress Installations Source: https://docs.litespeedtech.com/lsws/cp/cpanel/whm-litespeed-plugin/cli-lscmctl This command scans the server for all WordPress installations and creates an lscm.data file. Use the -e flag to enable LSCWP on discovered installations. ```bash ./lscmctl scan ``` -------------------------------- ### Install Ghost CLI Source: https://docs.litespeedtech.com/cloud/images/nodejs Installs the Ghost Command Line Interface (CLI) globally using npm. This tool is used for managing Ghost blog installations. ```bash npm install -g ghost-cli@latest ``` -------------------------------- ### Install Siege on Ubuntu Source: https://docs.litespeedtech.com/lsws/benchmark Install the Siege benchmarking tool on Ubuntu systems using apt-get. ```bash apt-get install siege -y ``` -------------------------------- ### Create Strapi Project Source: https://docs.litespeedtech.com/cloud/images/nodejs Commands to initialize a new Strapi application in the document root. ```bash cd /usr/local/lsws/Example/html/ npx create-strapi-app strapi --quickstart ``` ```text Project information ┌────────────────────┬──────────────────────────────────────────────────┐ │ Time │ Tue Jan 26 2021 03:18:41 GMT+0000 (Coordinated … │ │ Launched in │ 5677 ms │ │ Environment │ development │ │ Process PID │ 79279 │ │ Version │ 3.4.4 (node v12.20.1) │ │ Edition │ Community │ └────────────────────┴──────────────────────────────────────────────────┘ Actions available One more thing... Create your first administrator 💻 by going to the administration panel at: ┌─────────────────────────────┐ │ http://localhost:1337/admin │ └─────────────────────────────┘ ``` -------------------------------- ### unflag Source: https://docs.litespeedtech.com/lsws/cp/cpanel/whm-litespeed-plugin/cli-lscmctl Unflag all discovered WordPress installations or a single installation. ```APIDOC ## ./lscmctl unflag ### Description Unflag all discovered WordPress installations or a single installation. Flagged installations will be skipped during mass operations. ### Parameters #### Path Parameters - **-m** (flag) - Optional - Unflag all discovered WordPress installations - **wp path** (string) - Optional - Path to a single WordPress installation ``` -------------------------------- ### Install PostgreSQL Server Source: https://docs.litespeedtech.com/cloud/images/django Installs PostgreSQL and contrib modules. ```bash apt install postgresql postgresql-contrib -y ``` -------------------------------- ### Setup Virtual Host Script (CLI Mode) Source: https://docs.litespeedtech.com/cloud/images/nodejs-ali Configure virtual hosts via the command line using this script. Requires domain and email arguments. Download and make executable, or run directly. ```bash wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh chmod +x vhsetup.sh bash vhsetup.sh -d www.example.com -le admin@example.com -f -w ``` ```bash /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 -w ``` -------------------------------- ### Set up virtual-host-specific PHP 7.4 Source: https://docs.litespeedtech.com/cloud/images/wordpress-ali Install PHP 7.4 and its extensions to enable a specific version for a virtual host. ```bash apt install lsphp74 lsphp74-common lsphp74-curl lsphp74-imagick lsphp74-imap lsphp74-json lsphp74-memcached lsphp74-mysql lsphp74-opcache lsphp74-redis -y ``` ```bash killall -9 lsphp ``` -------------------------------- ### Install Imagick Shared Extensions (CentOS/Debian) Source: https://docs.litespeedtech.com/lsws/extapp/php/extensions Specifies the installation directory for shared extensions when installing the Imagick PECL extension. Ensure the path matches your LSPHP version. ```bash Installing shared extensions: /usr/local/lsws/lsphpXX/lib64/php/modules/ Installing header files: /usr/local/lsws/lsphpXX/include/php/ ``` ```bash Installing shared extensions: /usr/local/lsws/lsphpXX/lib/php/XXXXXXXX/ Installing header files: /usr/local/lsws/lsphpXX/include/php/ ``` -------------------------------- ### Display lssetup usage information Source: https://docs.litespeedtech.com/lsws/cgroups Output the help message detailing available flags for the setup program. ```text usage: setup [-h] [-l LOG] [-q] [-s SERVER_ROOT] [-c CGROUPS] [-i CGROUPS_INIT] [-n NAMESPACE] [-m NAMESPACE_INIT] [-g] [-t] [-u] [-r] LiteSpeed Containers Setup Program options: -h, --help show this help message and exit -l LOG, --log LOG set logging level, 10=Debug, 20=Info, 30=Warning, 40=Error. Default is Info -q, --quiet turns off all logging and only outputs what is requested. -s SERVER_ROOT, --server_root SERVER_ROOT the LiteSpeed SERVER_ROOT -c CGROUPS, --cgroups CGROUPS The minimum value for cgroups -i CGROUPS_INIT, --cgroups-init CGROUPS_INIT The cgroups value if not set currently -n NAMESPACE, --namespace NAMESPACE The minimum value for namespace -m NAMESPACE_INIT, --namespace-init NAMESPACE_INIT The namespace value if not set currently -g, --no-config Skips checking of LiteSpeed Config -t, --no-subtree_control Skips checking of system cgroup.subtree_control file -u, --no-upgrade Does not check the version of LiteSpeed -r, --revert-config Reverts modified LiteSpeed config file ``` -------------------------------- ### Install PEAR/PECL (Debian/Ubuntu) Source: https://docs.litespeedtech.com/lsws/extapp/php/extensions Install the PEAR package manager, which includes PECL, on Debian/Ubuntu using apt. This is a prerequisite for installing PECL extensions using the PEAR manager. ```bash $ sudo apt install lsphpXX-pear ``` -------------------------------- ### Initialize Wagtail Project Source: https://docs.litespeedtech.com/cloud/images/django Commands to prepare the server, install dependencies, and configure static files for a Wagtail project. ```bash mv /usr/local/lsws/Example/html/demo /tmp ``` ```bash pip3 install wagtail ``` ```bash wagtail start demo ``` ```bash cd demo ``` ```bash pip3 install -r requirements.txt python3 manage.py migrate ``` ```bash mkdir -p /usr/local/lsws/Example/html/demo/demo/public/static ``` ```bash cat >> /usr/local/lsws/Example/html/demo/demo/settings/base.py <