#author("2019-11-15T09:52:45+09:00","default:egashira","egashira")
#author("2019-11-15T09:55:14+09:00","default:egashira","egashira")
[[CentOS7]]

*Guacamoleをインストールする [#if67f838]
**Guacamoleとは? [#xfdbcb41]
''「VNC/SSH/RDPへのポート転送サーバーの役割」みたいなもの''

例えば自宅にラボ環境があって、外部からアクセスしたユースケースを考えてみます。この場合、外部から内部のサーバーのポートを全て開放するのはセキュリティ的にもリスクですし、毎回サーバーが増えるごとに開放するのも手間です。

さらに、[[ISP]]から与えられてるグローバルIPは通常は限られてるので、ポートマッピングが必要になります。

''Guacamoleサーバーがあれば、外部に開放するサーバはGuacamoleサーバーだけで良い。''

さらに、Guacamoleサーバーとクライアント(外部)の間はHTTPS通信にできるので、通信内容も暗号化されて安心。


**スクリプトでGuacamoleのインストール・設定 [#obf04063]
本来であればGuacamoleの公式サイトに従って色々必要なパッケージのインストールをするところですが、世の中には親切な方がいるみたいで、細かい作業を簡略化するスクリプトが用意されています。

まずはgitのインストール。

|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# yum install -y wget git|
&color(red){※gitのインストールが”Complete!”で成功していることを確認};

次にスクリプトのダウンロード。

|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# wget http://sourceforge.net/projects/guacamoleinstallscript/files/CentOS/guacamole-install-script.sh|
ココからもダウンロード可能
#ref(guacamole-install-script.sh); 

実行権限を与えてスクリプトを実行します。

|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# chmod +x guacamole-install-script.sh|
|[root@centos ~]# LANG=C ./guacamole-install-script.sh|

ここから先はスクリプトで入力が要求された箇所を紹介します。

DBのパスワードやDB名など。この当たりは任意で大丈夫です。Java KeyStoreのパスワード要件に合わせて他のパスワードも同じ文字列にしています。(任意で変えても大丈夫です)

|BGCOLOR(black):COLOR(white):|c
| Enter the root password for MariaDB: &color(lime){guacamo!e}; &br; Enter the Guacamole DB name: &color(lime){guacamole}; &br; Enter the Guacamole DB username: &color(lime){guacamole}; &br; Enter the Guacamole DB password: &color(lime){guacamo!e}; &br; Enter the Java KeyStore password (least 6 characters): &color(lime){guacamo!e}; &br; Do you wish to Install the Proxy feature (Nginx)?: &color(lime){''n''};|

証明書関係の設定です。ラボ目的であればそれ程意識する必要はありません。

|BGCOLOR(black):COLOR(white):|c
|Please complete the Wizard for the Java KeyStore &br; &br; What is your first and last name? &br; [Unknown]:  Guacamole Guacamole &br; What is the name of your organizational unit? &br; [Unknown]:  Guacamole &br; hat is the name of your organization? &br; [Unknown]:  Guacamole &br; What is the name of your City or Locality? &br; [Unknown]:  Guacamole &br; What is the name of your State or Province? &br; [Unknown]:  Guacamole &br; What is the two-letter country code for this unit? &br; [Unknown]:  GU &br; Is CN=Guacamole Guacamole, OU=Guacamole, O=Guacamole, L=Guacamole, ST=Guacamole, C=GU correct? &br; [no]:  yes|
|Please complete the Wizard for the Java KeyStore &br; &br; What is your first and last name? &br; [Unknown]: &color(lime){Guacamole Guacamole}; &br; What is the name of your organizational unit? &br; [Unknown]: &color(lime){Guacamole}; &br; hat is the name of your organization? &br; [Unknown]: &color(lime){Guacamole }; &br; What is the name of your City or Locality? &br; [Unknown]: &color(lime){Guacamole}; &br; What is the name of your State or Province? &br; [Unknown]:  &color(lime){Guacamole}; &br; What is the two-letter country code for this unit? &br; [Unknown]: &color(lime){GU}; &br; Is CN=Guacamole Guacamole, OU=Guacamole, O=Guacamole, L=Guacamole, ST=Guacamole, C=GU correct? &br; [no]: &color(lime){yes};|

以上で終了です。

これで本来であれば「http://xxx.xxx.xxx.xxx:8080/guacamole/」にアクセスするとログイン画面が出るはず。

#ref(guacamole2.png)

ログインは以下のID/パスワードで行います。ログイン後にパスワードを変更することをオススメします。

-ユーザ名:guacadmin
-パスワード:guacadmin

後はアクセスする先の設定です。この辺からはネットに情報が転がってるので詳細は省略します。

**補足事項 [#f9851a0b]
''リモート接続設定が1つのみでログインしてしまうと、そのリモート接続のコネクション画面にリダイレクトされてしまい追加の設定ができない。''

そんな時は直接URLを入力して設定画面に戻るしかない。

http://xxx.xxx.xxx.xxx:8080/guacamole/#/manage/mysql/connections/

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS