Install and configure vncserver on centos7
Configuring vncserver is actually very simple. However, it is easy to see a variety of black screens, and other wonderful errors. We recommend that you use vncvivwer to log on.
1,
Press esc to display the logon page.
2. Steps
[Step 1 check vnc] rpm-q tigervnc-server # check whether vnc has been installed # If vnc has not been installed, it is shown as follows: package tigervnc is not installedpackage tigervnc-server is not installed [step2 Install Xwindows] yum check-updateyum groupinstall "X Window System" yum install gnome-classic-session gnome-terminal nautilus-open- terminal control-center liberation-mono-fontsunlink/etc/systemd/system/default.tar getln-sf/lib/systemd/system/graphical.tar get/etc/systemd/system/default.tar get # settings by default, the boot level is the graphic boot reboot [Install vnc Packages] yum install tigervnc-server-ycp/lib/systemd/system/vncserver @. service/etc/systemd/system/vncserver @: 1. service # Replace the two lines in the file by replacing <user> with root # Note: Here I Configure the server. This write is root @ # if it is a pc, run ExecStart =/sbin/runuser-l root-c "/usr/bin/vncserver % I" PIDFile =/root /. vnc/% H % I. pid [reload systemd] systemctl daemon-reload [set firewils] vim/etc/sysconfig/iptables # Add the following statement to the open file (generally empty, of course, if you need more ports, you can add 5903,590 4... -A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 5901-j ACCEPT-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 5902-j ACCEPT [off firewils] firewall-cmd -- permanent -- add-service vnc-serversystemctl restart firewalld. service [defaut strat vnc] systemctl enable vncserver @: 1. servicesystemctl start vncserver @: 1. service
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 273 Login
Download vncvivewer from windows. Install. Open. Run vncserver on the Linux interface (under your own user) (enter vncserver in the cmd line to see how many numbers are jumped out, record this number, and use it as the port number ), the running result is as follows:
You will require a password to access your tops. # note that this Password is used when logging on to vnc: Verify: New 'localhost. localdomain: 1 (bin. wang) 'desktop is localhost. localdomain: 1 Creating default startup script/root /. vnc/xstartupStarting applications specified in/root /. vnc/xstartupLog file is/root /. vnc/localhost. localdomain: 1.log# this time the port number is 1, my Intranet URL: 172.18.32.20
Enter 172.18.32.20: 1 (ip + port number) in passwd and enter the vnc password you just set. You can log on.
4. tips
[1] When vncserver is installed, assume that I am a common user on the server and when I press vncserver on the command line, this command will automatically create one under my home directory. vnc folder. This includes the configuration information of my vnc. [2] In addition, a black screen may appear after installation. If you have tried many methods but none of them work, you can try to uninstall openGL. .