In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
RHEL Linux 6.3 under the vnc installation and multi-user how to configure, I believe that many inexperienced people are helpless, this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
VNC (Virtual Network Computer) is an acronym for Virtual Network Computer. VNC is an excellent remote control tool developed by AT&T's European Research Laboratory. VNC is free and open source software based on UNIX and Linux operating systems. It has powerful remote control capabilities and is efficient and practical. Its performance can be comparable to any remote control software in Windows and MAC. In Linux, VNC includes four commands: vncserver, vncviewer, vncpasswd, and vncconnect. In most cases, users only need two of these commands: vncserver and vncviewer. Let's talk about vnc installation and multi-user configuration under RHEL Linux 6.3.
1. Install VNC
The rpm package for VNC in RHEL 6.3 is:
Client: tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm
Server: tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm
1. YUM installation: (configure local YUM source)
[root@localhost]#mkdir /rhel6
[root@localhost]#mount -o loop -t iso9660 rhel-server-6.3-x86_64-dvd.iso /rhel6
[root@localhost yum.repos.d]# cat rhel6.repo
[rhel6]
name=Red Hat Enterprise Linux6.3
baseurl=file:///rhel6
enabled=1
gpgcheck=0
[root@localhost]#yum makecache
[root@rac1 oracle]# yum -y install tigervnc-server
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Installing : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64 1/1
Installed products updated.
Verifying : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64 1/1
Installed:
tigervnc-server.x86_64 0:1.0.90-0.17.20110314svn4359.el6
Complete!
2. Start vnc service
#service vncserver start
3. Add system startup
#chkconfig vncserver on
4. Start VNC Desktop
[root@rac1 oracle]# vncserver
You will require a password to access your desktops.
Password:
Verify:
xauth: creating new authority file /root/.Xauthority
New 'rac1.localdomain:1 (root)' desktop is rac1.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/rac1.localdomain:1.log
Note: The system will prompt you to set the login password when connecting to VNC for the first time, which can be different from the authentication password set by ROOT.
II. VNC Configuration
View vnc desktop profiles
[root@bogon ~]# vi /root/.vnc/xstartup
#######################################################################
1 #!/ bin/sh
2
3 [ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
4 export LANG
5 export SYSFONT
6 vncconfig -iconic &
7 unset SESSION_MANAGER
8 unset DBUS_SESSION_BUS_ADDRESS
9 OS=`uname -s`
10 if [ $OS = 'Linux' ]; then
11 case "$WINDOWMANAGER" in
12 *gnome*)
13 if [ -e /etc/SuSE-release ]; then
14 PATH=$PATH:/opt/gnome/bin
15 export PATH
16 fi
17 ;;
18 esac
19 fi
20 if [ -x /etc/X11/xinit/xinitrc ]; then
21 exec /etc/X11/xinit/xinitrc
22 fi
23 if [ -f /etc/X11/xinit/xinitrc ]; then
24 exec sh /etc/X11/xinit/xinitrc
25 fi
26 [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
27 xsetroot -solid grey
28 xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
29 twm &
######################################################################################
Note: 1-29 on the left are the VIM line numbers displayed for ease of editing.
Lines 7 and 21 or 24 are commented out by default in Red Hat 5 and enabled by default in RHEL 6.3.
Just change the last twm & to gnome-session &.
Then vncserver -kill :1
Once vncserver :1 is enabled, you can use the client to connect normally. (Note: The firewall needs to be closed or the corresponding port needs to be released)
III. Multi-user configuration
Modify vncserver configuration file
[root@bogon ~]# vi /etc/sysconfig/vncservers
#####################################################################################
1 # The VNCSERVERS variable is a list of display:user pairs.
2 #
3 # Uncomment the lines below to start a VNC server on display :2
4 # as my 'myusername' (adjust this to your own). You will also
5 # need to set a VNC password; run 'man vncpasswd' to see how
6 # to do that.
7 #
8 # DO NOT RUN THIS SERVICE if your local area network is
9 # untrusted! For a secure way of using VNC, see this URL:
10 # http://kbase.redhat.com/faq/docs/DOC-7028
11
12 # Use "-nolisten tcp" to prevent X connections to your VNC server via TC P.
13
14 # Use "-localhost" to prevent remote VNC clients connecting except when
15 # doing so through a secure tunnel. See the "-via" option in the
16 # `man vncviewer' manual page.
17
18 #VNCSERVERS="2:myusername"
19 #VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
##########################################################################################
Note: Copy lines 18 and 19 and make the following modifications
VNCSERVERS="1:root 2:test"
VNCSERVERARGS[3]="-geometry 800x600 -nolisten tcp -localhost"
If more users are enabled, you can continue to add users in the same format directly with spaces, for example, VNCSERVERS="1: root2: test3:user", but [3] in line 19 must be changed to the number of enabled users in line 18 plus 1. For example, the above two users should be written as 3, so 3 users should be written as 4. Otherwise, after vncserver restarts, the vnc desktop of the last user is unavailable, but if the above user enables other desktop numbers but does not write them into this file, it will not be affected. In addition, under TEST user, you need to enable VNCSERVER service and set password, and modify corresponding configuration file.
Restart VNC service
# service vncserver restart
# xhost +
turn off the firewall
#service iptables stop
#chkconfig iptables off
Multi-user testing:
When using vnc client connection under WINDOWS system environment, you must keep up with desktop number when entering IP address, for example: "192.168.199.109:1""192.168.199.109:2". This will allow you to log in to the ROOT desktop and TEST user desktop respectively.
Additional:
Remote access to UNIX, Linux graphical operation is also popular Xmanager software, VNC compared with it-two working principle is different, the former (VNC) is remote access to the operating system, all operations in UNIX, Linux host server, even if the operation process "local computer and operating host network disconnected," also does not affect the smooth operation; The latter (Xmanager) is to guide the UI interface of the host server to the local computer through the port for display. If the operation process appears "the local computer is disconnected from the operating host network," the operation will be interrupted and failed! If the work being done in an operation is too important to be interrupted, such as an ORACLE RAC implementation, the result is catastrophic! More importantly, VNC is free and open source, and Xmanager is probably the cracked registered version you're using.
After reading the above, do you know how to install vnc under RHEL Linux 6.3 and how to configure multiple users? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
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: 303
*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.