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

What are the seven steps of vnc login under CentOS 7?

2025-03-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article will explain in detail what are the seven steps of vnc login under CentOS 7. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

What is VNC (Virtual Network Computing) VNC allows Linux systems to be accessed similarly to remote desktop access in Windows

Linux Desktop. This article is configured to run under the environment of CentOS 7 HP server.

Preparation tool: iIS7 server management tool

The VNC function in the IIS7 server management tool can be said to be very good to use. It can open links in batch.

Of course, since its VNC tools are so useful, its other functions must not be too bad. IIS7 server bulk management tools benefits: batch management, synchronization operations, expiration reminders, data security and periodic execution. Applicable systems: Windows and liunx operating systems. Vnc and Ftp batch operations are supported. The automatic update of the program will not make you suffer from the update, which saves you a lot of trouble. After all, the current software updates need to be re-downloaded and installed, which is very troublesome.

First of all, try to see if the server has VNC installed.

[root@linuxidc] # rpm-Q 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 do not have X-Windows Desktop installed, install Xwindows first.

[root@linuxidc ~] # yum check-update

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

[root@linuxidc ~] # yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center

Liberation-mono-fonts

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

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

[root@linuxidc ~] # reboot

Step 1: install VNC packages:

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

The second step is to modify the configuration information and create a folder vncserver@:1.service under / etc/systemd/system/ to change the example config file from / lib/

Copy systemd/system/vncserver@.service into it

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

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

Find this business.

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

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

Here I log in directly as the root user, so I replace it with

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

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

If it is another user, such as john, replace it as follows

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

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

Step 3, reload systemd

[root@linuxidc ~] # systemctl daemon-reload

Step 4, set the password for VNC

[root@linuxidc ~] # vncpasswd

Step 5, because Centos 7 on my side uses iptable firewall, so

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

Restart iptable

Service iptables restart

If you are using Centos 7 default firewall, you may need to

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

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

Step 6: start and enable VNC by default

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

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

So basically the Centos side is set up, and the Windows side is going to the next VNC Viewer software. Connect it and try it. It looks a little shabby, but it goes up.

This is the end of the seven steps of vnc login under CentOS 7. I hope the above content can help you to some extent and learn more knowledge. If you think the article is good, you can share it for more people to see.

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: 303

*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