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 steps for Centos7 to install VNC

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

Share

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

Today, I will talk to you about the steps of installing VNC in Centos7. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

[remember: when installing VNC above Centos7, do not change the runlevel. Default is OK]

1. VNC installation

/ / install remote Desktop programs

# yum groupinstall-y "GNOME Desktop"

[some documents modify the runtime level of the Linux system at this step, do not modify it, otherwise there will be unknow errors when installing oracle]

/ / install VNC program # yum install tigervnc-server-y

2. Set the configuration files and services of the VNC program

# cp-a / lib/systemd/system/vncserver@.service / etc/systemd/system/vncserver@:1.service / / this is used by ordinary root users

# cp-a / lib/systemd/system/vncserver@.service / etc/systemd/system/vncserver@:2.service / / this is used by oracle users

/ / configure the above two files # vim / etc/systemd/system/vncserver@:1.service original file [Unit] Description=Remote desktop service (VNC) After=syslog.target network.target [Service] Type=forking ExecStartPre=/bin/sh-c'/ usr/bin/vncserver-kill% I > / dev/null 2 > & 1 | |: 'ExecStart=/usr/sbin/runuser-lingual files * root *-c "/ usr/bin/vncserver% I" PIDFile=/***root * / .vnc/%H%i.pid ExecStop=/bin/sh-c'/ usr/bin/vncserver-kill% I > / dev/null 2 > & 1 | |:'[Install] WantedBy=multi-user.target Note: root user configuration and path in the configuration file If it is an oracle user, PIDFile=/home/oracle continues to edit the configuration file # vim / etc/sysconfig/vncservers VNCSERVERS= "2:oracle" VNCSERVERARGS [2] = "- geometry 1360x768" [I used an oracle user, so I configured a single user]

3. Create oracle users

/ usr/sbin/groupadd oinstall

/ usr/sbin/groupadd dba

/ usr/sbin/useradd-g oinstall-G dba oracle

Passwd oracle / / this is the oracle login password in ssh mode.

4. Set the oracle user password for VNC

# su-oracle

# vncpasswd / / enter the password twice and select N to end

5. Switch to root to start the VNC service

Systemctl start vncserver@:2 # I only use oracle users, so I only start this service

Systemctl enable vncserver@:2 # is set to boot the service automatically

6. VNC is installed here and the installation is complete

7. We download the VNC client and connect remotely on the PC computer.

Download website: https://www.realvnc.com/en/connect/download/viewer/

8. Use the customer you just downloaded to connect to the remote desktop

Upper left corner file-new connection

Enter vncserver:

User name:

Screenshot of successful connection

After reading the above, do you have any further understanding of the steps for Centos7 to install VNC? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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