Xmanager遠端桌面登入CentOS 6.5

wzq609發表於2015-11-25

【前言】很多人都習慣了圖形化介面的方式安裝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

彈出該視窗,顯示已經可以遠端登入了。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12679300/viewspace-1846205/,如需轉載,請註明出處,否則將追究法律責任。

相關文章