cent os通过ssh安装图形桌面
生活随笔
收集整理的這篇文章主要介紹了
cent os通过ssh安装图形桌面
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
最近遇到一件比較無奈的事情,領導給了個was的安裝文檔給我,讓我按文檔在測試服務器搭建一下was環境。現在用was的應該不多了,也只有企業可能會用吧,不過牢騷歸牢騷,工作還是要完成的。PS:近期在公司安排下,我需要協助維護一個多年前的老項目,所以才有了這檔子事情。
仔細看了下文檔,竟然是圖形化桌面上面裝的,沒辦法干脆裝個圖形桌面,然后通過遠程桌面來裝was吧。
服務器環境:centos 6.7
步驟如下:
查看相關信息:
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 ,內容如下:
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]# reboot5.等服務器啟動完畢之后,打開Xmanager客戶端,準備連接服務器圖形桌面。
總結
以上是生活随笔為你收集整理的cent os通过ssh安装图形桌面的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: WGS84坐标系转为西安80坐标系的解决
- 下一篇: Elasticsearch+filebe