In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The Virtual Network console (VNC) is a graphical desktop sharing software that allows you to remotely control another computer using the keyboard and mouse. System environment server: Centos7.7 Minimal client: Windows10 client VNC-Viewer 6.20download address: https://www.realvnc.com/en/connect/download/viewer/ installation desktop environment
The system installed in this lab does not have a desktop environment installed, so we need to install it ourselves. Skip this step if you have already installed the desktop. Centos7 provides "Cinnamon Desktop", "MATE Desktop", "GNOME Desktop", "KDE Plasma Workspaces", "LXQt Desktop", "Xfce" for our installation.
The following command lists the available environment groups:
[root@localhost ~] # yum grouplistLoaded plugins: fastestmirrorThere is no installed groups file.Maybe run: yum groups mark convert (see man yum) Loading mirror speeds from cached hostfile * base: mirrors.tuna.tsinghua.edu.cn * epel: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comAvailable Environment Groups: Minimal Install Compute Node Infrastructure Server File and Print Server Cinnamon Desktop MATE Desktop Basic Web Server Virtualization Host Server with GUI GNOME Desktop KDE Plasma Workspaces Development and Creative WorkstationAvailable Groups: Cinnamon Compatibility Libraries Console Internet Tools Development Tools Educational Software Electronic Lab Fedora Packager General Purpose Desktop Graphical Administration Tools Haskell LXQt Desktop Legacy UNIX Compatibility MATE Milkymist Scientific Support Security Tools Smart Card Support System Administration Tools System Management TurboGears application framework XfceDone
We can choose the desktop environment we like, and choose to install the Xfce desktop here:
[root@localhost ~] # yum-y install epel-release & & yum groupinstall Xfce create a user [root@localhost ~] # useradd user1 [root@localhost ~] # echo '123456' | passwd-- stdin user1 [root@localhost ~] # usermod-a-G wheel user1 install VNC Server
The TigerVNC installation package is provided by default in the Centos repository, so let's install this:
[root@localhost ~] # yum-y install tigervnc-server tigervnc-server-module
Switch to the user1 user, run the vncserver command to create an initial configuration and set the password:
[root@localhost] # su-user1 [user1@localhost ~] $vncserver: 2You will require a password to access your desktops.Password:Verify:Would you like to enter a view-only password (yzone)? NA view-only password is not usedNew 'localhost.localdomain:2 (user1)' desktop is localhost.localdomain:2Starting applications specified in / home/user1/.vnc/xstartupLog file is / home/user1/.vnc/localhost.localdomain:2.log
Then stop the vncserver service with the aim of creating passwords and files under .vnc.
[user1@localhost ~] $vncserver-kill: 2 configure VNC Server
Edit the .vnc / xstartup file under the user's home directory
[user1@localhost ~] $vim ~ / .vnc / xstartup title title $HOME/.Xresources#xsetroot-solid grey#xterm-geometry 80x24+10+10-ls & # twm & startxfce4 &
If you need to change the screen resolution, you can modify the ~ / .vnc / config file to uncomment the previous gemoetry.
[user1@localhost] $vim .vnc / config## Supported server options to pass to vncserver upon invocation can be listed## in this file. See the following manpages for more: vncserver (1) Xvnc (1). # # Several common ones are shown below. Uncomment and modify to your liking.### securitytypes=vncauth,tlsvnc# desktop=sandboxgeometry=1920x1080# localhost# alwaysshared creates a Systemd Unit file
Unit files facilitate and quickly start, stop, and restart services
[user1@localhost ~] $sudo cp / usr/lib/systemd/system/vncserver@.service / etc/systemd/system/vncserver@:2.service
Edit vncserver@:2.service, replace the user1 user in the file, and change Type from default forking to simple.
[user1@localhost ~] $vim / etc/systemd/system/vncserver\ @\: 2.service[ unit] Description=Remote desktop service (VNC) After=syslog.target network.target [service] Type=simpleExecStartPre=/bin/sh-c'/ usr/bin/vncserver-kill% I > / dev/null 2 > & 1 | |: 'ExecStart=/usr/sbin/runuser-l user1-c "/ usr/bin/vncserver% I" PIDFile=/home/user1/.vnc/%H%i.pidExecStop=/bin/sh-c' / usr/bin/vncserver -kill% I > / dev/null 2 > & 1 | |:'[Install] WantedBy=multi-user.target
Start the vncserver service
# reload Manager configuration [user1@localhost ~] $sudo systemctl daemon-reload# to start vncserver [user1 @ localhost ~] $sudo systemctl start vncserver@:2 client remote connection test
Open VNC Viewer on the windows10 client and enter the address and session port number:
Summary
If you need to configure the VNC server to have multiple users launch the display, use the vncserver command to create the initial configuration and set the password, and then use a different port to create a new service file.
Original address: https://www.linuxprobe.com/centos7-virtual-network-console.html
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.