1.安装图形界面
sudo yum groupinstall basic-desktop desktop-platform x11 fonts
2.安装vnc服务
sudo yum -y install vnc-server tigervnc-server
3.配置vnc用户
vim /etc/sysconfig/vncservers
添加
VNCSERVERS="1:zhangsm 2:vnctest"
VNCSERVERARGS[1]="-geometry 1440x900"
VNCSERVERARGS[2]="-geometry 1440x900"
4.设置vnc登录密码
useradd vnctest
passwd vnctest
su vnctest
vncpasswd
5.重启 vncserver
service vncserver restart
6.配置vncserver开机启动
chkconfig vncserver on
7.配置防火墙
vim /etc/sysconfig/iptables
添加:-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
重启防火墙 service iptables restart
8.使用UltraVNC登录
参考:
ultravnc下载: https://sourceforge.net/projects/ultravnc/files/?source=navbar
centos安装图形界面: https://www.youtube.com/watch?v=opl9jMgx0eA
centos安装配置vncserver: https://www.youtube.com/watch?v=gzcPdAksKII