CentOS7.2安裝VNC,讓Windows遠端連線CentOS 7.2 圖形化介面

來源:互聯網
上載者:User

標籤:ted   group   建立   圖形化   syslog   sys   技術   font   centos7.2   

需求及說明
        開發老大突然心血來潮,讓實現在windows下通過vnc實現串連到CentOS系統的圖形化介面,這裡實踐CentOS7.2下安裝VNC,讓Windows遠端桌面Linux解決了不少問題,寫個實際操做,如果你們碰到同樣的問題,就可以迅速解決,無需頭疼甚至放棄了。        說明:這裡的系統為CentOS 7.2的圖形化介面系統,
開始操作1、安裝安裝X-Window
# yum check-update# yum groupinstall "X Window System"# yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts# unlink /etc/systemd/system/default.target# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target# reboot #重啟機器
2、安裝VNC
# yum install tigervnc-server -y
3、從VNC備份庫中複製service檔案到系統service服務管理目錄下【原文這裡存在錯誤,不是建立[email protected]:1.service檔案夾】
# cp /lib/systemd/system/[email protected] /etc/systemd/system/[email protected]:1.service      #複製並被重新命名為[email protected]:1.service
4、修改[email protected]:1.service檔案
[[email protected] system]# grep -n -v "^#" /etc/systemd/system/[email protected]\:1.service31:32:33:[Unit]34:Description=Remote desktop service (VNC)35:After=syslog.target network.target36:37:[Service]38:Type=forking39:User=root40:ExecStart=/usr/bin/vncserver :1 -geometry 1280x1024 -depth 16 -securitytypes=none -fp /usr/share/X11/fonts/misc41:ExecStop=/usr/bin/vncserver -kill :142:43:[Install]44:WantedBy=multi-user.target

修改檔案使配置生效:

# systemctl daemon-reload
5、為[email protected]:1.service設定密碼
# vncpasswd
6、啟動VNC
# systemctl enable [email protected]:1.service #設定開機啟動# systemctl start [email protected]:1.service #啟動vnc會話服務# systemctl status [email protected]:1.service #查看nvc會話服務狀態# systemctl stop [email protected]:1.service #關閉nvc會話服務# netstat -lnt | grep 590*      #查看連接埠tcp        0      0 0.0.0.0:5902            0.0.0.0:*               LISTEN     tcp        0      0 0.0.0.0:5903            0.0.0.0:*               LISTEN     tcp6       0      0 :::5902                 :::*                    LISTEN     tcp6       0      0 :::5903                 :::*                    LISTEN     
8、windows使用VNC連結到圖形化介面

1、連結圖形化介面伺服器的5902連接埠

2、輸入前面使用vncpasswd設定的密碼

3、連結成功

CentOS7.2安裝VNC,讓Windows遠端連線CentOS 7.2 圖形化介面

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.