Redhat下VNC SERVER的配置
2013-06-19 14:05
197 查看
1、启动VNC SERVER
输入vncserver,第一次启动会要求输入验证密码,完成后,VNC SERVER就启动了
[root@localhost ~]# vncserver
You will require a password to access your desktops.
Password:
//输入密码
Verify:
//再次输入密码
xauth: creating new authority file /root/.Xauthority
New ‘localhost.localdomain:1 (root)’ desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
[root@localhost ~]#
2、编辑.vnc/xstartup
使用VI打开xstartup文件,如下:
[root@localhost /]# cd /root/.vnc
[root@localhost .vnc]# vi xstartup
删除全部内容,然后添加如下内容:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
3、重启动VNC SERVER
[root@localhost ~]# vncserver -kill :1
Killing Xvnc process ID 21198
[root@localhost ~]# vncserver
New ‘localhost.localdomain:1 (root)’ desktop is localhost.localdomain:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
[root@localhost ~]#
4、查看VNC的监听端口
如下,VNC用到了三个端口:5801、5901、6001。
[root@localhost /]# netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:724 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN
tcp 0 0 172.200.102.3:5901 181.181.181.51:1669 ESTABLISHED
tcp 0 0 :::6001 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 1364 ::ffff:172.200.102.3:22 ::ffff:181.181.181.51:1599 ESTABLISHED
[root@localhost /]#
5、在防火墙上打开VNC用到的上面三个端口
[root@localhost /]# cd /etc/sysconfig
[root@localhost sysconfig]# vi iptables
添加如下三行:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5801 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5901 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 6001 -j ACCEPT
重记动IPTABLES
[root@localhost sysconfig]#
/etc/rc.d/init.d/iptables restart
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_ns ip_conntrack_ftp [ OK ]
[root@localhost sysconfig]#
6、使用VNC VIEW连接VNC SERVER
下载VNC VIEW,运行,然后输入IP:端口号,输入刚才设定的密码,进入REDHAT桌面。
相关文章推荐
- RedHat 简易配置 VNC Server 与VNC View详细说明
- Linux Study之--RedHat EL6配置VNC server
- Redhat 6.0中VNC Server的配置方法
- Linux Study之--RedHat EL6配置VNC server
- Redhat下VNC SERVER的配置
- RedHat 简易配置 VNC Server 与VNC View详细说明!
- redhat 配置vnc server
- 解决 红帽redhat 7.2 配置vnc server问题
- RedHat 简易配置 VNC Server 与VNC View详细说明!
- Redhat 5.8 配置yum源
- redhat 下安装jdk 配置
- RedHat6配置CentOS6的yum源方法
- redhat6.2配置yum
- RedHat 6.3 配置163 yum 升级源
- redhat 6 配置 yum 源的两种方法
- redhat 6.5 安装 oracle11g详细过程及配置
- redhat下配置vncserver 以及…
- (总结)CentOS Linux下VNC Server远程桌面配置详解
- VMware Linux RedHat 9.0 tftp server配置(修改)
- redhat虚拟机NAT上网配置