系統自帶的vnc
vnc(virtual network computing,虛拟網絡計算機)
當本地電腦與操作主機網絡斷開時,也不影響操作的順利進行
配置vnc的方法:
修改檔案 /root/.vnc/xstartup 後如下:
###########################################################
#!/bin/sh
# uncomment the following two lines for normal desktop:
unset session_manager 将此行的注釋去掉
exec /etc/x11/xinit/xinitrc 将此行的注釋去掉
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $home/.xresources ] && xrdb $home/.xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$vncdesktop desktop" &
# twm & 将此行注釋
gnome-session gnome& 添加連接配接時使用gnome桌面環境 (gnome預設就是不用改)
#############################################################
vnc 的啟動: vncserver
修改配置檔案後需要重新啟動vnc服務才會生效
vncserver -kill :1 停止端口1
vncserver :1 開啟端口1
這種配置方法會在重新開機伺服器後失效,需要将自動管理的資訊添加到/etc/sysconfig/vncserver
格式為:
vncservers="面号:使用的使用者名 桌面号:使用的使用者名"
修改vnc通路的密碼
vncpasswd
若有其它使用者,則必須登入到該使用者中去修改密碼
vncserver :1 起1号号桌面
vncserver :2 起2号桌面
兩個桌面互相不影響
xmanager的使用在rhel5上使用
相關檔案:
/usr/share/gdm/defaults.conf gnome管理預設的配置檔案
displaysperhost=2 取消該行的注釋,動态注冊兩個session
enable=true 将該行的false值改為true
port=177 取消該行的注釋
allowremoteroot=true 使root可以遠端登入
/etc/inittab 設定系統的運作級為5
x:5:respawn:/usr/sbin/gdm 添加到最後一行
gdm-restart 重新開機服務
xmanager遠端管理在rhel6上使用
1. 編輯/etc/inittab, 修改預設啟動級别為5, 重新開機系統
id:5:initdefault: 或者讓系統處于運作級别5
2. 編輯/etc/gdm/custom.conf, 啟用xdmcp
vi /etc/gdm/custom.conf
# gdm configuration storage
[daemon]
[security]
allowremoteroot=false #是否允許遠端root登入
[xdmcp]
enable=1
displaysperhost=5
port=177 #udp方式的連接配接,端口号為177
[greeter]
[chooser]
[debug]