Installation and use of VNCServer on CentOS 7

1. Installation

yum install tigervnc tigervnc-server

 2. Configuration

vncserver configuration, create a new configuration file

cp /lib/systemd/system/[email protected] /lib/systemd/system/vncserver@:1.service

 Edit /lib/systemd/system/vncserver@:1.service

vim /lib/systemd/system/vncserver@:1.service

 

After the modification is completed, save and exit (Esc+:wq)

set password

vncpasswd

restart systemd

systemctl daemon-reload

 Start the service

sudo systemctl enable vncserver@:1.service

 start the service

sudo systemctl start vncserver@:1.service

View service status

systemctl status vncserver@:1.service

 

Open port number (5901)

firewall-cmd --zone=public --add-port=5901/tcp --permanent

 restart firewall

firewall-cmd --reload

 3. Start

stop process

vncserver -kill :1

 start up

vncserver :1

 4. Connection

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

 

Guess you like

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