Table of Contents
CentOS7.6 server deployment VNC
Home Operation and Maintenance CentOS How to deploy VNC on CentOS7.6 server

How to deploy VNC on CentOS7.6 server

Jan 26, 2021 pm 05:00 PM

The following is an introduction to CentOS7.6 server deployment VNC from the centos tutorial column The method, I hope it will be helpful to friends in need!

CentOS7.6 server deployment VNC

Install vnc server

[root@localhost ~]# yum install tigervnc-server
Copy after login

Open vnc

[root@localhost ~]# vncserver 

You will require a password to access your desktops.

Password:				//输入密码
Verify:					//重复密码
Would you like to enter a view-only password (y/n)? n		//只可看的密码,一般选n
A view-only password is not used
xauth:  file /root/.Xauthority does not exist

New 'localhost.VD:1 (root)' desktop is localhost.VD:1

Creating default startup script /root/.vnc/xstartup
Creating default config /root/.vnc/config
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.VD:1.log
Copy after login

Open remote port

[root@localhost ~]# vncserver :1

New 'localhost.VD:1 (root)' desktop is localhost.VD:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.VD:1.log
Copy after login

View server ip

[root@localhost ~]# ifconfig | grep inet
        inet 10.10.41.43  netmask 255.255.252.0  broadcast 10.10.43.255
        inet6 2400:dd01:1001:1040:3b37:b445:ad5b:ad2f  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::bdd8:8bd:8871:f736  prefixlen 64  scopeid 0x20<link>
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
Copy after login

Turn off the firewall and selinux

1. Turn off the firewall

Set the firewalld service to disable

[root@localhost ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Copy after login

Check the status, closed successfully

[root@localhost ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Apr 22 10:06:35 localhost.VD systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 22 10:06:37 localhost.VD systemd[1]: Started firewalld - dynamic firewall daemon.
Apr 22 15:31:38 localhost.VD systemd[1]: Stopping firewalld - dynamic firewall daemon...
Apr 22 15:31:39 localhost.VD systemd[1]: Stopped firewalld - dynamic firewall daemon.
Copy after login

2. Close selinux

  • Temporary modification
[root@localhost ~]# setenforce 0
Copy after login
  • Permanent modification, it will take effect next time you boot up
[root@localhost ~]# vim /etc/selinux/config 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled				//开启时显示为enforcing,将其改为disabled
Copy after login
  • Check the status, successfully closed
[root@localhost ~]# getenforce
Permissive
Copy after login

Remote access

Open vnc-viewer and enter the IP and port number you need to access to access. The IP used in this article is: 10.10.41.43::5901

##

The above is the detailed content of How to deploy VNC on CentOS7.6 server. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to restart the server via command line in CentOS system How to restart the server via command line in CentOS system Mar 05, 2025 pm 03:30 PM

This article explains how to restart a CentOS server using the command-line reboot command. It emphasizes the importance of saving data and gracefully shutting down applications before using sudo reboot to avoid data loss. Potential risks, includin

How to restart the network service in centos8 How to restart the network service in centos8 Mar 05, 2025 pm 03:29 PM

This guide details methods for restarting network services in CentOS 8. It compares using systemctl (recommended for reliability) with ifdown/ifup (faster, less robust). Troubleshooting steps for network outages are also provided, covering connecti

How to shut down and restart centos7 shutdown and restart command How to shut down and restart centos7 shutdown and restart command Mar 05, 2025 pm 03:24 PM

This guide details safe shutdown and reboot methods for CentOS 7 servers. It emphasizes using the shutdown command for its flexibility and ability to schedule restarts, contrasting it with the less-flexible reboot and halt commands. Safe practices

What are the centos restart commands What are the centos restart commands Mar 05, 2025 pm 03:28 PM

This article explains CentOS server reboot commands. It focuses on reboot for immediate restarts and shutdown -r for scheduled reboots, highlighting the differences and best practices for each. The main issue is providing clear instructions and con

Centos official website entrance Centos official website entrance Mar 05, 2025 pm 03:32 PM

This article discusses the discontinuation of CentOS and its replacement by CentOS Stream. It details how to find information, downloads, and verify the integrity of CentOS Stream ISOs, now primarily hosted on the Red Hat website. Community support

How do I configure log rotation in CentOS? How do I configure log rotation in CentOS? Mar 17, 2025 pm 04:43 PM

The article explains how to configure log rotation in CentOS using logrotate, detailing installation, configuration, and benefits like disk space management and security.

How do I use Logical Volume Management (LVM) in CentOS to manage storage? How do I use Logical Volume Management (LVM) in CentOS to manage storage? Mar 17, 2025 pm 04:51 PM

The article discusses using Logical Volume Management (LVM) in CentOS for efficient storage management, detailing steps for setup, extension, and backup/restore processes, and highlighting LVM's advantages over traditional partitioning.

How do I install and configure MySQL/MariaDB on CentOS? How do I install and configure MySQL/MariaDB on CentOS? Mar 17, 2025 pm 04:35 PM

Article discusses installation, configuration, and troubleshooting of MySQL/MariaDB on CentOS, including system requirements and security measures.(159 characters)

See all articles