Xmanager远程桌面登录CentOS 6.5

  1. 云栖社区>
  2. 博客>
  3. 正文

Xmanager远程桌面登录CentOS 6.5

猎人笔记 2015-11-25 11:36:52 浏览499
展开阅读全文

【前言】很多人都习惯了图形化界面的方式安装ORACLE数据库,随着阿里云的兴起,有的数据库开始部署到了阿里云上面,但是随即面临这个一个问题:阿里云的服务器是在公网上面的,但是个人电脑属于内网里面的,这样在进行设置DISPLAY的环境变量的时候就没有办法从公网上发送安装图面到个人电脑上。

 

【操作系统】Centos 6.5

【工具】Xmanager4

【解决方法】直接远程登录到服务器进行安装,毕竟LINUX也是有一个图形化界面的,详细操作如下:

1、使用命令 yum install xdm  安装XDM

[root@db01 ~]# yum install xdm
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.pubyun.com
* extras: mirrors.163.com
* updates: mirrors.163.com
base                                                                                                                                                                               | 3.7 kB     00:00    
base/primary_db                                                                                                                                                                    | 4.6 MB     01:02    
extras                                                                                                                                                                             | 3.4 kB     00:00    
extras/primary_db                                                                                                                                                                  |  33 kB     00:00    
updates                                                                                                                                                                            | 3.4 kB     00:00    
updates/primary_db                                                                                                                                                                 | 2.6 MB     00:37    
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-xdm.x86_64 1:1.1.6-14.1.el6 will be installed
--> Processing Dependency: libXpm.so.4()(64bit) for package: 1:xorg-x11-xdm-1.1.6-14.1.el6.x86_64
--> Processing Dependency: libXaw.so.7()(64bit) for package: 1:xorg-x11-xdm-1.1.6-14.1.el6.x86_64
--> Running transaction check
---> Package libXaw.x86_64 0:1.0.11-2.el6 will be installed
---> Package libXpm.x86_64 0:3.5.10-2.el6 will be installed
--> Finished Dependency Resolution

 

2、修改/etc/X11/xdm/Xaccess文件,找到下面的语句:# * #any  host  can  get  a  login  window  取消#

*                                       #any host can get a login window

 

3、修改/etc/gdm/custom.conf文件

[root@db01 ~]# cat /etc/gdm/custom.conf
# GDM configuration storage

[daemon]

RemoteGreeter=/usr/libexec/gdmgreeter

[security]

AllowRemoteRoot=true

[xdmcp]

Enable=true
Port=177
[greeter]

Browser=true

 

4、关闭防火墙:service iptables stop

或者添加允许端口:

在 -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT这一行下面增加下面两行

-A INPUT -m state --state NEW -m tcp -p tcp --dport 6000:6010 -j ACCEPT

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

 

5、测试,打开Xbrowser软件

image

image

弹出该窗口,显示已经可以远程登录了。

网友评论

登录后评论
0/500
评论
猎人笔记
+ 关注