YAMAHA RTX1200 覚書2

RTX1200のIP ADDRESS、接続するマシンのIP ADDRESSの設定とシリアルケーブルの接続やドライバ設定が済めば、実際に接続してみる。

  • Windowsの場合 Teraterm pro であれば各項目を設定し、接続をSerialにしてOKを押せば、接続が確立される。
  • Macの場合、USB/SERIAL変換が必修となってくるので、ドライバのインストール後、ttyの何処に設定されたかを確認し、cuコマンドで接続する。
  • ログイン後、モード切替の必要があり一般ユーザーとadministratorがあり、一般ユーザーでは、config等の確認は出来るが設定を行うことが出来ない。
    設定するためには、administratorでログインしておく。
    一般ユーザーのプロンプト >
    administratorのプロンプト #
  • コマンド入力は、ASCIIで行う。表示する文字コードとは関係ありません。
    簡単に言うと2バイト文字を使わないという感じです。

接続例

cu -l /dev/tty.KeySerial1

ちなみに、RTX1200の文字コードはS-JISとなっている。あとで変更も可能ではあります。

利用可能な文字コードは、SJIS , EUC , ASCII がある。

文字コード コンソールの文字
SJIS 日本語
EUC 日本語
ASCII 英語
TELNETで接続

TELNETでログインする場合、ログイン待ちとなってからエンターを押すと、


Password:

と表示される。工場出荷時はパスワードが設定されてないので、エンターを押してログイン出来ます。

SSHで接続

SSHで接続可能な状態にするために若干の設定が必要となる。
セキュリティの観点から可能な限りSSHでの接続をお薦めする。

SSHでログイン可能な状態にするため、TELNETやシリアル接続した状態にしておく。

RTX1200では、SSH V2、公開鍵暗号DSAとRSAによりホスト認証、パスワード認証、送信データ圧縮、クライアントの生存確認、IPv6をサポートしており、SSH同時接続ユーザー数は8IDまでである。

RTX1200のCLIは「TAB」補完もサポートしています。

SSHログイン設定

RTX1200にログインし、administratorに昇格しておきます。

# login user USERNAME PASSWORD ;USERNAME ログインに使用するID名 、PASSWORD ログインに使用するパスワード # sshd host key generate ;RTX1200のssh hostkey を作成 # sshd service on ;sshd 起動 [/text] ヘルプの利用

> help
1) At any time, you can type a '?' to help your typing on the console.
   In case typing command name is not complete, lists the available keywords.
   In case complete, displays the command format and description.

2) You can use following functions when typing commands: keyword completion,
   putting a previous command on the line, moving cursor or editing the line.
   
     Note: 'Ctrl + X' means typing the Ctrl key and X key simultaneously.

   ------------------------------------------------------------------------
   Completes keyword                         : Tab key
   ------------------------------------------------------------------------
   Puts the previous command on the line     : Ctrl + p, or UP arrow key
   Puts the next command on the line         : Ctrl + n, or DOWN arrow key
   ------------------------------------------------------------------------
   Moves cursor forward one character        : Ctrl + f, or RIGHT arrow key
   Moves cursor backward one character       : Ctrl + b, or LEFT arrow key
   Moves cursor to the end of the line       : Ctrl + e
   Moves cursor to the beggining of the line : Ctrl + a
   ------------------------------------------------------------------------
   Kills the pending input                   : Ctrl + c
   Erases one character at the cursor        : Ctrl + d
> show config 
# RTX1200 Rev.10.01.59 (Tue Aug 19 19:26:02 2014)
# MAC Address : 00:a0:de:xx:xx:xx, 00:a0:de:xx:xx:xx, 00:a0:de:xx:xx:xx
# Memory 128Mbytes, 3LAN, 1BRI
# main:  RTX1200 ver=b0 serial=D2600xxxx MAC-Address=00:a0:de:xx:xx:xx MAC-Addr
ess=00:a0:de:xx:xx:xx MAC-Address=00:a0:de:xx:xx:xx
# Reporting Date: Apr 29 11:45:31 2015
login password encrypted *
administrator password encrypted *

MacOSX 10.10.3 にアップデート

会社のMain MacOSX Serverを10.9から、ようやく10.10にアップデートした。

特に問題も無くOSはアップデート完了

しかし再起動後、Guardが動かない。

gem install guard

# gem install guard
Fetching: thor-0.19.1.gem (100%)
Successfully installed thor-0.19.1
Fetching: hitimes-1.2.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing guard:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin14/ruby/config.h', needed by `hitimes.o'.  Stop.


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2/ext/hitimes/c/gem_make.out

エラー出るです。
hitimes.oが必要やと?
gem をアップデートとかできんのやっけ?

調べてみる。
そのまでに、Xcodeをアップデートして、もう一度 gem installしてみます。

Building native extensions.  This could take a while...
ERROR:  Error installing guard:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/hitimes-1.2.2/ext/hitimes/c/gem_make.out

エラーは減ったけど、肝心の ERROR: Failed to build gem native extension. 治ってない。

gem updateしてみる。

gem update
Updating installed gems
Updating CFPropertyList
Fetching: CFPropertyList-2.3.1.gem (100%)
Successfully installed CFPropertyList-2.3.1
Parsing documentation for CFPropertyList-2.3.1
Installing ri documentation for CFPropertyList-2.3.1
Installing darkfish documentation for CFPropertyList-2.3.1
Updating bigdecimal
Fetching: bigdecimal-1.2.7.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing bigdecimal:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/bigdecimal-1.2.7 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/bigdecimal-1.2.7/./gem_make.out
Updating json
Fetching: json-1.8.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing json:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/json-1.8.2/ext/json/ext/generator/gem_make.out
Updating libxml-ruby
Fetching: libxml-ruby-2.8.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing libxml-ruby:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/libxml-ruby-2.8.0 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/libxml-ruby-2.8.0/ext/libxml/gem_make.out
Updating minitest
Fetching: minitest-5.6.1.gem (100%)
Successfully installed minitest-5.6.1
Parsing documentation for minitest-5.6.1
Installing ri documentation for minitest-5.6.1
Installing darkfish documentation for minitest-5.6.1
Updating nokogiri
Fetching: mini_portile-0.6.2.gem (100%)
Successfully installed mini_portile-0.6.2
Fetching: nokogiri-1.6.6.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2/ext/nokogiri/gem_make.out
Updating psych
Fetching: psych-2.0.13.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing psych:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/psych-2.0.13 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/psych-2.0.13/ext/psych/gem_make.out
Updating rake
Fetching: rake-10.4.2.gem (100%)
rake's executable "rake" conflicts with /usr/bin/rake
Overwrite the executable? [yN]  
Updating rdoc
Fetching: rdoc-4.2.0.gem (100%)
rdoc's executable "rdoc" conflicts with /usr/bin/rdoc
Overwrite the executable? [yN]  
ERROR:  Error installing rdoc:
	"rdoc" from rdoc conflicts with /usr/bin/rdoc
Updating sqlite3
Fetching: sqlite3-1.3.10.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.10 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.10/ext/sqlite3/gem_make.out
Updating test-unit
Fetching: power_assert-0.2.3.gem (100%)
Successfully installed power_assert-0.2.3
Fetching: test-unit-3.0.9.gem (100%)
Successfully installed test-unit-3.0.9
Parsing documentation for power_assert-0.2.3
Installing ri documentation for power_assert-0.2.3
Installing darkfish documentation for power_assert-0.2.3
Parsing documentation for test-unit-3.0.9
Installing ri documentation for test-unit-3.0.9
Installing darkfish documentation for test-unit-3.0.9
Gems updated: CFPropertyList minitest mini_portile power_assert test-unit

やっぱ、ERROR: Failed to build gem native extension. が出るので、googleに聞いてみる。

その前に、xcodeのコンポーネントをアップデートあるはず。
xcodeを起動したら、思惑通りupdateの画面でた。
osx10-10

ここまで出来たから、
gemを再実行する。

# gem install guard
Building native extensions.  This could take a while...
Successfully installed hitimes-1.2.2
Fetching: timers-4.0.1.gem (100%)
Successfully installed timers-4.0.1
Fetching: celluloid-0.16.0.gem (100%)
Successfully installed celluloid-0.16.0
Fetching: rb-fsevent-0.9.4.gem (100%)
Successfully installed rb-fsevent-0.9.4
Fetching: ffi-1.9.8.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.8
Fetching: rb-inotify-0.9.5.gem (100%)
Successfully installed rb-inotify-0.9.5
Fetching: listen-2.10.0.gem (100%)
Successfully installed listen-2.10.0
Fetching: coderay-1.1.0.gem (100%)
Successfully installed coderay-1.1.0
Fetching: slop-3.6.0.gem (100%)
Successfully installed slop-3.6.0
Fetching: method_source-0.8.2.gem (100%)
Successfully installed method_source-0.8.2
Fetching: pry-0.10.1.gem (100%)
Successfully installed pry-0.10.1
Fetching: lumberjack-1.0.9.gem (100%)
Successfully installed lumberjack-1.0.9
Fetching: formatador-0.2.5.gem (100%)
Successfully installed formatador-0.2.5
Fetching: nenv-0.2.0.gem (100%)
Successfully installed nenv-0.2.0
Fetching: shellany-0.0.1.gem (100%)
Successfully installed shellany-0.0.1
Fetching: notiffany-0.0.6.gem (100%)
Successfully installed notiffany-0.0.6
Fetching: guard-2.12.5.gem (100%)
Successfully installed guard-2.12.5
Parsing documentation for hitimes-1.2.2
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/hitimes/2.0/hitimes.bundle, skipping
Installing ri documentation for hitimes-1.2.2
Parsing documentation for timers-4.0.1
Installing ri documentation for timers-4.0.1
Parsing documentation for celluloid-0.16.0
Installing ri documentation for celluloid-0.16.0
Parsing documentation for rb-fsevent-0.9.4
Installing ri documentation for rb-fsevent-0.9.4
Parsing documentation for ffi-1.9.8
Installing ri documentation for ffi-1.9.8
Parsing documentation for rb-inotify-0.9.5
Installing ri documentation for rb-inotify-0.9.5
Parsing documentation for listen-2.10.0
Installing ri documentation for listen-2.10.0
invalid options: -SNw2
(invalid options are ignored)
Parsing documentation for coderay-1.1.0
Installing ri documentation for coderay-1.1.0
Parsing documentation for slop-3.6.0
Installing ri documentation for slop-3.6.0
Parsing documentation for method_source-0.8.2
Installing ri documentation for method_source-0.8.2
Parsing documentation for pry-0.10.1
Installing ri documentation for pry-0.10.1
Parsing documentation for lumberjack-1.0.9
Installing ri documentation for lumberjack-1.0.9
Parsing documentation for formatador-0.2.5
Installing ri documentation for formatador-0.2.5
Parsing documentation for nenv-0.2.0
Installing ri documentation for nenv-0.2.0
Parsing documentation for shellany-0.0.1
Installing ri documentation for shellany-0.0.1
Parsing documentation for notiffany-0.0.6
Installing ri documentation for notiffany-0.0.6
Parsing documentation for guard-2.12.5
Installing ri documentation for guard-2.12.5
17 gems installed
[\code]

guardは動くようになったのだが、guardのオプションが変わっているようだ。
[code]
# guard -help
Commands:
  _guard-core help [COMMAND]  # Describe available commands or one specific command
  _guard-core init [GUARDS]   # Generates a Guardfile at the current directory (if it is not alre...
  _guard-core list            # Lists Guard plugins that can be used with init
  _guard-core notifiers       # Lists notifiers and its options
  _guard-core show            # Show all defined Guard plugins and their options
  _guard-core start           # Starts Guard
  _guard-core version         # Show the Guard version

Usage:
  _guard-core start

Options:
  -c, [--clear=Auto clear shell before each action], [--no-clear]                                        
  -n, [--notify=Notifications feature], [--no-notify]                                                    
                                                                                                         # Default: true
  -d, [--debug=Show debug information], [--no-debug]                                                     
  -g, [--group=Run only the passed groups]                                                               
  -P, [--plugin=Run only the passed plugins]                                                             
  -w, [--watchdir=Specify the directories to watch]                                                      
  -G, [--guardfile=Specify a Guardfile]                                                                  
  -i, [--no-interactions=Turn off completely any Guard terminal interactions], [--no-no-interactions]    
  -B, [--no-bundler-warning=Turn off warning when Bundler is not present], [--no-no-bundler-warning]     
  -l, [--latency=Overwrite Listen's default latency]                                                     
  -p, [--force-polling=Force usage of the Listen polling listener], [--no-force-polling]                 
  -y, [--wait-for-delay=Overwrite Listen's default wait_for_delay]                                       
  -o, [--listen-on=Specify a network address to Listen on for file change events (e.g. for use in VMs)]  

Starts Guard

guard-shellが動かないのね。
OSX10.9 ruby version 1.8
OSX10.10 ruby version 2.0

これって、ruby gemでインストールしたものをすべて再インストールなのか?

やれるところまでやってみよう。

# gem install guard-shell
Fetching: guard-compat-1.2.1.gem (100%)
Successfully installed guard-compat-1.2.1
Fetching: guard-shell-0.7.1.gem (100%)
Successfully installed guard-shell-0.7.1
Parsing documentation for guard-compat-1.2.1
Installing ri documentation for guard-compat-1.2.1
Parsing documentation for guard-shell-0.7.1
Installing ri documentation for guard-shell-0.7.1
2 gems installed
# guard init shell
09:55:24 - INFO - Guardfile already includes shell guard

guard-shellはOK

gem install jabbot
Fetching: xmpp4r-0.5.6.gem (100%)
Successfully installed xmpp4r-0.5.6
Fetching: eventmachine-0.12.10.gem (100%)
Building native extensions.  This could take a while...
Successfully installed eventmachine-0.12.10
Fetching: jabbot-1.0.0.gem (100%)
Successfully installed jabbot-1.0.0
Parsing documentation for xmpp4r-0.5.6
Installing ri documentation for xmpp4r-0.5.6
Parsing documentation for eventmachine-0.12.10
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/fastfilereaderext.bundle, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/rubyeventmachine.bundle, skipping
Installing ri documentation for eventmachine-0.12.10
Parsing documentation for jabbot-1.0.0
Installing ri documentation for jabbot-1.0.0
3 gems installed

いろいろやったが動かん・・・
もう少し、調べて再チャレンジする。

pukiwikiで会社のマニュアル作った.

会社のマニュアル
今までは、Wordで作成し紙媒体で出力していました。

しかし、何度か改訂していると印刷が面倒、バージョン管理が面倒、マニュアルの改訂が面倒などなど、いろいろ問題が出来てくるものです。

解決策として選んだのは、pukiwikiを利用すること。
会社のマニュアルなので、外部からのアクセスは全て遮断してバーチャルドメインを作って運用すればOK

.htaccess

order deny,allow
deny from all
allow from [会社のIP ADDRESS]

ひとまずコレで、解決するわけですがWORDから移行するのも面倒だな。
今のところ使っているpluginはAjaxTreeのみという単純構造。
単純にしておかないと、後々 メンテナンスがややこしくなるし。

YAMAHA RTX1200 覚書1

ヤマハ ギガアクセスVPNルーター RTX1200

工場出荷時のIP ADDRESSは、192.168.100.1に割当されている。

RTX1200にはGUIが搭載されており、192.168.100.1にアクセスするとWEB GUIである程度の徹底変更が可能。もちろん接続するPCのIP ADDRESSは、192.168.100.2~254にしておかなければならない。

WEB GUIで設定できる項目はCLIに比べて少ないので、結局はCLIで接続後 細かな設定をしていかなければならない。

iBUFFALO USBシリアルケーブル(USBtypeA to D-sub9ピン)1.0m ブラックスケルトン BSUSRC0610BSCLIに接続するにはシリアルケーブル(RC-232C)でPCと接続する必要がある。RTX1200にはRS-232cケーブルは付属しているが昨今のPCにはRC-232c端子が無いものも多いので、USB/SERAIL変換ケーブルを準備しておくと何かと重宝します。

またRTX1200と接続するには、クロスケーブルを使わないといけません。

CLIで接続するには、Windowsであれば標準搭載されているハイパーターミナルや、TeratermPro等が利用できますが、お薦めは、TeratermProです。

macだとcuコマンド等で利用可能です。

設定項目 設定値
データ転送速度 9600bps
キャラクタビット長 8
パリティチェック なし
ストップビット数 1
フロー制御 Xon/Xoff

接続の基本的項目は以上です。

次は、実際の仕方を書いてみたいと思う。

文庫本買った。ジュラシック・パーク シリーズ

比較的新しい文庫だと思っていたが、かなり前の文庫ですね。
書店で探しても無いはずです。