centos 安裝VNCSERVER

  1. 服務器安裝圖形化桌面:
    yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
    ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
    reboot
  2. 安裝vnc-server包:yum install tigervnc-server
  3. useradd work
  4. cp /lib/systemd/system/[email protected] /etc/systemd/system/vncserver@:1.service
  5. vi /etc/systemd/system/vncserver@:1.service
  6. 關閉防火牆:

  7. [root@vhost ~]# systemctl stop firewalld

    [root@vhost ~]# systemctl  disable firewalld

    Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

    Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

  8. 設置密碼:
    [root@vhost ~]# su - work
    [work@vhost ~]$ vncserver 
    You will require a password to access your desktops.
    Password:

  9. Verify:

    xauth:  file /home/work/.Xauthority does not exist


    New 'vhost:1 (work)' desktop is vhost:1


    Creating default startup script /home/work/.vnc/xstartup

    Starting applications specified in /home/work/.vnc/xstartup

    Log file is /home/work/.vnc/vhost:1.log

    su -
    systemctl daemon-reload
    
    systemctl enable vncserver@:1.service
    
    reboot
    systemctl start vncserver@:1.service



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章