最近遇到一件比较无奈的事情,领导给了个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客户端,准备连接服务器图形桌面。