Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Details of rhel7.3 installation and configuration VNC

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

VNC (Virtual Network Computing) allows Linux systems to access Linux desktops like remote desktop access in Windows. The configuration of this article is to run under the environment of rhel7.3 server.

First check to see if the server has VNC installed

[root@test ~] # rpm-qa tigervnc tigervnc-server

If it is not installed, it will appear directly.

Package tigervnc is not installed

Package tigervnc-server is not installed

If you don't have X-Windows Desktop installed, you need the server to run in a graphical interface to install Xwindows,VNC first.

[root@test ~] # yum check-update

[root@test ~] # yum groupinstall "X Window System"

[root@test ~] # yum install gnome-classic-session gnome-terminal nautilus-open-terminal

Control-center liberation-mono-fonts

[root@test ~] # unlink / etc/systemd/system/default.target

[root@test ~] # ln-sf / lib/systemd/system/graphical.target / etc/systemd/system/default.target

[root@test ~] # reboot

1. Install VNC packages:

[root@test ~] # yum install-y tigervnc-server

2. Modify the configuration information and create a folder vncserver@:1.service under / etc/systemd/system/

Copy the example config file from / lib/systemd/system/vncserver@.service

[root@test ~] # cp / lib/systemd/system/vncserver@.service / etc/systemd/system/vncserver@:1.service

Then open the configuration file / etc/systemd/system/vncserver@:1.service and replace the default user name

Put the USER in this business

ExecStart=/sbin/runuser-l-c "/ usr/bin/vncserver I"

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

Replace with root

ExecStart=/sbin/runuser-l root-c "/ usr/bin/vncserver% I"

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

If you are another user, you can replace USER.

ExecStart=/sbin/runuser-l-c "/ usr/bin/vncserver I"

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

3. Reload systemd

[root@test ~] # systemctl daemon-reload

4. Set the password for VNC

[root@test ~] # vncpasswd

If there is an iptable firewall, you can release the port of VNC.

Vim / etc/sysconfig/iptables

Add in the appropriate position

-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 5900 tcp 5903-j ACCEPT

Then restart iptable

Service iptables restart

If you are using rhel 7.3 default firewall, you need to

[root@test~] # firewall-cmd-permanent-add-service vnc-server

[root@test~] # systemctl restart firewalld.service

5. Set default startup and enable VNC

[root@test ~] # systemctl enable vncserver@:1.service

[root@test ~] # systemctl start vncserver@:1.service

This is configured, and then download a VNC Viewer software from the Windows client, and you can connect VNC graphics remotely.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report