//////
////// 安装vnc
//////
# yum install tigervnc-server
-
总计 368 kB/s | 1.2 MB 00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : tigervnc-license-1.3.1-4.el7_2.noarch 1/3
正在安装 : tigervnc-server-minimal-1.3.1-4.el7_2.x86_64 2/3
正在安装 : tigervnc-server-1.3.1-4.el7_2.x86_64 3/3
验证中 : tigervnc-server-1.3.1-4.el7_2.x86_64 1/3
验证中 : tigervnc-server-minimal-1.3.1-4.el7_2.x86_64 2/3
验证中 : tigervnc-license-1.3.1-4.el7_2.noarch 3/3
已安装:
tigervnc-server.x86_64 0:1.3.1-4.el7_2
作为依赖被安装:
tigervnc-license.noarch 0:1.3.1-4.el7_2
tigervnc-server-minimal.x86_64 0:1.3.1-4.el7_2
完毕!
//////
////// 设置密码
//////
# su wode
# vncpasswd
//////
////// 配置 vnc
//////
# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
# The vncserver service unit file
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@.service
# 2. Edit <USER> and vncserver parameters appropriately
# ("runuser -l <USER> -c /usr/bin/vncserver %i -arg1 -arg2")
# 3. Run `systemctl daemon-reload`
# 4. Run `systemctl enable vncserver@:<display>.service`
# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
$ sudo systemctl enable vncserver@:1.service
$ sudo systemctl start vncserver@:1.service
///
/// 配置防火墙
///
$ sudo firewall-cmd --permanent --add-service vnc-server $ sudo systemctl restart firewalld.service