温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

RedHat7 配置VNCServer

发布时间:2020-02-28 19:33:03 来源:网络 阅读:1573 作者:孙洪波 栏目:软件技术

1. 安装软件(使用root账号)

# yum install tigervnc-server

2. 配置VNC用户密码

[root@localhost ~]# su - michael

Last login: Wed Jan  9 13:52:12 CST 2019 on pts/2

[michael@localhost ~]$ vncpasswd

Password:

Verify:

3. 配置并启动VNC Service

      按照/lib/systemd/system/vncserver@.service中的:

        # Quick HowTo:

        # 1. Copy this file to /etc/systemd/system/vncserver@:1.service

        # 2. Edit /etc/systemd/system/vncserver@.service, replacing <USER>

        #    with the actual user name. Leave the remaining lines of the file unmodified

        #    (ExecStart=/usr/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"

        #     PIDFile=/home/<USER>/.vnc/%H%i.pid)

        # 3. Run `systemctl daemon-reload`

        # 4. Run `systemctl enable vncserver@:<display>.service`

4. 配置防火墙(注意每个使用的端口都要配置)

  • #     iptables -I INPUT -m state --state NEW -p tcp --destination-port 5901 -j     ACCEPT

  • #     iptables -I INPUT -m state --state NEW -p tcp --destination-port 5902 -j     ACCEPT

  • #     service iptables save

    5. 完成,现在应该可以通过客户端连接了。

    向AI问一下细节

    免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

    AI