centos 安装VNCSERVER

来源:互联网 发布:Linux cookie设置 编辑:程序博客网 时间:2024/05/24 03:24
  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/vncserver@.service /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-reloadsystemctl enable vncserver@:1.servicerebootsystemctl start vncserver@:1.service



0 0