1. Installing VNC server[[email protected]~]# Yum Install tigervnc-server-y 2. Setting up VNC server boot up [[email protected]~]# chkconfig Vncserver on 3. Modify the Vncserver configuration file [[email protected]~]# Vi/etc/sysconfig/vncservers Add the following after the profile vncservers= "2:root" vncserverargs[2]= "-geometry 1366x768-nolisten TCP" Set the password for Vncserver [[email protected]~]# vncpasswd
Password:
Verify:4. Starting the Sncserver service [[email protected]~]#/etc/init.d/vncserver start 5. Using the VNC Viewer remote connection
CentOS7 Configuring VNCOne. Install Vncserver by running the following command with root user;
Yum Install Tigervnc-serverAlso run the following command to install the vncviewer;
Yum Install VNCStop and disable the firewall;
systemctl Stop Firewalld.service
systemctl Disable Firewalld.serviceTwo. Configuration Vncviewer basically do not configure, vncserver configuration, create a new configuration file to open the 1th window as an example (you can also open multiple windows, modify the number can be), the method is as follows:
Cp/lib/systemd/system/[email protected]/lib/systemd/system/[email protected]:1.serviceOr add one more window: Cp/lib/systemd/system/[email protected]/lib/systemd/system/[email Protected]:2.service
Edit/lib/systemd/system/[email Protected]:1.service, set user root related parameters [service]type=forking# clean any existing files in/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-geometry 800x600" pidfile=
/root/. vnc/%h%i.pidexecstop=/bin/sh-c '/usr/bin/vncserver-kill%i >/dev/null 2>&1 | | : ' Three. Apply the update systemctl for it to take effect;
Systemctl daemon-reloadSet the vncserver password;
vncpasswd RootFollow the prompts to enter the password and confirm the password to start the 1th window that the service uses to enable VNC; systemctl start [Email protected]:1.service or
vncserver:1Close Window # 1th: systemctl stop [email protected]:1.service or
vncserver-kill:1set to boot automatically;
systemctl Enable [email Protected]:1.serviceEnd.
Linux VNC Server Installation configuration