{"id":826,"date":"2015-10-05T17:05:58","date_gmt":"2015-10-05T08:05:58","guid":{"rendered":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/?page_id=826"},"modified":"2023-11-02T13:43:44","modified_gmt":"2023-11-02T04:43:44","slug":"command","status":"publish","type":"page","link":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/document\/command\/","title":{"rendered":"KUSANAGI Commands"},"content":{"rendered":"<h2 id=\"init\">init<\/h2>\n<p>KUSANAGI initialization<br \/>\nSet or change the user passwords of Linux and databases in the KUSANAGI virtual machine.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi init<\/p>\n<h3>Parameters<\/h3>\n<table>\n<tbody>\n<tr>\n<th>--tz TZ<\/th>\n<td>Designate TZ as timezone.This string is case-insensitive\u3002<br \/>\n\t\t\tAlso, timezone will be define as &#8220;Asia\/Tokyo&#8221; even the string is not incomplete such as &#8220;Toky&#8221;.<br \/>\n\t\t\tDesignate multi or numerous timezone will cause the error occurred.<br \/>\n\t\t\tIf didn&#8217;t designate <strong>Option--tz<\/strong> as timezone, select the timezone as interactive behavior. <\/td>\n<\/tr>\n<tr>\n<th>--lang [en|ja]<\/th>\n<td>Select your language.<br \/>\n\t\t\tDesignate en will defined as en_US.UTF-8. Further, designate ja will defined as ja_JP.UTF-8.<\/td>\n<\/tr>\n<tr>\n<th>--keyboard [en|ja]<\/th>\n<td>Configure keyboard layout.Designate en or ja.<br \/>\n\t\t\tDesignate us keyboard with <strong>Option--keyboard en<\/strong>.Further, designate ja keyboard(jp106) with <strong>Option--lang ja<\/strong>.<br \/>\n\t\t\tIf didn&#8217;t designate <strong>Option--keyboard<\/strong> as keyboard, select the keyboard as interactive behavior.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--passwd password |<\/br> --kusanagi-pass password<\/th>\n<td> Configure KUSANAGI user password.<br \/>\n\t\t\t If didn&#8217;t designate <strong>--passwd either --kusanagi-pass<\/strong> as password, configure a password as interactive behavior.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--phrase phrase |<\/br> --kusanagi-phrase phrase |<\/br> --nophrase|--no-phrase<\/th>\n<td>If designate <strong>Option--phrase<\/strong> either<strong>--kusanagi-phrase<\/strong>, configure the phrase with kusanagi SSH user&#8217;s key phrase as interactive behavior.<br \/>\n\t\t\tConfigure the phrase at least more then 5 more letters.<br \/>\n\t\t\tIf didn&#8217;t designate <strong>Option--nophrase either--no-phrase<\/strong>,user kusanagi SSH user&#8217;s key phrase will configure as blank string.<br \/>\n\t\t\tWhen designate this option (--phrase,--kusanagi-phrase, --nophrase,--no-phrase) in same time, even designate option afterward also would be effective.<br \/>\n\t\t\tWhen didn&#8217;t designate this <strong>Option (--phrase,--kusanagi-phrase, --nophrase,--no-phrase)<\/strong>, configure SSH user&#8217;s key phrase as interactive behavior.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--dbrootpass password<\/th>\n<td>Designate MySQL root&#8217;s password.<br \/>\n\t\t\tThis password should be designate by using \u300cA\uff5eZ,a\uff5ez,0\uff5e9,.,!,#,%,+,_,-\u300dand at least more then 8 letters<br \/>\n\t\t\tWhen didn&#8217;t designate this <strong>Option --dbrootpass<\/strong> ,configure MySQL root password as interactive behavior.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--nginx | --httpd<\/th>\n<td>Designate to active server.If designate to NGINX, enter --nginx to execute, enter --httpd to active Apache2 server.<br \/>\n\t\t\tIf designate <strong>Option --nginx,--httpd<\/strong> in the same time, the previous option only will be execute.<br \/>\n\t\t\tIf didn&#8217;t designate <strong> Option --nginx,--httpd<\/strong>, designate to active server as interactive behavior.<br \/>\n\t\t<\/tr>\n<tr>\n<th>--hhvm | --php8 | --php7 | --php5<\/th>\n<td>Designate to active the application server.Enter --hhvm to active HHVM, enter --php8 to active PHP8, , enter --php7 to active PHP7, enter --php5 to active PHP-FPM(PHP5).<br \/>\n\t\t\tIf designate <strong>Option --hhvm,--php8,--php7,--php5<\/strong> in the same time, the previous option only will be execute.<br \/>\n\t\t\tIf didn&#8217;t designate <strong>Option --hhvm,--php8,--php7,--php5<\/strong> ,designate to active application server as interactive behavior.<br \/>\n\t\t<\/tr>\n<\/tbody>\n<\/table>\n<h3>Example<\/h3>\n<p><a href=\"\/document\/kusanagi-init\/\">For more details, please refer to KUSANAGI Initialization<\/a><\/p>\n<hr \/>\n<h2 id=\"provision\">provision [profile]<\/h2>\n<p>WordPress Provision<br \/>\nA profile created by KUSANAGI for WordPress installation. Web server configuration , document root will provision in this profile.<\/p>\n<h3>Example<\/h3>\n<p>kusanagi provision [options] profile<\/p>\n<h3>Parameter<\/h3>\n<table>\n<tbody>\n<tr>\n<th>--WordPress|--wordpress<\/th>\n<td>WordPress Provision<br \/>\n\t\t\tEven didn&#8217;t enter the following options --concrete5,-c5,--drupal8,--drupal,--lamp,--LAMP ,will be automatic provisioning with WordPress.<br \/>\n\t\t\tIf designate the following Option --WordPress,--wordpress,--concrete5,-c5,--drupal8,--drupal,--lamp,--LAMP multiple times, the latest designated option only would be effective.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--concrete5|--c5<\/th>\n<td>Provision with Concrete5<\/td>\n<\/tr>\n<tr>\n<th>--drupal8|--drupal<\/th>\n<td>Provision with Drupal8<\/td>\n<\/tr>\n<tr>\n<th>--lamp|--LAMP<\/th>\n<td>Provision with LAMP(Linux+NGINX+MySQL+PHP) or LEMP(Linux+NGINX+MySQL+PHP).<\/td>\n<\/tr>\n<tr>\n<th>--wplang [en_US|ja]<\/th>\n<td> Only effective while WordPress is provisioning.<br \/>\n\t\t\t\tDesignate to en_US will able to choose language while WordPress installing.<br \/>\n\t\t\t\tDesignate to ja will install WordPress Japanese version WordPress.<br \/>\n\t\t\t\tIf didn&#8217;t designate <strong>Option--wplang<\/strong>, will configure en_US either ja as interactive behavior.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--WooCommerce|--woo<\/th>\n<td>Only effective while WordPress is provisioning.<br \/>\n\t\t\tDesignate <strong>Option --WooCommerce or --woo<\/strong> will install WooCommerce in the same time while WordPress installing.<br \/>\n\t\t\tWhile configuring --wplang ja ,or installing by Japanese language as interactive behavior. WooCommerce Japanese package, WooCommerce plugin for Japan, GMO permanent plugin will be installing in the same time.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--fqdn hostname<\/th>\n<td>Designate the hostname(FQDN) for profile.When Designate is specified, the host name is set in the web server configuration file and \/etc\/hosts file.<br \/>\n\t\t\tIf didn&#8217;t designate Option--fqdn, will configure the hostname as interactive behavior.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--email Email address|<\/br>--noemail|--no-email<\/th>\n<td>Designate <strong>Option --email<\/strong> , using the designated email to issue Let&#8217;s Encrypt ssl certificate.<br \/>\n\t\t\tIf designate <strong>Option --noemail either --no-email<\/strong>, Let&#8217;s Encrypt SSL certificate won&#8217;t issue.<br \/>\n\t\t\tDesignated the following Options --email\u3001--noemail\u3001--no-email mulitiple times,the latest designated only will be effective.<br \/>\n\t\t\tIf didn&#8217;t designated Option --email\u3001--noemail\u3001--no-email, will configure the email address as interactive behavior.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--dbname database name<\/th>\n<td>Using designate database name create a new database.<br \/>\n\t\t\tConfigure database name by \u300cA\uff5eZ\u3001a\uff5ez\u30010\uff5e9\u3001.\u3001_\u3001-\u300dand the letters should be between 3\uff5e64.<br \/>\n\t\t\tIf didn&#8217;t designate <strong>Options --dbname<\/strong>, will configure database name as interactive behavior.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--dbuser DB username<\/th>\n<td>Designate to database username to access to database which created previously.<br \/>\n\t\t\tConfigure the DB username by\u300cA\uff5eZ\u3001a\uff5ez\u30010\uff5e9\u3001.\u3001_\u3001-\u300dand should be between 3~16 letters.<br \/>\n\t\t\tIf didn&#8217;t designate <strong>Option--dbuser<\/strong>, configure DB username as interactive behavior.<\/p>\n<tr>\n<th>--dbpass DB password<\/th>\n<td>Configure the DB password as DB user.<br \/>\n\t\t\t\t\tConfigure the DB password \u300cA\uff5eZ\u3001a\uff5ez\u30010\uff5e9\u3001.\u3001!\u3001#\u3001%\u3001+\u3001_\u3001-\u300dand at least more than 8 letters.<br \/>\n\t\t\t\t\tIf didn&#8217;t designate <strong>Option --dbpass<\/strong>, configure DB password as interactive password.\n\t\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>profile<\/th>\n<td>Random to designate profile.<br \/>\n\t\t\t\t\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u300cA\uff5eZ\u3001a\uff5ez\u30010\uff5e9\u3001.\u3001_\u3001-\u300d\u306e\u7d44\u307f\u5408\u308f\u305b\u304b\u3089\u306a\u308b3\uff5e24\u6587\u5b57\u306e\u6587\u5b57\u5217\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n\t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<h3>Example<\/h3>\n<p><a href=\"\/document\/kusanagi-provision\">Please refer to \u300eWordPress Provision\u300f<\/a><\/p>\n<hr \/>\n<h2 id=\"status\">status<\/h2>\n<p>Show the current status of KUSANAGI.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi status<\/p>\n<h3>Parameters<\/h3>\n<p>None<\/p>\n<h3>Example<\/h3>\n<pre># kusanagi status                                                                                                                         \r\nProfile: [\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb]\r\nType: WordPress\r\nKUSANAGI Version 8.0.0\r\n[VM\u30a4\u30e1\u30fc\u30b8\u540d]\r\n\r\n*** nginx ***\r\n\u25cf nginx.service - The NGINX HTTP and reverse proxy server\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: disabled)\r\n   Active: active (running) since Wed 2016-09-07 11:51:22 JST; 6h ago\r\n\r\n*** Apache2 ***\r\n\u25cf httpd.service - The Apache HTTP Server\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/httpd.service; disabled; vendor preset: disabled)\r\n   Active: inactive (dead)\r\n\r\n*** HHVM ***\r\n\u25cf hhvm.service - HHVM virtual machine, runtime, and JIT for the PHP language\r\n   Loaded: loaded (\/etc\/systemd\/system\/hhvm.service; enabled; vendor preset: disabled)\r\n   Active: active (running) since Wed 2016-09-07 11:51:22 JST; 6h ago\r\n\r\n*** php-fpm ***\r\n\u25cf php-fpm.service - The PHP FastCGI Process Manager\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/php-fpm.service; disabled; vendor preset: disabled)\r\n   Active: inactive (dead)\r\n\r\n*** php7-fpm ***\r\n\u25cf php7-fpm.service - The PHP FastCGI Process Manager\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/php7-fpm.service; disabled; vendor preset: disabled)\r\n   Active: inactive (dead)\r\n\r\n*** Cache Status ***\r\n\r\nfcache off\r\nbcache off\r\nDone<\/pre>\n<p>The contents should be like the following.<\/p>\n<ul>\n<li>Profile<br \/>\nCurrent Profile<\/li>\n<li>Type<br \/>\n\u30ab\u30ec\u30f3\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7(WordPress, concrete5, drupal8, lamp\u306e\u3044\u305a\u308c\u304b\u304c\u5165\u308b)\u3002<\/li>\n<li>KUSANGI Version<br \/>\nCurrent version of KUSANAGI.<\/li>\n<li>VM\u30a4\u30e1\u30fc\u30b8\u540d<br \/>\n\u4f7f\u7528\u3059\u308b\u30af\u30e9\u30a6\u30c9\u30d7\u30ed\u30d0\u30a4\u30c0\u56fa\u6709\u306e\u6587\u5b57\u5217\u3002<\/li>\n<li>*** nginx ***<br \/>\nNGINX\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3002\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u304d\u306f\u3001Active\u884c\u306brunning \u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/li>\n<li>*** Apache2 ***<br \/>\nApache2(httpd)\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3002\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u304d\u306f\u3001Active\u884c\u306brunning \u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/li>\n<li>*** HHVM ***<br \/>\nHHVM\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3002\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u304d\u306f\u3001Active\u884c\u306brunning \u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/li>\n<li>*** PHP-FPM ***<br \/>\nPHP-FPM(PHP5)\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3002\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u304d\u306f\u3001Active\u884c\u306brunning \u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/li>\n<li>*** PHP7 ***<br \/>\nPHP7\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3002\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u304d\u306f\u3001Active\u884c\u306brunning \u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/li>\n<li>fcache<br \/>\nfcache \u304con \u304b off \u304b\u3092\u8868\u793a\u3059\u308b\u3002<\/li>\n<li>bcache<br \/>\nbcache \u304con \u304b off \u304b\u3092\u8868\u793a\u3059\u308b\u3002\u30d7\u30ed\u30d3\u30b8\u30e7\u30f3\u30bf\u30a4\u30d7\u304cWordPress\u4ee5\u5916\u306e\u5834\u5408\u3001\u3082\u3057\u304f\u306fWordPress\u306e\u521d\u671f\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u8868\u793a\u3055\u308c\u306a\u3044\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2 id=\"warm-up\">warm-up<\/h2>\n<p>Warm up HHVM by having it access itself a few times.<br \/>\n<small>* Only available when using HHVM.<\/small><\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi warm-up<\/p>\n<h3>Parameters<\/h3>\n<p>None<\/p>\n<h3>Example<\/h3>\n<pre># kusanagi warm-up\r\nhttp:\/\/\/  ############\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"target\">target [profile]<\/h2>\n<p>Change the target profile for &#8220;warm-up&#8221;, &#8220;bcache&#8221;, and &#8220;update&#8221; commands.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi target [profile]<\/p>\n<h3>Parameters<\/h3>\n<p>profile<\/p>\n<h3>Example<\/h3>\n<p>\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u7701\u7565\u3059\u308b\u3068\u3001\u30ab\u30ec\u30f3\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre># kusanagi target\r\nsaya\r\nDone.<\/pre>\n<p>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u6307\u5b9a\u3057\u305f\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30ab\u30ec\u30f3\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u3068\u304d\u5b58\u5728\u3057\u306a\u3044\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3001\u521d\u671f\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3044\u306a\u3044\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3066\u3082\u3001\u8a2d\u5b9a\u306b\u5931\u6557\u3057\u307e\u3059\u3002<\/p>\n<pre># kusanagi target saya\r\nTarget is changed to saya\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"update\">update [plugin|cert {profile}]<\/h2>\n<p>Update KUSANAGI WordPress plugins or SSL Certificate of Let&#8217;s Encrypt.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi update plugin<br \/>\nkusanagi update cert kusanagi_html<\/p>\n<h3>Parameters<\/h3>\n<p>plugin | cert {profile}<\/p>\n<h3>Example<\/h3>\n<p>\u30ab\u30ec\u30f3\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u6700\u65b0\u7248\u306e\u6642\u306f\u3001\u4f55\u3082\u3057\u307e\u305b\u3093\u3002<\/p>\n<pre># kusanagi update plugin\r\nDone.\r\n<\/pre>\n<p>\u30ab\u30ec\u30f3\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3082\u3057\u304f\u306f\u6307\u5b9a\u3057\u305f\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u3001Let&#8217;s Encrypt SSL\u8a3c\u660e\u66f8\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<br \/>\nLet&#8217;s Encrypt SSL\u8a3c\u660e\u66f8\u3092\u767a\u884c\u3057\u3066\u3044\u306a\u3044\u3068\u304d\u306f\u3001\u4f55\u3082\u3057\u307e\u305b\u3093\u3002<\/p>\n<pre># kusanagi update cert kusanagi\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"remove\">remove [-y] [profile]<\/h2>\n<p>KUSANAGI\u3067\u4f7f\u7528\u3059\u308b\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3057\u307e\u3059\u3002\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3001DocumentRoot\u306e\u5185\u5bb9\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi remove<br \/>\nkusanagi remove -y kusanagi_html<\/p>\n<h3>Parameter<\/h3>\n<table>\n<tbody>\n<tr>\n<th>[-y]<\/th>\n<td>-y \u3092\u6307\u5b9a\u3057\u306a\u3044\u5834\u5408\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3001DocumentRoot\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u524a\u9664\u3059\u308b\u969b\u306b\u3001y\/n\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br \/>\n-y \u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u3001y\/n \u3092\u5165\u529b\u3059\u308b\u3053\u3068\u306a\u304f\u3059\u3079\u3066\u524a\u9664\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<th>[profile]<\/th>\n<td>profile\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001\u6307\u5b9a\u3057\u305f\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3057\u307e\u3059\u3002profile\u3092\u6307\u5b9a\u3057\u306a\u3044\u5834\u5408\u306f\u3001\u30ab\u30ec\u30f3\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3057\u307e\u3059\u3002Delete the profile after designated a new profile.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Example<\/h3>\n<pre># kusanagi remove kusanagi_html\r\nRemove kusanagi_html config files ? [y\/n] y\r\nRemove \/home\/kusanagi\/kusanagi_html ? [y\/n] y\r\nRemove kusanagi_html database ? [y\/n] y\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"nginx\">nginx<\/h2>\n<p>Switch to using nginx. Restart nginx by this command if nginx is already working.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi nginx<\/p>\n<h3>Parameter<\/h3>\n<p>None<\/p>\n<h3>Example<\/h3>\n<pre># kusanagi nginx\r\nuse nginx\r\nRemoved symlink \/etc\/systemd\/system\/multi-user.target.wants\/httpd.service.\r\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/nginx.service to \/usr\/lib\/systemd\/system\/nginx.service.\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"httpd\">httpd<\/h2>\n<p>Switch to using Apache.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi httpd<\/p>\n<h3>Parameters<\/h3>\n<p>None<\/p>\n<h3>Example<\/h3>\n<pre># kusanagi httpd\r\nuse httpd\r\nJob for httpd.service failed because the control process exited with error code. See \"systemctl status httpd.service\" and \"journalctl -xe\" for details.\r\nRemoved symlink \/etc\/systemd\/system\/multi-user.target.wants\/nginx.service.\r\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/httpd.service to \/usr\/lib\/systemd\/system\/httpd.service.\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"hhvm\">hhvm<\/h2>\n<p>Switch to using HHVM.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi hhvm<\/p>\n<h3>Parameters<\/h3>\n<p>None<\/p>\n<h3>Example<\/h3>\n<pre># kusanagi hhvm\r\nuse hhvm\r\nRemoved symlink \/etc\/systemd\/system\/multi-user.target.wants\/php7-fpm.service.\r\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/hhvm.service to \/etc\/systemd\/system\/hhvm.service.\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"php8\">php8<\/h2>\n<p>Switch to using PHP8. Restart PHP8  this command if PHP8 is already working.<\/p>\n<h3>Command line<\/h3>\n<p>kusanagi php8<\/p>\n<h3>Parameter<\/h3>\n<p>None<\/p>\n<h3>Example<\/h3>\n<pre># kusanagi php8\r\nuse php8\r\nRemoved symlink \/etc\/systemd\/system\/multi-user.target.wants\/php-fpm.service.\r\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/php8-fpm.service to \/usr\/lib\/systemd\/system\/php8-fpm.service.\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"php7\">php7<\/h2>\n<p>Switch to using PHP7. Restart PHP7  this command if PHP7 is already working.<\/p>\n<h3>Command line<\/h3>\n<p>kusanagi php7<\/p>\n<h3>Parameter<\/h3>\n<p>None<\/p>\n<h3>Example<\/h3>\n<pre># kusanagi php7\r\nuse php7\r\nRemoved symlink \/etc\/systemd\/system\/multi-user.target.wants\/php-fpm.service.\r\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/php7-fpm.service to \/usr\/lib\/systemd\/system\/php7-fpm.service.\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"php-fpm\">php-fpm<\/h2>\n<p>Switch to using php-fpm.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi php-fpm<\/p>\n<h3>Parameters<\/h3>\n<p>None<\/p>\n<h3>Example<\/h3>\n<pre># kusanagi php-fpm\r\nuse php-fpm\r\nRemoved symlink \/etc\/systemd\/system\/multi-user.target.wants\/hhvm.service.\r\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/php-fpm.service to \/usr\/lib\/systemd\/system\/php-fpm.service.\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"restart\">restart<\/h2>\n<p>Restart the enabled services those KUSANAGI provides(nginx, Apache, HHVM, php8, php7, php5)<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi restart<\/p>\n<h3>Parameter<\/h3>\n<p>no<\/p>\n<h3>Example<\/h3>\n<pre># kusanagi restart\r\nDone.<\/pre>\n<hr \/>\n<h2 id=\"bcache\">bcache<\/h2>\n<p>Turn on, off or clear bcache.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi bcache [on|off|clear]<\/p>\n<h3>Parameters<\/h3>\n<table>\n<tbody>\n<tr>\n<th>on<\/th>\n<td>Turn on bcache.<\/td>\n<\/tr>\n<tr>\n<th>off<\/th>\n<td>Turn off bcache.<\/td>\n<\/tr>\n<tr>\n<th>clear<\/th>\n<td>Clear bcache.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2 id=\"fcache\">fcache<\/h2>\n<p>Turn on, off and clear for fcache. Turning on will switch to Nginx.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi fcache [on|off|clear]<\/p>\n<h3>Parameters<\/h3>\n<table>\n<tbody>\n<tr>\n<th>on<\/th>\n<td>Turn on fcache. Will switch to nginx.<\/td>\n<\/tr>\n<tr>\n<th>off<\/th>\n<td>Turn off fcache.<\/td>\n<\/tr>\n<tr>\n<th>clear<\/th>\n<td>Clear fcache.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2 id=\"configure\">configure<\/h2>\n<p>Optimize the settings of KUSANAGI.<br \/>\nRun in case of an instance change after setting up KUSANAGI.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi configure<\/p>\n<h3>Parameters<\/h3>\n<p>None<\/p>\n<hr \/>\n<h2 id=\"setting\">setting --fqdn FQDN [profile]<\/h2>\n<p>(KUSANAGI 7.8.2 or higher)<br \/>\nChange the host name during provision.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi setting --fqdn host.example.com saya<\/p>\n<h3>Parameters<\/h3>\n<table>\n<tbody>\n<tr>\n<th>--fqdn<\/th>\n<td>Specific host name with FQDN(Fully Qualified Domain Name).<\/td>\n<\/tr>\n<tr>\n<th>profile<\/th>\n<td>Input profile name.Skip this procedure to continue using current profile.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2 id=\"setting\">setting --fqdn FQDN [profile]<\/h2>\n<p>provision \u6642\u306b\u6307\u5b9a\u3057\u305f\u30db\u30b9\u30c8\u540d(FQDN)\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi setting --fqdn host.example.com saya<\/p>\n<h3>Parameter<\/h3>\n<table>\n<tbody>\n<tr>\n<th>--fqdn<\/th>\n<td>\u5909\u66f4\u3059\u308b\u30db\u30b9\u30c8\u540d\u3092FQDN(Fully Qualified Domain Name)\u3067\u6307\u5b9a\u3057\u307e\u3059<\/td>\n<\/tr>\n<tr>\n<th>profile<\/th>\n<td>\u5bfe\u8c61\u306e\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u5165\u529b\u3057\u307e\u3059\u3002\u7701\u7565\u6642\u306f\u30ab\u30ec\u30f3\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2 id=\"ssl\">ssl [options] [profile]<\/h2>\n<p>Configure SSL related settings for current profile or specified profile.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi ssl --email john@example.com saya<\/p>\n<h3>Parameter<\/h3>\n<table>\n<tbody>\n<tr>\n<th>--email email address<\/th>\n<td>It will issue SSL certificate of Let&#8217;s Encrypt. Enter the email address to use for contact from Let&#8217;s Encrypt.<br \/>\nWhen SSL certificate of Let&#8217;s Encrypt is successfully issued, it activates automatic update of SSL certificate.<\/td>\n<\/tr>\n<tr>\n<th>--cert [Certificate file] --key [key file]<\/th>\n<td>Copies the specified certificate file and key file and sets it as SSL certificate.<br \/>\nThe options --cert and --key must be set at the same time.<br \/>\nThis option can not be used with option --email at the same time.<\/td>\n<\/tr>\n<tr>\n<th>--https [redirect|noredirect]<\/th>\n<td>Configure 301 redirect for HTTP to HTTPS.<br \/>\nAfter specifying redirect, activate the sending of a header directing 301 permanent redirects.<br \/>\nOnce you specify noredirect, you enable sending 301 headers directing 301 permanent redirects.<\/td>\n<\/tr>\n<tr>\n<th>--hsts [off|weak|mid|high]<\/th>\n<td>HSTS(HTTP Strict Transport Security)\u306e\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<br \/>\n<strong>off <\/strong>: Disable HSTS.<br \/>\n<strong>weak<\/strong>: Enable HSTS. (It does not include the subdomain of the specified host name (FQDN).)<br \/>\n<strong>mid <\/strong>: Enable HSTS. (Includes the subdomain of the specified host name (FQDN), not using the preload HSTS.)<br \/>\n<strong>high<\/strong>: Enable HSTS. (Includes the subdomain of the specified host name (FQDN), use Preload HSTS.)<br \/>\n<small>When setting high (using Preload HSTS), register the domain name in <a href=\"https:\/\/hstspreload.appspot.com\"> HSTS Preload list registration site <\/a>.<br \/>\nIn order to set it from &#8220;high&#8221; once, in order to set it other than &#8220;high&#8221;, it is necessary not only to change the setting with the option --hsts but also to cancel preload HSTS registration on a mail basis.<br \/>\nFor details, refer to the item &#8220;Removal&#8221; of <a href=\"https:\/\/hstspreload.appspot.com\"> HSTS Preload List Registration Site <\/a>.<\/small><\/td>\n<\/tr>\n<tr>\n<th>--auto [on|off]<\/th>\n<td>Enable \/ disable automatic updating of certificate of Let&#8217;s Encrypt.<br \/>\nIf on is specified, Let&#8217;s Encrypt&#8217;s automatic certificate renewal is enabled.<br \/>\nIf off is specified, invalidate certificate automatic updating of Let&#8217;s Encrypt.<br \/>\nThis option will not do anything if you are not using a Let&#8217;s Encrypt certificate.<\/td>\n<\/tr>\n<tr>\n<th>profile<\/th>\n<td>Enter the target profile. When it is omitted, the current profile is used.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2 id=\"https\">https [redirect|noredirect]<\/h2>\n<p>(KUSANAGI 7.8.2 or higher)<br \/>\nEnable or disable the permanent redirect (301) to HTTPS from HTTP.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi https redirect<\/p>\n<h3>Parameters<\/h3>\n<table>\n<tbody>\n<tr>\n<th>redirect<\/th>\n<td>Enable the permanent redirect 301<\/td>\n<\/tr>\n<tr>\n<th>noredirect<\/th>\n<td>Disable the permanent redirect 301<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2 id=\"auto\">autorenewal [on|off]<\/h2>\n<p>(KUSANAGI 7.8.2 or higher)<br \/>\nEnable or disable the auto-renewal of Let&#8217;s Encrypt certificates<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi autorenewal off<\/p>\n<h3>Parameters<\/h3>\n<table>\n<tbody>\n<tr>\n<th>on<\/th>\n<td>Enable auto-renewal<\/td>\n<\/tr>\n<tr>\n<th>off<\/th>\n<td>Disable auto-renewal (Run this command to use an OV or EV SSL certificate)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2 id=\"images\">images [options] [profile]<\/h2>\n<p>Optimize JPEG\/PNG files below the sepecified directories. Use this command to reduce the size of existing JPEG\/PNG files.  Replace the image size, quality, number of colors, etc. for files with the following extensions jpg, jpeg, JPG, JPEG, png, PNG.<\/p>\n<pre>kusanagi images --dir wp-contents\/uploads --quality 80 --resize 1280x1024 --color 256 --user kusanagi:kusanagi --mode 0644<\/pre>\n<h3>Command Line<\/h3>\n<p>kusanagi images saya<\/p>\n<h3>Parameters<\/h3>\n<table>\n<tbody>\n<tr>\n<th>--dir|--directory directory1[:directory2:&#8230;]<\/th>\n<td>Specify the target directory.  To specify multiple directories,  separate  them  with  &#8220;:&#8221;.<br \/>\n\t\t\tBoth absolute and relative paths can be specified as directories.  If the directory name is<br \/>\n\t\t\trelative, it is relative to the  profile  directory  (\/home\/kusanagi\/profile_name\/Document\u2010<br \/>\n\t\t\tRoot).   If  you  omit  the  directory  name  as an argument, or if you do not specify this<br \/>\n\t\t\toption, Specity wp-contents\/uploads as the target directory.<\/p>\n<pre>kusnagi images --dir \/home\/kusanagi\/kusanagi_html\/DocumentRoot\/wp-contents\/themes:wp-contents\/uploads saya<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<th>--jpg|--jpeg<\/th>\n<td>It targets JPEG files (files with extension .jpg, .jpeg, .JPG, .JPEG).  If both  the --png<br \/>\n\t\t\toption is specified or both options are not specified, both JEPG file and PNG file are targeted.<\/td>\n<\/tr>\n<tr>\n<th>--png<\/th>\n<td> It targets PNG files (files with extension .png, .PNG).  If both the  --jpeg|--jpeg  option<br \/>\n           is specified or both options are not specified, both JEPG file and PNG file are targeted.<\/td>\n<\/tr>\n<tr>\n<th>--verbose<\/th>\n<td>Displays the name of the directory being processed, the content of the processing, the name<br \/>\n\t\t\tof the file being processed, and so on.  If this option is not specified, only the processing<br \/>\n\t\t\tcontent  is  output.   Please  note that a large amount of output will be displayed if<br \/>\n\t\t\tthere is a large number of files in the target directory.<\/td>\n<\/tr>\n<tr>\n<th>--quality[1-100]<\/th>\n<td>Specify the quality of JPEG file and PNG file.  You can specify a number from  1-100  after<br \/>\n\t\t\tthe  option  --quarity.   If  you do not specify the number, 80 is used.  If this option is<br \/>\n\t\t\tspecified, --resize and --color option operations are  not  performed  unless  options  are<br \/>\n\t\t\tspecified  at  the  same  time.   If  you do not specify the option --quarity, --resize, or<br \/>\n\t\t\t--color, it behaves the same as specifying --quarity 80.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--resize[WIDTHxHIGHT]<\/th>\n<td>Specify the maximum size of JPEG\/PNG file and resize the image larger  than  the  specified<br \/>\n\t\t\tsize  while keeping the aspect ratio to the specified size.  You can specify width (number)<br \/>\n\t\t\tx height (number) after option --resize.  If you do not specify the value, 1280 x  1024  is<br \/>\n\t\t\tused.   If  this  option is specified, --quarity and --color option operations are not per\u2010<br \/>\n\t\t\tformed unless options are specified at the same time.  If you do  not  specify  the  option<br \/>\n\t\t\t--quarity, --resize, or --color, it behaves the same as specifying --resize 1280&#215;1024.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--color[1-256]<\/th>\n<td> Convert PNG files&#8217;s colors to the specified number of index colors.  You can specify a<br \/>\n\t\t\tnumber (1-256) after option --color.  If you do not specify the number, 256 is used.  If  this<br \/>\n\t\t\toption  is  specified,  --quarity  and  --resize option operations are not performed unless<br \/>\n\t\t\toptions are specified at the same time.  If  you  do  not  specify  the  option  --quarity,<br \/>\n\t\t\t--resize, or --color, it behaves the same as specifying --color 256.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>--strip<\/th>\n<td>Delete comment data (ex. EXIF information) of the JPEG files and reduce the file size.\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<th>--owneruser[:group]<\/th>\n<td>Execution  of kusanagi images rewrites the owner of the target files.  This option sets the<br \/>\n\t\t\towner to replace.  When group specifying aftter &#8220;:&#8221;, Set the group to replace at  the  same<br \/>\n\t\t\ttime.   If  this  option is not specified, kusanagi: kusanagi will be used as the owner and<br \/>\n\t\t\tgroup.<\/td>\n<\/tr>\n<tr>\n<th>--mode [octet_value]<\/th>\n<td>Execution of kusanagi images rewrites the permissions of the  target  files.   This  option<br \/>\n\t\t\tsets the permission to replace to an octal number (ex. 0644).  If this option is not speci\u2010<br \/>\n\t\t\tfied, 0644 is used as the permission.<\/td>\n<\/tr>\n<tr>\n<th>profile<\/th>\n<td>Input profile name.Skip this procedure to continue using current profile.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr\/>\n<h2 id=\"zabbix\">zabbix [on|off]<\/h2>\n<p>Configure the use of Zabbix Version 2.2 agent.<br \/>\nThis is an advanced command. You need a separate Zabbix server in order to run it.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi zabbix on<\/p>\n<h3>Parameters<\/h3>\n<table>\n<tbody>\n<tr>\n<th>on<\/th>\n<td>Activates and boots Zabbix Version 2.2 agent<\/td>\n<\/tr>\n<tr>\n<th>off<\/th>\n<td>Shuts down Zabbix Version 2.2 agent<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"monit\">monit [on|off|config]<\/h2>\n<p>(KUSANAGI 7.8.3 or higher)<br \/>\nEnable or disable system monitoring with monit. On is setting by default.<\/p>\n<h3>Command Line<\/h3>\n<p>kusanagi monit on<\/p>\n<table>\n<tbody>\n<tr>\n<th>no parameter<\/th>\n<td>Show the current status of monit(on\/off)<\/td>\n<\/tr>\n<tr>\n<th>on<\/th>\n<td>enable monit<\/td>\n<\/tr>\n<tr>\n<th>off<\/th>\n<td>disable monit<\/td>\n<\/tr>\n<tr>\n<th>config<\/th>\n<td>create the configuration file of monit<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>init KUSANAGI initialization Set or change the user passwords of Linux and databases in the KUSANAGI virtual machine. Command Line kusanagi init Parameters &#8211;tz TZ Designate TZ as timezone.This string is case-insensitive\u3002 Also, timezone will be define as &#8220;Asia\/Tokyo&#8221; even the string is not incomplete such as &#8220;Toky&#8221;. Designate multi or numerous timezone will cause [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":784,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-826","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/wp-json\/wp\/v2\/pages\/826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/wp-json\/wp\/v2\/comments?post=826"}],"version-history":[{"count":121,"href":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/wp-json\/wp\/v2\/pages\/826\/revisions"}],"predecessor-version":[{"id":3786,"href":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/wp-json\/wp\/v2\/pages\/826\/revisions\/3786"}],"up":[{"embeddable":true,"href":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/wp-json\/wp\/v2\/pages\/784"}],"wp:attachment":[{"href":"https:\/\/kusanagi.tokyo\/en-kusanagi8\/wp-json\/wp\/v2\/media?parent=826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}