Configure vnc and install visual desktop under Linux system (centos7)

Configure vnc

One, centos7 configuration vnc connection
1. Server install vnc server: yum install tigervnc-server -y
2. Start the server: vncserver. You need to enter the password twice for the first startup, select n.
3. Open remote port: vncserver :1
4. Open port 5901 (vnc starts from 5900 by default): firewall-cmd --zone=public --add-port=5901/tcp --permanent.
Note: When opening the port, make sure that your firewall is turned on, otherwise the opening will fail.
Turn on the firewall: systemctl stop firewalld.service.

Install visual desktop

二,centos7安装Xwidows
1.yum groupinstall “X Window System”
2.yum grouplist
3.yum groupinstall “GNOME Desktop”

Install vnc viewer locally

Download and install it to https://www.realvnc.com/en/connect/download/vnc/
to choose the system corresponding to you.
Insert picture description here

Insert picture description here
Enter your own server IP: 1 login and enter the password. The
first login may appear. Insert picture description here
Solution
#sudo /sbin/iptables -I INPUT 1 -p TCP
restart iptables service: service iptables restart
If there is no iptables.service file, use yum to install it: yum install iptables-services
and then log in again.
If you restart the server, there will still be such an error, you need to restart vnc.
#vncserver
may appear
Insert picture description here
, delete all
warnings #rm -rf /tmp/.X11-unix/X1
#rm -rf /tmp/.X11-unix/X2
#rm -rf /tmp/.X11-unix/ X3
can be run one by one.
Then run vnc
#vncserver again and
Insert picture description here
this interface appears, which means it is back to normal.
Log in to vnc again. Insert picture description here
The original intention of the blogger was actually to use the server to give me 24 hours of continuous online lessons. After the completion, it was found that Firefox cannot play html5 without flash. After these two problems are resolved, the server configuration is found to be too low, and it crashes after a while. If anyone has a higher server configuration, you can look forward to my next blog.
Use the server to refresh online classes 24 hours a day.

Guess you like

Origin blog.csdn.net/weixin_50835854/article/details/111722195
Recommended