cent os通过ssh安装图形桌面

最近遇到一件比较无奈的事情,领导给了个was的安装文档给我,让我按文档在测试服务器搭建一下was环境。现在用was的应该不多了,也只有企业可能会用吧,不过牢骚归牢骚,工作还是要完成的。PS:近期在公司安排下,我需要协助维护一个多年前的老项目,所以才有了这档子事情。
仔细看了下文档,竟然是图形化桌面上面装的,没办法干脆装个图形桌面,然后通过远程桌面来装was吧。

服务器环境:centos 6.7
步骤如下:
查看相关信息:

[root@base yum.repos.d]# cat /etc/issue
CentOS release 6.7 (Final)
Kernel \r on an \m
[root@base ~]# yum grouplist |grep -i window
   Legacy X Window System compatibility
   X Window System
[root@base yum.repos.d]# yum grouplist |grep -i kde
   KDE Desktop

install “X Window System”

[root@base yum.repos.d]# yum groupinstall "X Window System"
Loaded plugins: fastestmirror, refresh-packagekit
Setting up Group Process
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
 * ...
 * ...
 * ...

install “Desktop”

[root@base yum.repos.d]# yum groupinstall "Desktop"
Loaded plugins: fastestmirror, refresh-packagekit
Setting up Group Process
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
 * ...
 * ...
 * ...

install “KDE Desktop”

[root@base yum.repos.d]# yum groupinstall "X Window System"
Loaded plugins: fastestmirror, refresh-packagekit
Setting up Group Process
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
 * ...
 * ...
 * ...

中间如果没报错,那么到这里就安装完成了。然后我是通过Xmanager来远程连接服务器的。
Xmanager连接服务器之前,服务器还需要如下设置:
1. 修改/etc/gdm/custom.conf ,内容如下:

[daemon]

[security]

AllowRemoteRoot=true

[xdmcp]

Port=177
Enable=true


[greeter]

[chooser]

[debug]

2.修改/etc/inittab, 把id 3改成5,上面的注释很明确,5是X11,也就是图形界面

#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:

3.防火墙设置,开放177端口

[root@base yum.repos.d]# vim /etc/sysconfig/iptables

新增如下内容:

-A INPUT -m state --state NEW -m udp -p udp --dport 177 -j ACCEPT

然后重启iptables服务service iptables restart

[root@base yum.repos.d]# service iptables restart
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]

4.重启服务器

[root@base yum.repos.d]# reboot

5.等服务器启动完毕之后,打开Xmanager客户端,准备连接服务器图形桌面。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值