#author("2018-09-06T15:33:45+09:00","","")

[[CentOS7]]


*デスクトップ環境 : VNCクライアント : noVNC インストール [#z940e321]



ローカルホストで起動している VNC サーバーをプロキシして、クライアントコンピューターから Web ブラウザ経由で接続できるようにします。



**必要なパッケージのインストール、および SSL 証明書の作成をしておきます。 [#f84bad88]

|BGCOLOR(black):COLOR(white):|c

|&color(lightpink){# EPEL からインストール};|

|[root@localhost ~]# yum --enablerepo=epel -y install novnc python-websockify numpy|

|[root@localhost ~]# cd /etc/pki/tls/certs|

|[root@localhost certs]# openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/pki/tls/certs/novnc.pem -out /etc/pki/tls/certs/novnc.pem -days 365|

|Generating a 2048 bit RSA private key &br; ..........................................+++ &br; ..........................................+++ &br; writing new private key to '/etc/pki/tls/certs/novnc.pem' &br; ----- &br; You are about to be asked to enter information that will be incorporated &br; into your certificate request. &br; What you are about to enter is what is called a Distinguished Name or a DN. &br; There are quite a few fields but you can leave some blank &br; For some fields there will be a default value, &br; If you enter '.', the field will be left blank. &br; ----- &br;  &br; Country Name (2 letter code) [AU]:JP &br;     # 国 &br;  &br; State or Province Name (full name) [Some-State]:Tokyo &br;     # 地域(県) &br;  &br; Locality Name (eg, city) []:Hiroshima &br;     # 都市 &br;  &br; Organization Name (eg, company) [Internet Widgits Pty Ltd]:Server World &br;     # 組織名 &br;  &br; Organizational Unit Name (eg, section) []:IT Solution &br;     # 組織の部門名 &br;  &br; Common Name (eg, YOUR name) []:hoge.com &br;     # サーバーのFQDN &br;  &br; Email Address []:xxx@hoge.com &br;     # 管理者アドレス &br; |







[[こちらのを参考に、VNC サーバーを起動しておきます。>VNCサーバーのインストール]]



当例では、「cent」ユーザーがポート「5901」で VNC サーバーを起動しているとします。



VNC 起動ユーザーで Websockify を起動し、localhost:5901 をポート 6080 でプロキシします。



|BGCOLOR(black):COLOR(white):|c

|[hoge@localhost ~]$ websockify -D --web=/usr/share/novnc/ --cert=/etc/pki/tls/certs/novnc.pem 6080 localhost:5901|

|WebSocket server settings: &br;   - Listen on :6080 &br;   - Flash security policy server &br;   - Web server. Web root: /usr/share/novnc &br;   - SSL/TLS support &br;   - Backgrounding (daemon)|



任意のクライアントで Web ブラウザを起動し、「https://(サーバーのホスト名またはIPアドレス):6080/」にアクセスすると、以下のように noVNC の画面が表示されます。 VNC パスワードでログイン可能です。



&ref(01.png);



接続できました。Web ブラウザ上で CentOS の操作ができます。



&ref(02.png);


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