之前試了xmanager,不過好像和在centos6有很大不同,居然沒成功,然後找到了vncserver,試了下,成了
參考:
yum install tigervnc-server tigervnc-server-moduleyum install vnc
systemctl stop firewalld.service
systemctl disable firewalld.service
vi /etc/selinux/config
set "selinux=disabled" and comment the rest lines.
以開啟1號視窗為例(也可以同時開啟多個視窗,修改數字即可),方法如下:
cp /lib/systemd/system/[email protected] /lib/systemd/system/vncserver@:1.service
[unit]
description=remote desktop service (vnc)
after=syslog.target network.target
[service]
type=forking
# clean any existing files in /tmp/.x11-unix environment
execstartpre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
execstart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
pidfile=/root/.vnc/%h%i.pid
execstop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
vncserver@:1.service - remote desktop service (vnc)
loaded: loaded (/usr/lib/systemd/system/vncserver@:1.service; enabled)
active: failed (result: exit-code) since tue 2015-04-14 10:09:24 cst; 1min 36s ago
process: 3258 execstart=/sbin/runuser -l sysadmin -c /usr/bin/vncserver %i (code=exited, status=1/failure)
process: 3254 execstartpre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/success)
apr 14 10:09:24 f1a-vmhost-swpe systemd[1]: starting remote desktop service (vnc)...
apr 14 10:09:24 f1a-vmhost-swpe runuser[3258]: password:
apr 14 10:09:24 f1a-vmhost-swpe systemd[1]: vncserver@:1.service: control process exited, code=exited status=1
apr 14 10:09:24 f1a-vmhost-swpe systemd[1]: failed to start remote desktop service (vnc).
apr 14 10:09:24 f1a-vmhost-swpe systemd[1]: unit vncserver@:1.service entered failed state.
warning: unit file changed on disk, 'systemctl daemon-reload' recommended.
systemctl daemon-reload
vncpasswd root
按提示輸入密碼以及確認密碼
systemctl start vncserver@:1.service 或者 vncserver :1
關閉1號視窗:
systemctl stop vncserver@:1.service 或者 vncserver -kill :1
systemctl enable vncserver@:1.service
假設linux伺服器ip為192.168.1.24,開的視窗為1,則連線時如下:
然後按提示輸入之前的密碼:
輸入正確密碼後即可遠端到linux伺服器
Centos7安裝配置vnc
前提條件,已經安裝了乙個圖形介面 yum install tigervnc server y 安裝vnc服務 systemctl status vncserver service 檢查服務狀態 vncserver service remote desktop service vnc loaded l...
CentOS 7 安裝配置 VNC 詳解
from vnc是什麼 virtual network computing vnc允許linux系統可以類似實現像windows中的遠端桌面訪問那樣訪問linux桌面。本文配置是在centos 7 hp伺服器環境下執行。首先試試伺服器裝了vnc沒 root linuxidc rpm q tigerv...
CentOS 7 安裝配置 VNC 詳解
vnc是什麼 virtual network computing vnc允許linux系統可以類似實現像windows中的遠端桌面訪問那樣訪問linux桌面。本文配置是在centos 7 hp伺服器環境下執行。首先試試伺服器裝了vnc沒 root linuxidc rpm q tigervnc ti...