前回の記事 : http://qiita.com/muzudho1/items/a541cd68186b459147e0
自分で書いた設置マニュアル通りにやって、ほんとに設置できるのか やってみよう。
PuTTY でログイン
IPアドレスいれて SSH で接続。
初回接続時は なんか PuTTY からアラートが出るみたいだ。
[はい(Y)] を押して進む。
login as:
でユーザー名入力。
★略's password:
でパスワード入力。
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-66-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Last login: Fri Mar 24 17:55:43 2017 from ★略
よし入れた。
$ sudo su -
[sudo] password for ★ユーザ名:
でパスワード入力。よし入れた。
とりあえず Linux / Ubuntu 16.04 を最新にする。
# do-release-upgrade
Checking for a new Ubuntu release
No new release found
現状で 最新のようだ。
Apache 2.4.18 が入ってるか確認しよう。
# apache2 -version
The program 'apache2' is currently not installed. You can install it by typing:
apt install apache2-bin
そういえば、何も入ってないと言われてたな。
ついでに PHP も入ってるか確認しよう。
# php -v
The program 'php' can be found in the following packages:
* php7.0-cli
* hhvm
Try: apt install <selected package>
古い PHP も入ってなくて すっきりしている。
Apache2 と PHP7.0 を入れよう。
その前に IPアドレスを指定して ブラウザでアクセスしてみよう。
このサイトにアクセスできません
★.★.★.★ で接続が拒否されました。
次をお試しください:
接続を確認する
プロキシとファイアウォールを確認する
ERR_CONNECTION_REFUSED
よし。
Apache2 と PHP をインストールする。
apt-get install apache2 php
記事執筆現在、 php と指定しておけば PHP7.0 になる。
あっ! これでは イエスの y を押さないといけない。
インストールが終わったら IPアドレスを指定して ブラウザでアクセスする。
Ubuntu Logo Apache2 Ubuntu Default Page
デフォルト・ページが出てきた。
# apache2 -version
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2016-07-14T12:32:26
よし。Apache 2.4.18 が入った。
# php -v
PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017, by Zend Technologies
PHP 7.0.15 も入った。
次は composer をインストールしたい。
Ubuntu に PHP 7.0 対応のcomposer をインストールするには現状 apt-get では対応してない。
cURL を使ってインストールする。先に cURL をインストールする。
まず、cURL が既にインストールされていないか確認する。
# curl -V
The program 'curl' is currently not installed. You can install it by typing:
apt install curl
入ってない。じゃあインストールする。PHP7.0対応版のcurlは php-curl という名前をしている。
sudo apt-get install php-curl
あっ! これでは イエスの y を押さないといけない。
インストールが終わった。
# curl -V
The program 'curl' is currently not installed. You can install it by typing:
apt install curl
あれっ!?
Apache2 の再起動がいるんだろうか?
# sudo service apache2 restart
# curl -V
The program 'curl' is currently not installed. You can install it by typing:
apt install curl
なぜなのか。
構わずコマンドを打ってみるとどうなるのか?
# curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
The program 'curl' is currently not installed. You can install it by typing:
apt install curl
もう1回入力。
sudo apt-get install php-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
php-curl is already the newest version (1:7.0+35ubuntu6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
php-curl と curl は別物なんだろうか?
「What does “sudo apt-get update” do?」(ask ubuntu)
http://askubuntu.com/questions/222348/what-does-sudo-apt-get-update-do
apt-get する前に
# sudo apt-get update
しておく必要があるんだろうか? apt-get が持っている情報を更新するものらしい。
とくに 状況に進展なし。
4ステップ踏むといいのだろうか?
# sudo add-apt-repository ppa:ondrej/php
sudo: add-apt-repository: command not found
# sudo apt-get update
# sudo apt-get install php-curl
# sudo service apache2 restart
状況に進展なし。
既に動いているサーバーを見てみよう。
# curl -V
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
こういうのが出てくるといいらしい。
PHPが動いているか確認してみよう。
# cd /var/www/html
# nano tamesi1.php
tamesi1.php
<?php phpinfo();
と書いて
# php tamesi1.php
と実行。
動いているようだ。ブラウザで http://★サイトアドレス/tamesi1.php にアクセス。
画面には次のように表示された。
<?php phpinfo();
PHP 動いてないんじゃないか?
Apache2 と PHP7 の連携を先にやってから curl をインストールした方がいいのか?
PHPの設定
# cd /etc/php/7.0/cli
# ls
conf.d php.ini
# cp php.ini php.ini.original
# ls
conf.d php.ini php.ini.original
.original という名前を付けて php.iniのバックアップを残しておいて、 php.ini を編集する。
# nano php.ini
;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;
と書いている区画、Misc~ は雑多ぐらいの意味だが、
expose_php = On
は
expose_php = Off
にしておく。
「「expose_php = off」の設定」(エンジニア足立のコーディング日記)
https://www.deep-deep.jp/blog_engineer/archives/3793
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
という区画は長いんだが、区画の下の方にある
;error_log = php_errors.log
を、
error_log = /var/log/php_errors.log
に変える。
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
という区画はもっと長いんだが、
[mbstring]
という区画を探す。
;mbstring.language = Japanese
は頭のセミコロンを外す。
mbstring.language = Japanese
;mbstring.internal_encoding =
は、
mbstring.internal_encoding = UTF-8
に変える。
;mbstring.http_input =
は
mbstring.http_input = auto
に変える。
;mbstring.detect_order = auto
は、頭のセミコロンを外す。
mbstring.detect_order = auto
php.ini を保存して閉じる。
アパッチを再起動してみる。
# sudo service apache2 restart
これで http://★サイトアドレス/tamesi1.php にアクセス。
<?php phpinfo();
進展なし。
じゃあコマンドを打つ。
# apt-get -y install php php-cgi libapache2-mod-php php-common php-pear php-mbstring
- php
- php-cgi
- libapache2-mod-php
- php-common
- php-pear
- php-mbstring
こんなけインストールすれば どうか。
アパッチを再起動しなくても、http://★サイトアドレス/tamesi1.php にアクセスすると
PHPの情報が出てきた。
その phpInfo() の情報の中には curl も書かれている。
# curl -V
The program 'curl' is currently not installed. You can install it by typing:
apt install curl
じゃあ、アパッチ再起動。
# sudo service apache2 restart
# curl -V
The program 'curl' is currently not installed. You can install it by typing:
apt install curl
だめか。
また同じ手順をやってみる。
# sudo apt-get install php-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
php-curl is already the newest version (1:7.0+35ubuntu6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
# sudo service apache2 restart
# curl -V
The program 'curl' is currently not installed. You can install it by typing:
apt install curl
# curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
php-curl は入っているが、curl は入ってないみたいだ。
# sudo apt-get update
Hit:1 http://jp.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://jp.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://jp.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Fetched 102 kB in 1s (81.9 kB/s)
Reading package lists... Done
# sudo apt-get install php-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
php-curl is already the newest version (1:7.0+35ubuntu6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
単純に curl をインストールしてみる。
# sudo apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 139 kB of archives.
After this operation, 338 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 curl amd64 7.47.0-1ubuntu2.2 [139 kB]
Fetched 139 kB in 0s (234 kB/s)
Selecting previously unselected package curl.
(Reading database ... 55732 files and directories currently installed.)
Preparing to unpack .../curl_7.47.0-1ubuntu2.2_amd64.deb ...
Unpacking curl (7.47.0-1ubuntu2.2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up curl (7.47.0-1ubuntu2.2) ...
# curl -V
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
入ったのか?
前のサーバー構築では 手順の中で知らないうちに curl を入れていたのだろうか?
じゃあ composer のインストールを試す。
# curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
All settings correct for using Composer
Downloading...
Composer (version 1.4.1) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer
ダウンロードされたか。
composer で PHPの環境を設置しよう。
まず、フォルダーを作る。
# cd /var/www/html
# mkdir sasite1s
# cd /var/www/html/sasite1s
# nano composer.json
次のファイルを作る。
composer.json
{
"require": {
"php-amqplib/php-amqplib": "2.6.*"
}
}
保存して閉じる。
# composer install
実行すると エラーみたいな表示が出てくるが気にせず、時間がかかるので 1分ぐらい待つ。
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- php-amqplib/php-amqplib v2.6.3 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
- php-amqplib/php-amqplib v2.6.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
- php-amqplib/php-amqplib v2.6.1 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
- php-amqplib/php-amqplib v2.6.0 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
- Installation request for php-amqplib/php-amqplib 2.6.* -> satisfiable by php-amqplib/php-amqplib[v2.6.0, v2.6.1, v2.6.2, v2.6.3].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/15-xml.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-curl.ini
- /etc/php/7.0/cli/conf.d/20-dom.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mbstring.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-simplexml.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
- /etc/php/7.0/cli/conf.d/20-wddx.ini
- /etc/php/7.0/cli/conf.d/20-xmlreader.ini
- /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.0/cli/conf.d/20-xsl.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
bcmath ライブラリが無いという 本当にエラーが出ているようだ。
sudo apt install php7.0-bcmath
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
php7.0-bcmath
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.6 kB of archives.
After this operation, 64.5 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 php7.0-bcmath amd64 7.0.15-0ubuntu0.16.04.4 [15.6 kB]
Fetched 15.6 kB in 0s (171 kB/s)
Selecting previously unselected package php7.0-bcmath.
(Reading database ... 55739 files and directories currently installed.)
Preparing to unpack .../php7.0-bcmath_7.0.15-0ubuntu0.16.04.4_amd64.deb ...
Unpacking php7.0-bcmath (7.0.15-0ubuntu0.16.04.4) ...
Processing triggers for libapache2-mod-php7.0 (7.0.15-0ubuntu0.16.04.4) ...
Processing triggers for php7.0-fpm (7.0.15-0ubuntu0.16.04.4) ...
Setting up php7.0-bcmath (7.0.15-0ubuntu0.16.04.4) ...
Creating config file /etc/php/7.0/mods-available/bcmath.ini with new version
Processing triggers for libapache2-mod-php7.0 (7.0.15-0ubuntu0.16.04.4) ...
Processing triggers for php7.0-fpm (7.0.15-0ubuntu0.16.04.4) ...
入ったのか?
# composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Failed to download php-amqplib/php-amqplib from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
Now trying to download from source
- Installing php-amqplib/php-amqplib (v2.6.3): Cloning fa2f0d4410
[RuntimeException]
Failed to clone https://github.com/php-amqplib/php-amqplib.git, git was not found, check that it is installed and in your PATH env.
sh: 1: git: not found
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
エラーが出てきた。
The zip extension and unzip command are both missing
と書いているので、zip、unzip のパッケージをインストールする必要があるんじゃないか?
apt install unzip
unzip をインストールした。
# composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing php-amqplib/php-amqplib (v2.6.3): Downloading (100%)
Writing lock file
Generating autoload files
今度は うまくいったようだ。
# ls
composer.json composer.lock vendor
vendor フォルダーもできているので おっけ!
Expect 5.45
次は Expect を入れたい。最初からは入ってないようだ。
# apt-get -y install expect
インストールできた。
# expect -v
expect version 5.45
バージョンも 5.45 だ。
プロセス間通信関連のインストール
# sudo apt-get update
なんやかんやとチェックされる。
# sudo apt-get install libev-dev
あっ! これでは イエスの y を押さないといけない。
インストールできたようだ。 libev-dev はコマンドではないのでバージョン確認の方法は知らない。
EALANG 19.3 / RabbitMQ 3.6.6
一度の手順で両方インストールする。
# sudo apt-get update
# sudo apt-get install rabbitmq-server
あっ! これでは イエスの y を押さないといけない。
インストールに時間がかかりそう。
# gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010
なんか途中で止まった。
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key 2B90D010 from hkp server pgpkeys.mit.edu
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 2B90D010: public key "Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
うまくいったのか、失敗したのか分からん。
# gpg -a --export 7638D0442B90D010 | sudo apt-key add -
OK
# wget -O- https://packages.erlang-solutions.com/debian/erlang_solutions.asc | sudo apt-key add -
# sudo apt-get update
# sudo apt-get install init-system-helpers socat esl-erlang
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package esl-erlang is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'esl-erlang' has no installation candidate
これもエラーなのか、うまく行ったのか、分からない。
# wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
# sudo apt-get update
# sudo apt-get install rabbitmq-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
rabbitmq-server is already the newest version (3.5.7-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
これも、エラーなのか、うまく行ったのか、分からない。
# man rabbitmqctl
マニュアルが見れることから、RabbitMQ はインストールできたのではないか?
php-amqplib/php-amqplib 2.5.*
これはC++言語のソースコードだ。 Git Hub からダウンロードしてくる。
「[備忘録]githubやcodereposからファイルをダウンロードする方法」(electroholic)
http://d.hatena.ne.jp/eholic/20100327/p1
# git clone git://github.com/CopernicaMarketingSoftware/AMQP-CPP.git
こんなんでいいんだろうか?
The program 'git' is currently not installed. You can install it by typing:
apt install git
git が入ってないのか。
「UbuntuにGitをインストールする」(Androidアプリ開発@つくばの日記)
https://okuzawats.com/install-git-on-ubuntu-20150615/
# sudo apt-get install git
あっ! これでは イエスの y を押さないといけない。
設定
# git config --global user.name "★User Name"
# メールアドレスを登録します。
git config --global user.email "★hoge@hoge.com"
# 日本語ファイル名の文字化けの対策を行います。
git config --global core.quotepath false
なんの応答もないが いいんだろうか。
# git clone git://github.com/CopernicaMarketingSoftware/AMQP-CPP.git
Cloning into 'AMQP-CPP'...
remote: Counting objects: 2223, done.
remote: Total 2223 (delta 0), reused 0 (delta 0), pack-reused 2223
Receiving objects: 100% (2223/2223), 1.07 MiB | 231.00 KiB/s, done.
Resolving deltas: 100% (1656/1656), done.
Checking connectivity... done.
おっ、動いた。
だが AMQP-CPP は、どこにダウンロードされたのか。
# ls
AMQP-CPP composer.json composer.lock vendor
カレント・ディレクトリーかー。移動させよう。
# cd /usr/games
# mkdir sasite1s
# mv AMQP-CPP /usr/games/sasite1s/AMQP-CPP
# cd /usr/games/sasite1s/AMQP-CPP
次はこれをインストールしよう。
# make
The program 'make' can be found in the following packages:
* make
* make-guile
Try: apt install <selected package>
make 入ってないのか。
# apt install make
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
make-doc
The following NEW packages will be installed:
make
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 151 kB of archives.
After this operation, 365 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
Fetched 151 kB in 0s (233 kB/s)
Selecting previously unselected package make.
(Reading database ... 59643 files and directories currently installed.)
Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Unpacking make (4.1-6) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up make (4.1-6) ...
# make -v
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
よし、入った。
# make
make -C src all
make[1]: Entering directory '/usr/games/sasite1s/AMQP-CPP/src'
g++ -Wall -c -I. -std=c++11 -MD -g -fpic -o receivedframe.o receivedframe.cpp
make[1]: g++: Command not found
Makefile:52: recipe for target 'receivedframe.o' failed
make[1]: *** [receivedframe.o] Error 127
make[1]: Leaving directory '/usr/games/sasite1s/AMQP-CPP/src'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2
g++ が入っていないというエラーが出てきた。
# sudo apt install g++-4.9
あっ! これでは イエスの y を押さないといけない。
インストールには時間がかかりそうだ。
インストールは終わったようだが、
# make
make -C src all
make[1]: Entering directory '/usr/games/sasite1s/AMQP-CPP/src'
g++ -Wall -c -I. -std=c++11 -MD -g -fpic -o receivedframe.o receivedframe.cpp
make[1]: g++: Command not found
Makefile:52: recipe for target 'receivedframe.o' failed
make[1]: *** [receivedframe.o] Error 127
make[1]: Leaving directory '/usr/games/sasite1s/AMQP-CPP/src'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2
まだ g++ コマンドが無いようだ。
# apt-cache search g++
を実行。なんかいっぱい行が出てくる。
# sudo apt install g++-4.9
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++-4.9 is already the newest version (4.9.3-13ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
変わり無しか。
# g++ --version
The program 'g++' is currently not installed. You can install it by typing:
apt install g++
どういうことなのか。
# make install
mkdir -p /usr/include/amqpcpp
mkdir -p /usr/lib
cp -f amqpcpp.h /usr/include
cp -f include/*.h /usr/include/amqpcpp
cp -f src/libamqpcpp.so.2.6.2 /usr/lib
cp: cannot stat 'src/libamqpcpp.so.2.6.2': No such file or directory
Makefile:27: recipe for target 'install' failed
make: [install] Error 1 (ignored)
cp -f src/libamqpcpp.a.2.6.2 /usr/lib
cp: cannot stat 'src/libamqpcpp.a.2.6.2': No such file or directory
Makefile:27: recipe for target 'install' failed
make: [install] Error 1 (ignored)
ln -r -s -f /usr/lib/libamqpcpp.so.2.6.2 /usr/lib/libamqpcpp.so.2.6
ln -r -s -f /usr/lib/libamqpcpp.so.2.6.2 /usr/lib/libamqpcpp.so
ln -r -s -f /usr/lib/libamqpcpp.a.2.6.2 /usr/lib/libamqpcpp.a
# cd src
# make
g++ -Wall -c -I. -std=c++11 -MD -g -fpic -o receivedframe.o receivedframe.cpp
make: g++: Command not found
Makefile:52: recipe for target 'receivedframe.o' failed
make: *** [receivedframe.o] Error 127
じゃあ
# sudo apt install g++
あっ! これでは イエスの y を押さないといけない。
なにかインストールが始まった。
# g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
こんどはバージョンが見れる。 4.9 とかもう古いのか。
# cd /usr/games/sasite1s/AMQP-CPP
# make
今度は make が始まった。
# make install
mkdir -p /usr/include/amqpcpp
mkdir -p /usr/lib
cp -f amqpcpp.h /usr/include
cp -f include/*.h /usr/include/amqpcpp
cp -f src/libamqpcpp.so.2.6.2 /usr/lib
cp -f src/libamqpcpp.a.2.6.2 /usr/lib
ln -r -s -f /usr/lib/libamqpcpp.so.2.6.2 /usr/lib/libamqpcpp.so.2.6
ln -r -s -f /usr/lib/libamqpcpp.so.2.6.2 /usr/lib/libamqpcpp.so
ln -r -s -f /usr/lib/libamqpcpp.a.2.6.2 /usr/lib/libamqpcpp.a
ライブラリのインストールも すぐ終わった。
Sasite1s_Run
これは どうやって git から取ってくるのか?
# cd /
# git clone git://★ユーザ名@bitbucket.org/★チーム/sasite1s_run.git
こんなんでいいんだろうか。
Cloning into 'sasite1s_run'...
fatal: unable to connect to ★ユーザ名@bitbucket.org:
★ユーザ名@bitbucket.org: Name or service not known
確かにプライベートだが……。
HTTPS じゃなくて、SSH がいいのか?
# git clone git@bitbucket.org:★チーム/sasite1s_run.git
Cloning into 'sasite1s_run'...
★略
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '★略' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
うーむ。
カレント・ディレクトリのパーミッションがダメなのか?
# cd /usr/games/sasite1s
# git clone git@bitbucket.org:★チーム/sasite1s_run.git
Cloning into 'sasite1s_run'...
Warning: Permanently added the RSA host key for IP address ★略 to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
# git clone git://★ユーザ名@bitbucket.org/★チーム/sasite1s_run.git
Cloning into 'sasite1s_run'...
fatal: unable to connect to ★ユーザ名@bitbucket.org:
★ユーザ名@bitbucket.org: Name or service not known
だめ。
# git clone https://★ユーザ名@bitbucket.org/★チーム/sasite1s_run.git
Cloning into 'sasite1s_run'...
Password for 'https://★ユーザ名@bitbucket.org':
https でいいのか。
remote: Counting objects: 17, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 17 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (17/17), done.
Checking connectivity... done.
おー、いけたのか?
# ls
AMQP-CPP sasite1s_run
あー、フォルダーごと落とされるから、すぐ配置とは行かないわけか。
日本語名のファイルが文字化けしている。
BitBucket でもプルできなくなっている。
# mv ukamuse_sdt4_sasite1s /usr/games/sasite1s/ukamuse_sdt4_sasite1s
# mv ukamuse_sdt4.php /var/www/html/sasite1s/ukamuse_sdt4.php
# rm -rf sasite1s_run/
文字化けしたファイルは ビットバケツのウェブ上でファイル名変更し、
ローカルのフォルダーは削除、
クローンし直す。
評価ファイルの3つは どうやって持ってくる?
評価ファイルの3つもビットバケツに置いておけないか?
# cd /usr/games/sasite1s/ukamuse_sdt4_sasite1s
# chmod 777 bin
にして、FileZilla でファイル転送。
サービスの稼働
Apache2 が稼働しているか確認
http://★サイトアドレス/
にアクセスし、「It works!」と書かれているページが見えていればOK。
RabbitMQ が稼働しているか確認
# rabbitmqctl status
と打鍵し、走っている RabbitMQ のバージョン情報とかが表示されていれば おそらくOK。
浮かむ瀬(Sasite1s改造版) が稼働しているか確認
http://★サイトアドレス/sasite1s/ukamuse_sdt4.php?sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1 moves
とブラウザでアクセスして、1秒ほど待って bestmove ~ といった文字が帰ってくればOK。
apery のパーミッション例
root@tk2-240-29987:/usr/games/sasite1s/ukamuse_sdt4_sasite1s/bin# ls -l
-rwxr--r-- 1 root root 1601896 Mar 25 03:14 apery
# cd /usr/games/sasite1s/ukamuse_sdt4_sasite1s
s# ls -l
total 136
drwxr-xr-x 3 root root 4096 Mar 25 18:42 bin
-rwxr-xr-x 1 root root 130864 Mar 25 03:14 reservation.exe
-rwxr-xr-x 1 root root 362 Mar 25 03:14 reservation.expect
# ps aux | grep apery
と打鍵し、
root 9433 5.6 14.8 1482316 150724 pts/0 Sl 18:45 0:00 ./apery --enqueue From_UkamuseSdt4_Sasite1s durable --dequeue To_UkamuseSdt4_Sasite1s durable autodelete
といったものが1つだけあればOK。2つ以上あれば1つにすること。
無ければ起動する。
# cd /usr/games/sasite1s/ukamuse_sdt4_sasite1s/bin
# ./apery --enqueue From_UkamuseSdt4_Sasite1s durable --dequeue To_UkamuseSdt4_Sasite1s durable autodelete > ./apery.out.log 2> ./apery.err.log < /dev/null &
[1] 9355
ジョブ番号、プロセス番号は変わる。
起動に失敗した場合、
[1]+ Exit 126 ./apery --enqueue From_UkamuseSdt4_Sasite1s durabl e --dequeue To_UkamuseSdt4_Sasite1s durable autodelete > ./apery.out.log 2> ./ap ery.err.log < /dev/null
や、Killed といった表示がされる。
実行ファイルのパーミッション設定をしているかや、残りメモリ容量が足りているかなどを確認する。
浮かむ瀬(Saste1s改造版) に対局準備をさせる
# cd /usr/games/sasite1s
# ls -l
-rwxrw-r-- 1 csg11 csg11 12800 Mar 25 19:09 tamesi34_cs.exe
# ./tamesi34_cs.exe
C# のコンパイル環境も欲しいか。
mono がインストールされているか確認
# mono --version
インストール
# sudo apt-get install git autoconf libtool automake build-essential mono-devel gettext cmake
あっ! これでは イエスの y を押さないといけない。
「Compiling Mono on Linux」 (Mono)
http://www.mono-project.com/docs/compiling-mono/linux/
tamesi34_cs.cs をコンパイル
# mcs /r:RabbitMQ.Client.dll -define:UBUNTU tamesi34_cs.cs
tamesi34_cs.exe を実行
# ./tamesi34_cs.exe
UTF-8 が文字化けしている。
次のように打ち進む。
???????????????????????????????(^~^)
Name : ?????????
"" + [Enter] : ?????????
ex.) BrokenBox
Delete ? >
??????????????????????????(^~^)
ex.) SunnyBox
Enqueue ? > To_UkamuseSdt4_Sasite1s
????????????????????????????????(^~^)
(1) durable : RabbitMQ????????????
(2) autodelete : ????????1??????????????
(4) passive : ?????????????????????????????
(8) exclusive : ??????????????????????
ex.) 3
Enqueue ? > 3
?????????????????????????(^~^)
ex.) RainyBox
Dequeue ? > From_UkamuseSdt4_Sasite1s
???????????????????????????????(^~^)
(1) durable : RabbitMQ????????????
(2) autodelete : ????????1??????????????
(4) passive : ?????????????????????????????
(8) exclusive : ??????????????????????
ex.) 1
Dequeue ? > 1
<-------- [interrupt!] Registered(^q^)
という割り込みがあることを確認したあと、
???????[Ctrl]+[C]????????(^~^)
?????????????????????[Enter]????????(^?^)
ex.) hello, world
Enqueue? > usi
19:33:19 907 34_cs (P)___ enqueue begin [usi]
★略
で、usiok が返ってくるのを確認する。
返ってこない場合、[Ctrl]+[C] を押して tamesi34_cs.exe アプリケーションを抜け、やりなおす。
# jobs
[1]+ Running ./apery --enqueue From_UkamuseSdt4_Sasite1s durable --dequeue To_UkamuseSdt4_Sasite1s durable autodelete > ./apery.out.log 2> ./apery.err.log < /dev/null & (wd: /usr/games/sasite1s/ukamuse_sdt4_sasite1s/bin)
# cd /usr/games/sasite1s/ukamuse_sdt4_sasite1s/bin
# ls -l
total 1580
drwxrwxr-x 2 csg11 csg11 4096 Mar 25 04:30 20161007
-rwxr--r-- 1 root root 1601896 Mar 25 03:14 apery
-rw-r--r-- 1 root root 119 Mar 25 19:35 apery.err.log
-rw-r--r-- 1 root root 0 Mar 25 18:45 apery.out.log
-rw-r--r-- 1 root root 1534 Mar 25 03:14 benchmark.sfen
# nano apery.err.log
apery.err.log
10:35:48'503 (>_<)ukamuse_sdt4_child4 (P)___ WKP.bindQueue.onError [NOT_FOUND - no exchange 'myexchange' in vhost '/']
# rabbitmqctl list_exchanges
Listing exchanges ...
direct
amq.direct direct
amq.fanout fanout
amq.headers headers
amq.match headers
amq.rabbitmq.log topic
amq.rabbitmq.trace topic
amq.topic topic
「13日目: RabbitMQの個人的に難しかった用語の説明」(わすれっぽいきみえ)
http://kimikimi714.hatenablog.com/entry/2014/12/13/221621
うーむ。
じゃあ「amq.direct」を使うとか、「myexchange」を作って「direct」属性にするとかすればいいのか?
動いている方を見ると、
# rabbitmqctl list_exchanges
Listing exchanges ...
amq.rabbitmq.trace topic
direct
amq.rabbitmq.log topic
amq.topic topic
amq.direct direct
myexchange direct
amq.headers headers
amq.fanout fanout
amq.match headers
「myexchange direct」が作られている。
浮かむ瀬(Sasite1s改造版)の方を
// static std::string exchange_name = "myexchange";
static std::string exchange_name = "amq.direct";
このように改造したらどうだろうか?
あるいは PHP で exchange を作れないか?
「php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php」(php-amqplib/php-amqplib)
https://github.com/php-amqplib/php-amqplib/blob/master/PhpAmqpLib/Channel/AMQPChannel.php
例えば、こういう PHP でどうだろうか?
tamesi38a1.php
<?php
//
// AMQP の exchange の設定を試すだけ
//
require_once __DIR__ . '/vendor/autoload.php';
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
$exchange = 'myexchange';
$type = 'direct';
$passive = false;
$durable = true;
$auto_delete = true;
// キューを開く
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
$channel = $connection->channel();
$channel->exchange_declare($exchange, $type, $passive, $durable, $auto_delete);
// リソースを開放する
$channel->close();
$connection->close();
さくらVPS / Ubuntu の方が UTF-8 に対応してないんじゃないか?
「さくらVPSの日本語の文字化けを直す」(ヌキのエンジニアブログ)
http://d.hatena.ne.jp/editnuki/20110617/1308337301
サーバーの再起動がいるのか?
「コンソールの日本語化」(さくらのサポート情報)
https://help.sakura.ad.jp/hc/ja/articles/206055742-%E3%82%B3%E3%83%B3%E3%82%BD%E3%83%BC%E3%83%AB%E3%81%AE%E6%97%A5%E6%9C%AC%E8%AA%9E%E5%8C%96
# vi /etc/sysconfig/i18n
/etc/sysconfig/i18n
# LANG="C"
LANG="ja_JP.UTF-8"
# reboot
CentOS用なのか、Ubuntu には sysconfig がない。
# sudo apt-get install language-pack-ja
あっ! これでは イエスの y を押さないといけない。
# sudo update-locale LANG=ja_JP.UTF-8
*** update-locale: Warning: LANGUAGE ("en_US:") is not compatible with LANG (ja_JP.UTF-8). Disabling it.
文字化けは直らないようだ。
# php tamesi38a1.php
# rabbitmqctl list_exchanges
Listing exchanges ...
direct
amq.direct direct
amq.fanout fanout
amq.headers headers
amq.match headers
amq.rabbitmq.log topic
amq.rabbitmq.trace topic
amq.topic topic
変わり無し。
vendor フォルダーのあるところに .php ファイルを置く必要があるのでは?
# php tamesi38a1.php
キューを開くぜ☆(^~^)
どうだぜ☆(^~^)?
root@tk2-240-29987:/var/www/html/sasite1s# rabbitmqctl list_exchanges
Listing exchanges ...
direct
amq.direct direct
amq.fanout fanout
amq.headers headers
amq.match headers
amq.rabbitmq.log topic
amq.rabbitmq.trace topic
amq.topic topic
myexchange direct
ビンゴ。
浮かむ瀬(Sasite1s改造版) を起動し直す。
# ps aux | grep apery
root 9433 0.0 15.0 1482448 152532 pts/0 Sl 18:45 0:05 ./apery --enqueue From_UkamuseSdt4_Sasite1s durable --dequeue To_UkamuseSdt4_Sasite1s durable autodelete
root 19837 0.0 0.2 16304 2148 pts/0 S+ 21:31 0:00 grep --color=auto apery
# kill 9433
[1]+ Terminated ./apery --enqueue From_UkamuseSdt4_Sasite1s durable --dequeue To_UkamuseSdt4_Sasite1s durable autodelete > ./apery.out.log 2> ./apery.err.log < /dev/null
# ./apery --enqueue From_UkamuseSdt4_Sasite1s durable --dequeue To_UkamuseSdt4_Sasite1s durable autodelete > ./apery.out.log 2> ./apery.err.log < /dev/null &
[1] 19851
# cd /usr/games/sasite1s
# ./tamesi34_cs.exe
???????????????????????????????(^~^)
Name : ?????????
"" + [Enter] : ?????????
ex.) BrokenBox
Delete ? >
??????????????????????????(^~^)
ex.) SunnyBox
Enqueue ? > To_UkamuseSdt4_Sasite1s
????????????????????????????????(^~^)
(1) durable : RabbitMQ????????????
(2) autodelete : ????????1??????????????
(4) passive : ?????????????????????????????
(8) exclusive : ??????????????????????
ex.) 3
Enqueue ? > 3
?????????????????????????(^~^)
ex.) RainyBox
Dequeue ? > From_UkamuseSdt4_Sasite1s
???????????????????????????????(^~^)
(1) durable : RabbitMQ????????????
(2) autodelete : ????????1??????????????
(4) passive : ?????????????????????????????
(8) exclusive : ??????????????????????
ex.) 1
Dequeue ? > 1
21:34:03 610 34_cs ___(C) start begin
21:34:03 616 34_cs ___(C) consumer.create begin
21:34:03 616 34_cs ___(C) consumer.create end
21:34:03 617 34_cs ___(C) channel.open begin
21:34:03 617 34_cs ___(C) connection.open begin
21:34:03 766 34_cs ___(C) connection.open end
21:34:03 771 34_cs ___(C) channel.open end
21:34:03 773 34_cs <-------- [interrupt!] Registered(^q^)
21:34:03 773 34_cs ___(C) start end
21:34:03 773 34_cs (P)___ waitRegistered begin
21:34:03 773 34_cs (P)___ waitRegistered end
???????[Ctrl]+[C]????????(^~^)
?????????????????????[Enter]????????(^?^)
ex.) hello, world
Enqueue? > usi
21:34:07 906 34_cs (P)___ enqueue begin [usi]
21:34:07 906 34_cs (P)___ channel.open begin
21:34:07 906 34_cs (P)___ connection.open begin
21:34:07 915 34_cs (P)___ connection.open end
21:34:07 917 34_cs (P)___ channel.open end
21:34:07 922 34_cs (P)___ enqueue end
21:34:07 922 34_cs (P)___ connection.close begin
21:34:07 923 34_cs (P)___ channel.close begin
21:34:07 927 34_cs (P)___ channel.close end
21:34:07 931 34_cs (P)___ connection.close end
Enqueue? > 21:34:07 945 34_cs <-------- [interrupt!] Dequeue(^q^) id name ukamuse_SDT4
id author Hiraoka Takuya
option name Best_Book_Move type check default false
option name Book_File type string default book/20150503/book.bin
option name Byoyomi_Margin type spin default 500 min 0 max 2147483647
option name Clear_Hash type button
option name Draw_Ply type spin default 256 min 1 max 2147483647
option name Engine_Name type string default ukamuse_SDT4
option name Max_Book_Ply type spin default 32767 min 0 max 32767
option name Max_Random_Score_Diff type spin default 0 min 0 max 32600
option name Max_Random_Score_Diff_Ply type spin default 32767 min 0 max 32767
option name Min_Book_Ply type spin default 32767 min 0 max 32767
option name Min_Book_Score type spin default -180 min -32601 max 32601
option name Minimum_Thinking_Time type spin default 20 min 0 max 2147483647
option name Move_Overhead type spin default 30 min 0 max 5000
option name MultiPV type spin default 1 min 1 max 594
option name OwnBook type check default true
option name Slow_Mover type spin default 89 min 1 max 1000
option name Slow_Mover_10 type spin default 10 min 1 max 1000
option name Slow_Mover_16 type spin default 20 min 1 max 1000
option name Slow_Mover_20 type spin default 40 min 1 max 1000
option name Threads type spin default 2 min 1 max 256
option name Time_Margin type spin default 4500 min 0 max 2147483647
option name USI_Hash type spin default 256 min 1 max 1048576
option name USI_Ponder type check default true
usiok
isready
10秒ぐらい待っていること。
21:34:55 055 34_cs (P)___ enqueue begin [isready]
21:34:55 056 34_cs (P)___ channel.open begin
21:34:55 056 34_cs (P)___ connection.open begin
21:34:55 062 34_cs (P)___ connection.open end
21:34:55 063 34_cs (P)___ channel.open end
21:34:55 064 34_cs (P)___ enqueue end
21:34:55 064 34_cs (P)___ connection.close begin
21:34:55 064 34_cs (P)___ channel.close begin
21:34:55 065 34_cs (P)___ channel.close end
21:34:55 065 34_cs (P)___ connection.close end
Enqueue? > 21:35:05 046 34_cs <-------- [interrupt!] Dequeue(^q^) readyok
usinewgame
21:36:07 541 34_cs (P)___ enqueue begin [usinewgame]
21:36:07 557 34_cs (P)___ channel.open begin
21:36:07 563 34_cs (P)___ connection.open begin
21:36:07 859 34_cs (P)___ connection.open end
21:36:07 864 34_cs (P)___ channel.open end
21:36:07 865 34_cs (P)___ enqueue end
21:36:07 865 34_cs (P)___ connection.close begin
21:36:07 865 34_cs (P)___ channel.close begin
21:36:07 882 34_cs (P)___ channel.close end
21:36:07 892 34_cs (P)___ connection.close end
Enqueue? > position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1 moves
21:36:42 006 34_cs (P)___ enqueue begin [position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1 moves]
21:36:42 006 34_cs (P)___ channel.open begin
21:36:42 006 34_cs (P)___ connection.open begin
21:36:42 061 34_cs (P)___ connection.open end
21:36:42 070 34_cs (P)___ channel.open end
21:36:42 070 34_cs (P)___ enqueue end
21:36:42 071 34_cs (P)___ connection.close begin
21:36:42 071 34_cs (P)___ channel.close begin
21:36:42 072 34_cs (P)___ channel.close end
21:36:42 073 34_cs (P)___ connection.close end
Enqueue? > go
21:36:45 053 34_cs (P)___ enqueue begin [go]
21:36:45 054 34_cs (P)___ channel.open begin
21:36:45 054 34_cs (P)___ connection.open begin
21:36:45 081 34_cs (P)___ connection.open end
21:36:45 084 34_cs (P)___ channel.open end
21:36:45 084 34_cs (P)___ enqueue end
21:36:45 084 34_cs (P)___ connection.close begin
21:36:45 084 34_cs (P)___ channel.close begin
21:36:45 085 34_cs (P)___ channel.close end
21:36:45 087 34_cs (P)___ connection.close end
Enqueue? > 21:36:45 679 34_cs <-------- [interrupt!] Dequeue(^q^) bestmove 2g2f
bestmove が返ってきたので動いている。
ブラウザを使ってアクセスしてみよう。
http://★サイトアドレス/sasite1s/ukamuse_sdt4.php?sfen%20lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL%20b%20-%201%20moves
真っ白いページになる。どういう理屈だろうか?
PHPでエラーが出ていて、そのエラーを出していないのだろうか。
# rabbitmqctl list_queues
Listing queues ...
\026To_UkamuseSdt4_Sasite1s 4
From_UkamuseSdt4_Sasite1s 0
To_UkamuseSdt4_Sasite1s 0
「\026To_UkamuseSdt4_Sasite1s」の「\026」は何だろうか?
# reboot
端末も入り直す。
sudo su -
[sudo] ★user のパスワード:
残念、また試してください。
[sudo] ★user のパスワード:
日本語化って、こういうことか。要らんことしたな。
# rabbitmqctl list_queues
Listing queues ...
\026To_UkamuseSdt4_Sasite1s 0
From_UkamuseSdt4_Sasite1s 0
To_UkamuseSdt4_Sasite1s 3
こっちはリブートで直るのか。 UTF-8 にしたいだけなんだが。
# ps aux | grep apery
root 1586 0.0 0.0 14264 960 pts/0 S+ 22:15 0:00 grep --color=auto apery
リブートしたので、浮かむ瀬(Sasite1s改造版) は無くなっている。
http://★サイトアドレス/sasite1s/ukamuse_sdt4.php?sfen%20lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL%20b%20-%201%20moves
にアクセスすると、bestmove が返ってきた。
bestmove 2g2f ponder 3c3d #<br />
time = 0.8805980682373