Centos 7 VNCServer configuration, centosvncserver

Source: Internet
Author: User

Centos 7 VNCServer configuration, centosvncserver

After Centos 7 is installed, the zookeeper Xmanager 3 or 4 cannot work normally, and The VNCServer cannot be started.

(Xmanager is used by individual users, because security is not required, it can be used only after configuration, and it has been quite variable)

In order to save time for installing vncserver, I forgot to use this article.

 

Security guard/Configuration:

Use yum Security tigervnc-server

# Yum install tigervnc-server

 

Copy the volume server configuration file:

# Cp/lib/systemd/system/vncserver @. service/lib/systemd/system/vncserver @: 1. service

 

Follow the instructions in the vncserver @: 1. service file header. You only need the following parts:

Change all the places with <USER> to the alias name. This article uses root

 

Re-add zookeeper EMD to keep the modification in progress so that the modification takes effect.

# Systemctl daemon-reload

 

Set hosts to password-Based Access

# Vncpasswd

 

Robot service command:

# Systemctl start vncserver @: 1. service

 

Question 1: cannot activate the service

The following message is displayed:

 

Solution:

Modify vncserver @: 1. Type = simple in the service file

Then click OK after the dynamic route for service.

# Systemctl daemon-reload

# Systemctl start vncserver @: 1. service

 

At this point, vncview in win7 can already be used to connect the VNCServer. (You need to add the exposed port 5901 to the IP address, for example, 10.0.0.100: 5901)

 

Question 2: service cannot be stopped

Use the following command to stop services

# Systemctl stop vncserver @: 1. service

If the preceding command is successfully executed and no zookeeper prompt is displayed, telnet is used to access port 5901 Of The VNCServer, which means that the local server is still running.

Description 2:

(1) The above situation only occurs when the root user uses the token.

(2) Use # vncserver-kill: 1 to stop the service

 

Solution:

Modify the/lib/systemd/system/vncserver @: 1. service file

Put PidFile =/home/root/. vnc/% H % I. pid

Change to PidFile =/root/. vnc/% H % I. pid

After restarting the service, you can use the # systemctl stop vncserver @: 1. service Command to stop the service.

 

Note:

1) The command for systemctl to set the server auto-renewal to systemctl enable vncserver @: 1. service

2) In the configuration process, it is found that the following images are all vncserver @: 1. The reason why the service is not properly configured:

(1) The Service stops after the dynamic server command is executed and the telnet port 5901 fails.

(2) Use the vncview tool to encrypt connections and then export Unencryption connection into connections, or telnet port 5901 and then disable connections: Unencryption connection

3) Use # systemctl status vncserver @: 1. The service does not necessarily check whether the service is running correctly, especially in the processing segment.

It is recommended that you use the DOS command telnet to check whether the service is dynamic, or use # lsof-I: 5901

4) The fire prevention measures of the normal handling Section are as follows:

# Systemctl stop iptables. service

# Systemctl disable iptables. service

# Systemctl stop firewalld. service

# Systemctl disable firewalld. service

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.