perloader
一、 安装 GNOME 图形化桌面
@required
  #yum groupinstall -y "X Window System"
  #yum groupinstall -y "Desktop"
  #yum groupinstall -y "Chinese Support"

  @optional
  #yum groupinstall -y "Desktop Platform"
  #yum groupinstall -y "Desktop Platform Development"
  #yum groupinstall -y "Fonts"
  #yum groupinstall -y "Internet Browser"

 

二、 安装 VNCSERVER & 配置
1. 安装 vncserver
yum install tigervnc
yum install tigervnc-server

2. 配置 vncserver
 1) 把 vncserver 服务设置为开机自启动
 #chkconfig --level 345 vncserver on
 2) 为 vncserver 设置远程登录密码
 #vncserver
 此处需要为 vncserver 远程登录设置密码 
 You will require a password to access your desktop.
 Password:****
 Verify:****
 3) 配置为使用gnome桌面
 修改 /root/.vnc/xstartup文件,把最后的 twm & 删掉 加上 gnome-session &。
 #vi /root/.vnc/xstartup
 4) 配置vncserver启动后监听端口和环境参数
 修改/etc/sysconfig/vncservers 文件添加以下内容
 #vi /etc/sysconfig/vncservers
 VNCSERVERS="1:root"
 # 桌面号:用户 监听 590* 端口
 VNCSERVERARGS[1]="-geometry 900x600"
 5) 重启vncserver服务
 #service vncserver restart
 6) 将vnc的访问端口添加到Linux的防火墙信任列表
 vi /etc/sysconfig/iptables
 添加如下
 -A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5910 -j ACCEPT
 重启
 service iptables restart

三、 远程登录测试

使用 vnc viewer 远程登录测试。
VNC Server 为 远程服务器 IP:1,连接后输入密码即可。

Leave a Reply

Your email address will not be published. Required fields are marked *

xyz