# CentOS上安装VNC后,方便进行运程桌面连接
# 安装VNC服务 开启root权限,一般建议用User账号 yum -y install vnc *vnc-server* echo "VNCSERVERS="1:root"" >> /etc/sysconfig/vncservers echo "VNCSERVERARGS[1]="-geometry 1024x768"" >> /etc/sysconfig/vncservers echo "input vnc password for root(Password must be complex) ..." # 设置访密码 vncpasswd # 加入开机启动 chkconfig --add vncserver chkconfig vncserver on # 开启VNC防火墙默认端口5901 iptables -I INPUT -p tcp --dport 5901 -j ACCEPT