CentOS6.5_x64安装VNCserver
来源:互联网 发布:淘宝客服怎么登陆千牛 编辑:程序博客网 时间:2024/04/29 08:48
VNCserver rpm包下载地址:http://rpm.pbone.net/index.php3/stat/4/idpl/15981670/dir/scientific_linux_5/com/vnc-server-4.1.2-14.el5_6.6.x86_64.rpm.html
在服务器端安装VNCserver。
rpm -ivh vnc-server-4.1.2-14.el5_6.6.x86_64.rpm
一、添加启动项
[root@xen ~]# chkconfig --add vncserver
[root@xen ~]# chkconfig vncserver on
二、设置 VNC 密码
[root@xen ~]# vncserver
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/xen:1.log
会在当前用户主目录下 生成 .vnc 目录和配置文件
[root@xen ~]# vncpasswd
Password:
Verify:
设置的密码保存在 /root/.vnc/passwd
三、VNC 配置
修改 xstartup 文件 把最后的 twm & 删掉 加上 gnome-session &
[root@xen ~]# cd /root/.vnc/
[root@xen .vnc]# tail -n 3 xstartup
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
如果直接 启动
[root@xen .vnc]# /etc/init.d/vncserver start
正在启动 VNC 服务器:no displays configured [失败]
所以要修改 /etc/sysconfig/vncservers 文件添加以下内容
VNCSERVERS="2:root"
# 桌面号:用户 监听 590* 端口
VNCSERVERARGS[2]="-geometry 800x600"
这样修改后,就算 /etc/inittab 启动模式为 3 也可以正常进入图形界面
启动 vncserver
[root@xen ~]# /etc/init.d/vncserver start
正在启动 VNC 服务器:2:root xauth: (stdin):1: bad display name "xen:2" in "add" command
New 'xen:2 (root)' desktop is xen:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/xen:2.log
[root@xen ~]# chkconfig --add vncserver
[root@xen ~]# chkconfig vncserver on
二、设置 VNC 密码
[root@xen ~]# vncserver
Creating default startup script/root/.vnc/xstartup
Starting applications specified in/root/.vnc/xstartup
Log file is /root/.vnc/xen:1.log
会在当前用户主目录下生成 .vnc 目录和配置文件
[root@xen ~]# vncpasswd
Password:
Verify:
设置的密码保存在 /root/.vnc/passwd
三、VNC 配置
修改 xstartup 文件把最后的 twm &删掉加上 gnome-session &
[root@xen ~]# cd /root/.vnc/
[root@xen .vnc]# tail -n 3 xstartup
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title"$VNCDESKTOP Desktop" &
gnome-session &
如果直接启动
[root@xen .vnc]# /etc/init.d/vncserver start
正在启动 VNC 服务器:no displaysconfigured [失败]
所以要修改 /etc/sysconfig/vncservers文件添加以下内容
VNCSERVERS="2:root"
# 桌面号:用户 监听 590*端口
VNCSERVERARGS[2]="-geometry 800x600"
这样修改后,就算 /etc/inittab 启动模式为 3 也可以正常进入图形界面
启动 vncserver
[root@xen ~]# /etc/init.d/vncserver start
正在启动 VNC 服务器:2:root xauth: (stdin):1: bad display name "xen:2"in "add" command
New 'xen:2 (root)' desktop is xen:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/xen:2.log
四、修改防火墙设置:
VNC server 监听的端口从 5900 开始,display:1 的监听 5901,display:2 监听5902,以此类推。
上面设置的display为2(VNCSERVERS="2:root"),加入下面红色的那一行。
# Firewallconfiguration written by system-config-firewall
# Manualcustomization of this file is not recommended.
*filter
:INPUT ACCEPT[0:0]
:FORWARDACCEPT [0:0]
:OUTPUT ACCEPT[0:0]
-A INPUT -mstate --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -picmp -j ACCEPT
-A INPUT -i lo-j ACCEPT
-A INPUT -mstate --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -mstate --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
-A INPUT -jREJECT --reject-with icmp-host-prohibited
-A FORWARD -jREJECT --reject-with icmp-host-prohibited
COMMIT
- CentOS6.5_x64安装VNCserver
- centos6.5安装vncserver
- Linux CentOs6.5_x64静默安装Oracle10g
- Docker安装应用(Centos6.5_x64)
- CentOS6.4_X64安装nginx
- CentOs6.5 通过vncserver安装oracle
- CentOS6.5_X64下安装配置MongoDB数据库
- centos6.5_x64 系统rpm安装包下载地址。
- centos6.5配置vncserver
- CentOS6.4_x64安装Oracle11g R2
- CentOS6.5安装vncserver实现图形化访问
- CentOS6.5_x64中Apache、Tomcat整理
- MySQL之——CentOS6.5_x64安装配置drbd8.4.2
- CentOS6安装vncserver实现图形化访问
- 阿里云服务器centos6安装vncserver
- CentOS6.4_X64安装配置vsFTP-2.2.2
- 基于CentOS6.3_x64的drbd8.4.2安装配置
- 【Linux-FTP】CentOS6.4_X64安装配置vsFTP-2.2.2
- 职场分享:学会管理我们的时间
- Qt5 的 examples and demos
- Warshall 传递闭包算法
- Android Bitmap用法大全,以后再也不担心了
- zoj 1232 Adventure of Super Mario (Floyd+dp)
- CentOS6.5_x64安装VNCserver
- Linux命令:find与exec参数的用法
- layoutSubviews与drawRect
- Java 如何实现非阻塞的安全通信?
- libevent 事件loop分析
- WebService CXF 中的拦截器(Interceptor)
- IT人士必去的10个网站
- SpringMVC文件上传
- JDK的一些安装配置