当前位置: > CentOS > CentOS教程 >

CentOS 6.5安装VNC_Server

时间:2016-04-02 03:35来源:linux.it.net.cn 作者:IT网
1.安装桌面环境所需软件包:
yum grouplist | more
yum groupinstall   "Desktop"   "Desktop Platform"   "Desktop Platform Development""Fonts"  "General Purpose Desktop"  "Graphical Administration Tools"  "Graphics Creation Tools"  "Input Methods"  "X Window System"  "Chinese Support [zh]" "Internet Browser"

2.修改系统运行级别为图形化方式:
vim /etc/inittab
id:5:initdefault:   
runlevel

3.重启服务器:
reboot

4.安装vnc软件包:
rpm -qa | grep vnc-server
yum install tigervnc tigervnc-server

5.配置VNC的登录账号、桌面分辨率和连接方式:
vim /etc/sysconfig/vncservers
添加:
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"


6.配置VNC的远程登录密码:
vncpasswd

7.配置VNC防黑屏,并重启服务:
vim /root/.vnc/xstartup
注释:
# xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# twm &

添加:
gnome-session &
service vncserver restart
ps -axu | grep vnc
netstat -anptu | grep 5091

8.设置VNC服务开机启动:
chkconfig --level 2345 vncserver on
chkconfig --list | grep vncserver

9.客户端连接:
打开vnc viewer
VNC Server:   IP:5901
(密码不是登陆账号的密码,而是VNC设置的密码)

10.关闭VNC:
vncserver -kill :1
service vncserver stop

11.防火墙开放5901端口:
iptables -A INPUT -p tcp --dport 5901 -j ACCEPT


(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容