CentOS7.6 server deployment VNC

CentOS7.6 server deployment VNC

2019 April 22nd, 2016 16:50:39 sukysun125 Reading number 268

CentOS7.6 server deployment VNC

Install vnc server#

[ root@localhost ~]# yum install tigervnc-server

Turn on vnc

[ root@localhost ~]# vncserver 

You will require a password to access your desktops.

Password://enter password
Verify://Repeat password
Would you like to enter a view-only password(y/n)? n		//Only see the password, generally choose n
A view-only password is not used
xauth:  file /root/.Xauthority does not exist

New 'localhost.VD:1 (root)' desktop is localhost.VD:1

Creating default startup script /root/.vnc/xstartup
Creating default config /root/.vnc/config
Starting applications specified in/root/.vnc/xstartup
Log file is /root/.vnc/localhost.VD:1.log

Open remote port#

[ root@localhost ~]# vncserver :1

New 'localhost.VD:1 (root)' desktop is localhost.VD:1

Starting applications specified in/root/.vnc/xstartup
Log file is /root/.vnc/localhost.VD:1.log

View server ip

[ root@localhost ~]# ifconfig | grep inet
  inet 10.10.41.43  netmask 255.255.252.0  broadcast 10.10.43.255
  inet6 2400:dd01:1001:1040:3b37:b445:ad5b:ad2f  prefixlen 64  scopeid 0x0<global>
  inet6 fe80::bdd8:8bd:8871:f736  prefixlen 64  scopeid 0x20<link>
  inet 127.0.0.1  netmask 255.0.0.0
  inet6 ::1  prefixlen 128  scopeid 0x10<host>

Turn off the firewall and selinux

1. Turn off the firewall

Set firewalld service to disable

[ root@localhost ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

Check status and close successfully

[ root@localhost ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
 Loaded:loaded(/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
 Active:inactive(dead)
  Docs: man:firewalld(1)

Apr 2210:06:35 localhost.VD systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 2210:06:37 localhost.VD systemd[1]: Started firewalld - dynamic firewall daemon.
Apr 2215:31:38 localhost.VD systemd[1]: Stopping firewalld - dynamic firewall daemon...
Apr 2215:31:39 localhost.VD systemd[1]: Stopped firewalld - dynamic firewall daemon.

2. Close selinux

[ root@localhost ~]# setenforce 0
[ root@localhost ~]# vim /etc/selinux/config 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#  enforcing - SELinux security policy is enforced.
#  permissive - SELinux prints warnings instead of enforcing.
#  disabled - No SELinux policy is loaded.
SELINUX=disabled				//Displayed as enforcing when it is turned on, change it to disabled
[ root@localhost ~]# getenforce
Permissive

remote access#

Open vnc-viewer, enter the ip and port number to be accessed, the ip used in this article is: 10.10.41.43::5901

Recommended Posts

CentOS7.6 server deployment VNC
CentOS server deployment (YUM)
Centos7.2 deployment vnc service record
CentOS deployment Harbor
CentOS 7.3 + Server JRE 1.8 + Hadoop-2.8.0
Centos6.8 deploy vnc service
Swift Perfect-Ubuntu server deployment
[CentOS environment deployment] Java7/Java8 deployment under CentOS
Build OpenV** Server under CentOS7
Centos7.4 deployment configuration Elasticsearch5.6 cluster
Build OpenLDAP server under CentOS7
Deployment of graphite on centos7
CentOS 7.2 deploy mail server (Postfix)
install virtualbox on centos server
Ceph rapid deployment (Centos7 + Jewel)
CentOS server initialization setting detailed instructions
CentOS 8 (2)
Centos6.5 installation and deployment of KVM
RabbitMQ cluster deployment record under Centos6.9
CentOS8.1 build Gitlab server detailed tutorial
Tencent Cloud Centos7 install java server
CentOS configuration git server in VirtualBox
Elasticsearch cluster deployment record under CentOS7
Tencent Cloud Centos7 install java server
Install Percona Server database (in CentOS 8)
Build an FTP server under centos7
CentOS 8 (1)
CentOS7 install and use SQL Server
Centos7 build java web server tomcat
CentOS 7 install gogs git code server
CentOS deployment method of flask project
CentOs7 installation and deployment Zabbix3.4 original
FFmpeg environment deployment record under centos7
Modify CentOS server time to Beijing time
Erlang 20.2 installation and deployment under CentOS 7
k8s practice (1): Centos 7.6 deployment k8s (v1.14.2) cluster
PPTP environment deployment record under Centos
Install Gnome and VNC on Ubuntu Server
Centos-6.5 installation and deployment of LNMP environment
Zabbix installation and deployment and localization under CentOS
Connect Centos7 remotely via SSH and VNC
CentOS 7 Apache Multi-port Deployment Web Apps Guide
Jenkins installation and deployment tutorial under CentOS 7
Python and scrapy deployment in centos environment
Complete deployment record for LDAP under Centos7.2
Centos7 installation and deployment of Airflow detailed
How to monitor CentOS 7 server with Prometheus
Some Centos Python production environment deployment commands