CentOS Installation VNC Server

Source: Internet
Author: User

The Linux system provides the developer with the convenience of performance, but it loses the convenience of the interface management of window System. Here's how to implement an interface on a Linux system. (CentOS as an example)

This article explains in detail the installation of the VNC service under CentOS and the VNC Viewer connection. VNC SERVER Installation:

1. Run the following command as the root user

Yum Install Tigervnc-server

2. Deactivate the firewall

Systemctl Stop Firewalld.servicesystemctl Disable Firewalld.service
VNC SERVER Configuration:

1. Create a new profile, take the first connection as an example (you can also open multiple connections at the same time, modify the numbers.) A multi-user connection like Windows), as follows:

CP /lib/systemd/system/[email protected]/lib/systemd/system/[email protected]:1. Service
CP /lib/systemd/system/[email protected]/lib/systemd/system/[email protected]:2. Service

2. View the configuration created above:

ls /lib/systemd/system

3. Edit the configuration file/lib/systemd/system/[email protected]: 1.service. Replace <user> with the username you need to connect to, and it is generally recommended that the first connection be to the root user.

VI /lib/systemd/system/[email protected]:1. Service

[Unit]description=Remote Desktop Service (VNC) after=Syslog.target Network.target[service]type=forking# Clean any existing filesinch/tmp/. x11-Unix Environmentexecstartpre=/bin/SH-C'/usr/bin/vncserver-kill%i >/dev/null 2>&1 | |:'Execstart=/sbin/runuser-l root-c"/usr/bin/vncserver%i"Pidfile=/root/.vnc/%h%I.pidexecstop=/bin/SH-C'/usr/bin/vncserver-kill%i >/dev/null 2>&1 | |:'

Save Update VNC configuration:

1. Save

2. Set Vncserver password

VNCPASSWD Root

3. Starting and shutting down the VNC server

Systemctl start [email protected]:1. servicesystemctl stop [email protected]:1. Service

4. Start-up automatically

SYSTEMCTL enable [email protected]:1. Service

Frequently encountered problems with VNC server open:
 for [Email protected]:1"systemctl Status [email protected]:1.service"" Journalctl-xe "  for  VI /lib/systemd/system/[email protected]:2. Service

Modify [email Protected]:1.service Type to Simple

Re-execute

VNC Viewer Connection

1. Download and install the VNC viewer:

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

2. Configuration

Note: Port number 5901, is the first connection. The default is the 590+ connection number. You can manually modify the port.

CentOS Installation VNC Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.