CentOS 7.6 配置VNC遠程訪問服務器圖形界面

CentOS 7.6 配置VNC遠程訪問服務器圖形界面

 

 

1. 安裝VNC

 

1.1 安裝圖形界面

 
  1. yum groupinstall "development tools"
  2. yum groupinstall "gnome desktop"

 

1.2 安裝配置vnc

 
  1. yum install tigervnc tigervnc-server -y
  2.  
  3. vncserver :n
  4.  
  5. #這裏的n是 sessionnumber,不指定默認爲1,也能夠是二、3等等。第一次會提示輸入密碼,之後能夠使用 vncpasswd 命令修改密碼。

具體以下:html

 
  1. [root@oracle ~]# vncserver :1
  2.  
  3. You will require a password to access your desktops.
  4.  
  5. Password:
  6. Verify:
  7. Would you like to enter a view-only password (y/n)? y
  8. Password:
  9. Verify:
  10. xauth: file /root/.Xauthority does not exist
  11.  
  12. New 'oracle.sysit.cn:1 (root)' desktop is oracle.sysit.cn:1
  13.  
  14. Creating default startup script /root/.vnc/xstartup
  15. Creating default config /root/.vnc/config
  16. Starting applications specified in /root/.vnc/xstartup
  17. Log file is /root/.vnc/oracle.sysit.cn:1.log
  18.  
  19. [root@oracle ~]# netstat -antlp | grep vnc
  20. tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 31009/Xvnc
  21. tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 31009/Xvnc
  22. tcp6 0 0 :::5901 :::* LISTEN 31009/Xvnc
  23. tcp6 0 0 :::6001 :::* LISTEN 31009/Xvnc

 

1.3 關閉vncserver

 
  1. [root@oracle ~]# vncserver -kill :1
  2. Killing Xvnc process ID 31009

 

1.4 指定分辨率和色深

默認參數,vncserver 顯示會圖標分辨率會比較小,咱們能夠指定參數。服務器

 
  1. vncserver :1 -geometry 1366x768 -alwaysshared -depth 24
  • -geometry 指定分辨率,-alwaysshared表明容許多用戶同時登陸, -depth代爲色深,參數有8,16,24,32。

 

2. 使用vnc-viewer訪問

vnc-viewer下載地址:http://www.canadiancontent.net/tech/download/VNC_Viewer.htmlsession

title

title

title

title

title

至此能夠遠程操做。oracle

若是以爲個人文章對您有app

相關文章
相關標籤/搜索