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

The process of installing VNC on Linux system

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces "the process of installing VNC in Linux system". In daily operation, I believe that many people have doubts about the process of installing VNC in Linux system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "the process of installing VNC in Linux system". Next, please follow the editor to study!

1. Install tigervnc-server VNC package [root@localhost ~] # yum install tigervnc-server # without configuring yum source, you can use rpm-ivh to install [root@localhost ~] # rpm-qc tigervnc-server/etc/sysconfig/vncservers [root@localhost ~] # chkconfig-- level 35 vncserver on II. Purpose: launch [root@localhost ~] # vim / etc/sysconfig/vncserversVNCSERVERS= "1:root" as root user to use vnc to log in to the system and create vnc password Vncpasswd [root@localhost ~] $vncpasswdPassword: enter the password Password must be at least 6 characters-try againPassword: enter the password Verify:

Start the service once and generate / home/visitor/.vnc/xstartup

[root@localhost] $vncserverNew 'localhost.localdomain:1 (visitor)' desktop is localhost.localdomain:1Starting applications specified in / home/visitor/.vnc/xstartupLog file is / home/visitor/.vnc/localhost.localdomain:1.log III Startup service [root@localhost ~] # / etc/init.d/vncserver start is starting the VNC server: 1:rootNew 'localhost.localdomain:1 (visitor)' desktop is localhost.localdomain:1Starting applications specified in / home/visitor/.vnc/xstartupLog file is / home/student/.vnc/localhost.localdomain:2.log [OK] IV. Add firewall configuration [root@localhost ~] # vim / etc/sysconfig/iptables-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 5901-j ACCEPT-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 5902-j ACCEPT [root@localhost ~] # service iptables restartiptables: Flushing firewall rules: [OK] iptables: Setting chains to policy ACCEPT: filter [OK] iptables: Unloading modules: [OK] iptables: Applying firewall rules: [OK]

PS: sometimes because of network security requirements, common ports cannot be used. You need to change the default port of vnc service by following these steps:

one. Modify the default port of vnc

[root@localhost ~] # vim / usr/bin/vncserver

Note: modify the default port 5900 in the following two lines to the port you want to modify 118:$vncPort = 5900 + $displayNumber

If (! bind (S, pack ('S n x12, $AF_INET, 5900 + $n)) {

two。 Restart the vnc service [root@localhost ~] # / etc/init.d/vncserver restar

3. When accessing vnc, such as using VNC viewer, the port you access is as follows:

192.168.2.11 9701 and the desktop port you configured in / etc/sysconfig/vncserver is 1:root, then the port number modified in the configuration file in step 1 should be 9701-1mm 9700

At this point, the study on "the process of installing VNC in Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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