KUSANAGI Commands

init

KUSANAGI initialization
Set or change the user passwords of Linux and databases in the KUSANAGI virtual machine.

Command Line

kusanagi init

Parameters

None

Example

Please see KUSANAGI Initialization


provision [profile]

WordPress provisioning
Create a profile for using WordPress on KUSANAGI. You can configure web server, document root, and WordPress settings.

Command Line

kusanagi provision [--woo | --WooCommerce] [profile]

Parameters

--woo or --WooCommerce are optional commands to install WooCommerce at the same time as WordPress.

[profile] = any profile name
Such as: # kusanagi provision kusanagi_html
* name must be 3-24 characters, containing A-Z, a-z, 0-9, dot, underscore, or hyphen

Example

Please see WordPress Provisioning


status

Show the current status of KUSANAGI.

Command Line

kusanagi status

Parameters

None

Example

Profile: saya
KUSANAGI Version 7.8.1
(VM image name)

● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

(omission)

fcache off

warm-up

Warm up HHVM by having it access itself a few times.
* Only available when using HHVM.

Command Line

kusanagi warm-up

Parameters

None

Example

# kusanagi warm-up
http:///  ############

target [profile]

Change the target profile for “warm-up”, “bcache”, and “update” commands.

Command Line

kusanagi target [profile]

Parameters

profile

Example

# kusanagi target saya

Note: no output


update [plugin|cert {profile}]

Update KUSANAGI WordPress plugins or SSL Certificate of Let’s Encrypt

Command Line

kusanagi update plugin
kusanagi update cert kusanagi_html

Parameters

plugin | cert {profile}

Example

# kusanagi update plugin
# kusanagi update cert kusanagi

Note: no output


nginx

Switch to using Nginx.

Command Line

kusanagi nginx

Parameters

None

Example

# kusanagi nginx
use nginx
Removed symlink /etc/systemd/system/multi-user.target.wants/httpd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.

httpd

Switch to using Apache.

Command Line

kusanagi httpd

Parameters

None

Example

# kusanagi httpd
use httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
Removed symlink /etc/systemd/system/multi-user.target.wants/nginx.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

hhvm

Switch to using HHVM.

Command Line

kusanagi hhvm

Parameters

None

Example

# kusanagi hhvm
use hhvm
Removed symlink /etc/systemd/system/multi-user.target.wants/php7-fpm.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/hhvm.service to /etc/systemd/system/hhvm.service.

php-fpm

Switch to using php-fpm.

Command Line

kusanagi php-fpm

Parameters

None

Example

# kusanagi php-fpm
use php-fpm
Removed symlink /etc/systemd/system/multi-user.target.wants/hhvm.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.

php7

(KUSANAGI 7.7 or higher)
Switch to using php7.

Command Line

kusanagi php7

Parameters

None

Example

# kusanagi php7
use php7
Removed symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/php7-fpm.service to /usr/lib/systemd/system/php7-fpm.service.

bcache

Turn on, off or clear bcache.

Command Line

kusanagi bcache [on|off|clear]

Parameters

onTurn on bcache.
offTurn off bcache.
clearClear bcache.

fcache

Turn on, off and clear for fcache. Turning on will switch to Nginx.

Command Line

kusanagi fcache [on|off|clear]

Parameters

onTurn on fcache. Will switch to nginx.
offTurn off fcache.
clearClear fcache.

configure

Optimize the settings of KUSANAGI.
Run in case of an instance change after setting up KUSANAGI.

Command Line

kusanagi configure

Parameters

None


ssl

Using Let’s Encrypt, allow HTTPS for sites with self-signed certificates.

Command Line

kusanagi ssl --email john@example.com saya

Parameters

[--email] the address you input when you installed Let’s Encrypt
* “saya” is the name of your target profile


https

Enable or disable the permanent redirect (301) to HTTPS from HTTP.

Command Line

kusanagi https redirect

Parameters

redirectEnable the permanent redirect 301
noredirectDisable the permanent redirect 301

hsts

Allows HSTS(HTTP-Strict-Transport-Security) header referral
In a certain mode, it will also register on HSTS Preloading Submission.

Command Line

kusanagi hsts mid

Parameters

offDisable HSTS
weakEnable HSTS weak mode. In this mode, there is no preloading or HSTS allowed in subdomains
midEnable HSTS strong mode. In this mode, HSTS is allowed in subdomains but there is no preloading.
highEnable HSTS very strong mode. In this mode, HSTS is allowed in subdomains and preloading is registered. Please be careful because once this mode is selected you cannot use another mode.

autorenewal

Enable or disable the auto-renewal of Let’s Encrypt certificates

Command Line

kusanagi autorenewal off

Parameters

onEnable auto-renewal
offDisable auto-renewal (Run this command to use an OV or EV SSL certificate)

cert-change

If you are using a standard self-signed certificate for KUSANAGI’s SSL, use this to change the certificate.

Command Line

mkdir saya # (create a directory to store the certificate)
cp saya.crt saya/saya-cert.pem # (store the certificate)
cp saya.key saya/saya-privkey.pem # (store the certificate as a private key)
tar cf saya.tar.gz saya/ # (compress the directory into tar.gz)
kusanagi cert-change saya # (change the certificate using the compressed file)
* “saya” is the name of your target profile

Parameters

[(file)] designates the file name (minus “tar.gz”) or certificate


zabbix

Configure the use of Zabbix Version 2.2 agent.
This is an advanced command. You need a separate Zabbix server in order to run it.

Command Line

kusanagi zabbix on

Parameters

onActivates and boots Zabbix Version 2.2 agent
offShuts down Zabbix Version 2.2 agent