CentOS 7 VNC 配置

前端之家收集整理的这篇文章主要介绍了CentOS 7 VNC 配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

确保桌面已安装@H_502_2@

yum -y install xorg-x11-app*

yum-yinstalltigervnctigervnc-servertigervnc-server-module

cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

@H_502_2@

vim/etc/systemd/system/vncserver@:1.service

[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=/usr/sbin/runuser -l root -c "/usr/bin/vncserver %i"

# 一般账号

PIDFile=/home/root/.vnc/%H%i.pid

# root账号

PIDFile=/root/.vnc/%H%i.pid

ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

vncpasswd@H_502_2@

systemctl daemon-reload

systemctl start vncserver@:1.service

systemctl enable vncserver@:1.service

vncserver -list@H_502_2@

# firewall-cmd --permanent --add-service="vnc-server" --zone="public"

# firewall-cmd --reload

ip:5901(ip:1)

原文链接:https://www.f2er.com/centos/375889.html

猜你在找的CentOS相关文章