CentOS 7.2.1511 install and configure VNCServer

A CentOS installation of VNC Server

(1) Check whether the vnc server is installed

[root@localhost .X11-unix]# rpm -qa |grep vnc
gtk-vnc2-0.5.2-7.el7.x86_64
tigervnc-license-1.3.1 -4.el7_2.noarch
tigervnc-server-1.3.1-4.el7_2.x86_64
gvnc-0.5.2-7.el7.x86_64
tigervnc-server-minimal-1.3.1-4.el7_2.x86_64
[root@localhost . X11-unix]#



(2) If the system is not installed, install
# yum install -y tigervnc-server

(3) Stop and disable the firewall
# systemctl stop firewalld.service
# systemctl disable firewalld.service


Second configure VNC Server

(1) Check VNC Status of the server
First
# systemctl status vncserver@:.service
# systemctl is-enabled [email protected]




By default, the newly installed VNC service is not activated (disabled).

(2) Modify the configuration file
First copy a copy of
cp /lib/systemd/system/[email protected] /lib/systemd/system/vncserver@:1.service

Modify
vi vncserver@:1.service



(3) Run the vncserver command, Configure the access password
First switch the root user and run the vncserver command.
# vncserver

Here you will be prompted to enter the user's VNC password. After the setup is complete, you will need to use this password to access your remote desktop next time.

(4) Finally reload the service to make the new VNC configuration take effect:
# systemctl daemon-reload

(5) Automatically start the VNC service at startup:
# systemctl enable vncserver@:1.service

(6) Check the port the vnc service is listening on :
# netstat -tulpn | grep vnc




three Window installation VNC Viewer












four connections





five start and stop

(1) Start
Use the vncserver command to start the VNC service, the command format is "vncserver: desktop number", where "desktop number" uses "number" The mode indicates that each user needs to occupy 1 desktop. The example of the desktop with the
startup number 1 is as follows
[root@localhost ~]# vncserver :1

(2) Stop

Stop the VNC service, the command format is "vncserver -kill: desktop number"

[root@localhost ~]# vncserver -kill :1


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326402457&siteId=291194637