1.修改linux启动方式
# vi /etc/inittab
将3改为5
id:5:initdefault:
2.关闭防火墙(或者单独打开接口)
#service iptables stop
# chkconfig iptables off (A RH-Firewall-l-INPUT -p tcp -m tcp --dport 5900:5903 -j ACCEPT)
#service iptables stop
# chkconfig iptables off (A RH-Firewall-l-INPUT -p tcp -m tcp --dport 5900:5903 -j ACCEPT)
3.
下载安装 vnc
4.修改配置文件
设置 vi /etc/sysconfig/vncservers
VNCSERVERS="1:root"
VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
设置 vi /etc/sysconfig/vncservers
VNCSERVERS="1:root"
VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
5.设置密码
# vncpasswd
# vncpasswd
Password:
Verify:
6.启动
# service vncserver start
# service vncserver start
7.查看端口
# netstat -lntpu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 1343/Xvnc
出错 远程连接后 桌面一片黑
解决:缺少桌面文件。继续安装 如下……