7:VNCサーバーをインストールする

Date 2012-8-30 2:10:27 | Topic: CentOS 6.3(6.4)に挑戦

kvmのVNCは使いにくいので(マウスの切り替えが面倒なのと、私が使ってる縦900ドットのディスプレイでは縦をスクロールしないといけない)
xinet経由で走らせたいので
# yum list installed xinetd
インストールされていなかったので、xinetd をインストール、ついでにtigervnc も
# yum install xinetd tigervnc-server
/etc/servicesの最後に
vnc 5901/tcp # vnc serve ← vncを5901ポートで待ち受ける。

と記入。/etc/xinetd.d/vnc を下記のように作成
service vnc
{
	disable	= no
	socket_type	= stream
	wait		= no
	user		= nobody
	server		= /usr/bin/Xvnc
	server_args	= -inetd -query localhost -once -securitytypes=none -geometry 1200x800 -depth 24
	log_on_failure	+=USERID
}

/etc/gdm/custom.conf を下記のように修正
[daemon]
	RemoteGreeter=/usr/libexec/gdmgreeter
[security]
	AllowRemoteRoot=true
[xdmcp]
	Enable=true

この時=の両側にスペースを入れてはいけない。
/root/iptables.shの修正、各種サービスを公開する場合の設定(ここまで) の前に
# VNC server
iptables -A INPUT -p tcp --dport 5901 -j ACCEPT_COUNTRY

を追記し
# sh iptables.sh
で設定を反映させる。
# service xinetd start ← xinetdをスタート
# chkconfig xinetd on ←再起動後も走らす

最後にこのゲストでなくホスト側でVNCビュアーを入れる
# yum install tigervnc
これでVNCビュアーの窓に IPアドレス:1 (ポート5901は 1 と入力)でゲストにつながる


This article comes from 錦稜会 KINRYOKAI
https://www.kinryokai.net

The URL for this story is:
https://www.kinryokai.net/article.php?storyid=137