In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to build VNC remote desktop service in CentOS 7.2. the editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1. Graphical interface installation (MATE DESKTOP)
Under CentOS 7 system, this article uses the installation of MATE desktop environment for installation and configuration instructions:
Log in to the server and execute the following instructions to install the desktop environment:
# install MATE Desktopyum groups install "MATE Desktop" first
After the command is entered, a lot of text will be listed, then the y/d/n will be displayed, enter y, and press enter to download and install.
When the installation is complete, the following picture complete is displayed
# install MATE Desktop before installing X Window System. Yum groups install "X Window System"
After the command is entered, a lot of text will be listed, then the y/d/n will be displayed, enter y, and press enter to download and install.
Installation completed
Set to start the server through the desktop environment by default:
Systemctl set-default graphical.target
After the installation is completed, restart the server through reboot or other instructions, or restart the server in the ECS server console. After restart, the system will automatically enter the graphical interface.
Second, install vncserver
1. Assuming that your system does not have any software installed on vnc, install vnc first
Yum-y install tigervnc-server tigervnc
2. Centos7 needs to configure the file / lib/systemd/system/vncserver@.service, copy a file, and rename it to vncserver@:1.service
The copy code is as follows:
[root@localhost ~] # cp / lib/systemd/system/vncserver@.service/lib/systemd/system/vncserver@:1.service
3. Replace the contents in the file with your current user
[Unit] Description=Remote desktop service (VNC) After=syslog.target network.target [Service] Type=forkingUSER=root# Clean any existing files in/ tmp/.X11-unix environmentExecStartPre=/usr/bin/vncserver-kill% iExecStart=/usr/bin/vncserver% I-geometry 1280x720-depth 24PIDFile=/root/.vnc/%H%i.pidExecStop=/usr/bin/vncserver-kill% I [install] WantedBy=multi-user.target
4. Update systemctl
Systemctl daemon-reload
5. Set to start automatically
Systemctl enable vncserver@:1.service
6. Start the vnc service
Systemctl start vncserver@:1.service
7. Modify the configuration file (solve the problem of blue screen or gray screen when connecting to vncviewer)
Vim / .vnc/xstartup
#! / bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec / etc/X11/xinit/xinitrc [- x / etc/vnc/xstartup] & & exec / etc/vnc/xstartup [- r $HOME/.Xresources] & & xrdb $HOME/.Xresources xsetroot-solid grey vncconfig-iconic & x-terminal-emulator-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" & mate-session &
8. Restart the vnc service and enter the following two commands:
Vncserver-kill: 1 vncserver
After all configuration is completed (the settings for firewall release port 590X are not listed here), clients can use IP:5901 for remote desktop connection
This is the end of the article on "how to build VNC remote Desktop Service with CentOS 7.2". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.