CentOS6.4下VNC Server最简配置

本文介绍如何在CentOS6.4上安装和配置VNCServer,包括服务安装、运行设置、用户配置及服务管理等步骤,并提供客户端连接方式及防火墙关闭方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CentOS6.4下VNC Server最简配置

    环境:

    CentOS 6.4 Final,桌面安装了除KDE的所有组件

    1、安装服务

    yum install tigervnc-server

    名字有点怪哦,CentOS5前叫vnc-server

    2、运行并设置密码

    vncserver :1

    输入密码,会生成相关的文件

    xauth: creating new authority file /root/.Xauthority

    New 'centos6-244:1 (root)' desktop is centos6-244:1

    Starting applications specified in /root/.vnc/xstartup

    Log file is /root/.vnc/centos6-244:1.log

    3、配置用户

    vim /etc/sysconfig/vncservers

    最后一行加入:

    VNCSERVERS="1:root" 多个用户用空格分开,并要先su - 到那个用户运行vncserver :n来设定配置文件和密码

    4、实用命令

    usage: vncserver [:] [-name ] [-depth ]

    [-geometry x]

    [-pixelformat rgbNNN|bgrNNN]

    [-fp ]

    [-fg]

    ...

    vncserver -kill

    vncserver -list

    vncserver[:n]开服务

    vncserver -list看有几个在运行

    vncserver -kill :n 杀掉第几个x-display

    vncpasswd     修改密码

    5、服务管理

    service vncserver restart

    其它用法:/etc/init.d/vncserver {start|stop|restart|try-restart|status|force-reload}

    chkconfig vncserver on 加入到自启动(chkconfig --level 35 vncserver on)

    6、客户端连接

    CentOS:使用TigerVNC Viewer 连接 ip:1

    Windows:使用Real VNC Viewer 连接ip:1

    输入密码即可访问



关闭虚拟机防火墙:

关闭命令:  service iptables stop

永久关闭防火墙:chkconfig iptables off

两个命令同时运行,运行完成后查看防火墙关闭状态
service iptables status

1 关闭防火墙-----service iptables stop 
2 启动防火墙-----service iptables start 
3 重启防火墙-----service iptables restart 
4 查看防火墙状态--service iptables status 
5 永久关闭防火墙--chkconfig iptables off 
6 永久关闭后启用--chkconfig iptables on

客户端工具

http://www.realvnc.com/download/viewer/

转载于:https://my.oschina.net/caomenglong/blog/398894

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值