In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the nine installation steps of realvnc server. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.
My operating environment: controlled terminal RHEL AS 3 U4, main control terminal Windows 2003.
If you don't want to mess around on your own, here is a tool that can meet your needs-IIs7 server management tool. IIs7 server management tool can connect and manage VNC servers as server integration manager in batches. Its best function is to manage windows and linux system servers and vps in batches. It can greatly improve the work efficiency of webmaster and server operation and maintenance personnel. At the same time, the iis7 server management tool is still the vnc client, and the server really realizes one-stop management, which is very convenient.
The interface of IIS7 server management tools is as follows:
1. Download RealVNC Server and RealVNC viewer.
2. Installation.
Rpm-Uvh vnc-4_1_1-1.i386.rpm (see the instructions in the package for source code)
Install winvnc.exe
3. Start VNC Server on Linux
Execute the vncserver command:
[root @ linux root] # vncserver
You will require a password to access your desktops.
Password:-- in order not to want anyone to be able to remotely control this computer. So when the first
Verify:-when you start VNC server for one time, you will be asked to set the password for the network remote control.
New'X' desktop is linux:1-be sure to keep in mind that this line will be used later.
Creating default startup script / root/.vnc/xstartup
Starting applications specified in / root/.vnc/xstartup
Log file is / root/.vnc/linux:1.log
(after the above steps, VNC Server has been started. If you want to change the password of VNC Server, just execute the vncpasswd command. )
4. Run VNC Viewer on Microsoft Windows
Run "vncviewer.exe" directly, and the "Connection details" dialog box appears.
In the "Connection details" dialog box, enter the IP address (or hostname and display device number) of the VNC Server in the "VNC server" text box (see 3. Start VNC server on this line on Linux, and New'X' desktop is linux:1 gets this message), for example: 192.168.0.1 VNC Server 1 (the 1 after the colon is the display device number generated by VNC Server). After clicking the "OK" button, VNC Server will start to check the entered information. If the information is incorrect, the system will receive a "Failed to connect to server" error message: if the information is correct. The VNC Authentication dialog box appears.
If you enter the correct password in the VNC Authentication dialog box, you can successfully open the Linux desktop window.
Remote control from the browser.
After starting VNC Server, open the browser directly, enter the URL or IP address of the controlled terminal in the address bar, and add the port number of ": 5800 + display number" after the URL to operate the computer.
For example: http://192.168.01.:5801 (if the display number is 1, usually the display number set for the first time is 1, then use 5800 "1" 5801.)
6.FAQ
A. after connecting, why can't the desktop be displayed and there is only one Terminal window?
Try to modify / root/.vnc/xstartup to change the last line of twm& to gnome-session& or kde& (KDE is said to be unstable on the current VNC Viewer)
B. Why can't I connect after restarting VNC Server?
Because when you restart VNC Server, the system will specify a new display number, you need to use this new number, otherwise you will not be able to connect.
Installation of vnc remote Desktop for linux
VNC was originally developed by AT&T and its source code is open source.
Check that the vnc client and server are installed:
[root @ localhost ~] # rpm-Q vnc
Package vnc is not installed
[root @ localhost ~] # rpm-Q vnc-server
Package vnc-server is not installed
If it's not installed. Find the rpm package installation on the CD
[root @ localhost ~] # [root @ localhost ~] # mount / dev/cdrom / media/
Mount: block device / dev/cdrom is write-protected, mounting read-only
[root @ localhost ~] # cd / media/CentOS/
[root @ localhost CentOS] # rpm-ivh vnc-server-4.1.2-14.el5.i386.rpm
Warning: vnc-server-4.1.2-14.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... # [100%]
1:vnc-server # # [100%]
[root @ localhost ~] # rpm-ivh / mnt/cdrom/CentOS/vnc-4.1.2-9.el5.i386.rpm
Preparing... # [100%]
1:vnc # # [100%]
It has been successfully installed here.
Add the user name to the profile: (/ etc/sysconfig/vncservers)
(note: the "user name" here refers to the name of the linux system user.)
The VNCSERVERS variable is a list of display:user pairs.Uncomment the lines below to start a VNC server on display: 2as my 'myusername' (adjust this to your own). You will alsoneed to set a VNC password; run 'man vncpasswd' to see howto do that.DO NOT RUN THIS SERVICE if your local area network isuntrusted! For a secure way of using VNC, seeURL: http://www.uk.research.att.com/archive/vnc/sshvnc.html.Use "- nolisten tcp" to prevent X connections to your VNC server via TCP.Use "nohttpd" to prevent web-based VNC clients connecting.Use "- localhost" to prevent remote VNC clients connecting except whendoing so through a secure tunnel. See the "- via" option in the `man vncviewer' manual page.VNCSERVERS= "2:myusername" VNCSERVERARGS [2] = "- geometry 800x600-nolisten tcp-nohttpd-localhost"
VNCSERVERS= "1:root"
VNCSERVERARGS [1] = "- geometry 800x600"
Note here that there are-nolisten tcp and-nohttpd in the default system configuration, which prevent Xwindows login and HTTP VNC login. If you need a graphical interface, delete this section.
Set password
[root @ localhost ~] # vncpasswd
Password:
Verify:
[root @ localhost ~] #
Note that the password set here is not the password of the root user, and the password we logged in with the vncview client. That's the password of this vnc software.
Start the VNC service
[root @ localhost ~] # / sbin/service vncserver start
Starting VNC server: 1:root xauth: creating new authority file / root/.Xauthority
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Creating default startup script / root/.vnc/xstartup
Starting applications specified in / root/.vnc/xstartup
Log file is / root/.vnc/localhost.localdomain:1.log
[OK]
[root @ localhost ~] #
Note: the startup file xstartup and the log file localhost:1.log for VNC login are already available in / root/.vnc. This is an important step before we can modify the xstartup file.
5. Modify xstartup
[root @ localhost ~] # cd / root/.vnc/
[root @ localhost .vnc] # vi xstartup
! / bin/shUncomment the following two lines for normal desktop:unset SESSION_MANAGERexec / etc/X11/xinit/xinitrc
[- x / etc/vnc/xstartup] & & exec / etc/vnc/xstartup
[- r $HOME/.Xresources] & & xrdb $HOME/.Xresources
Xsetroot-solid grey
Vncconfig-iconic &
Xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &
Gnome-session
Startkde & # kde desktoptwm &
Note: this step is also very important, if you do not modify this file, you can not even reach the desktop, it is a blank, so add the corresponding desktop parameters.
Finally, you need to configure a firewall to allow VNC clients to connect to VNC server. The port for VNC server snooping starts at 5900, the display: 1 listener 5901 Magistral display: 2 listens for 5902, and so on. CentOs's firewall does not allow connections to these ports by default, so you need to use the following steps to turn on the firewall (root permission is required):
[root @ localhost ~] # vi / etc/sysconfig/iptables
Firewall configuration written by system-config-securitylevelManual customization of this file is not recommended.
* filter
: INPUT ACCEPT [0:0]
: FORWARD ACCEPT [0:0]
: OUTPUT ACCEPT [0:0]
: RH-Firewall-1-INPUT-[0:0]
-An INPUT-j RH-Firewall-1-INPUT
-A FORWARD-j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT-I lo-j ACCEPT
-A RH-Firewall-1-INPUT-p icmp- icmp-type any-j ACCEPT
-A RH-Firewall-1-INPUT-p 50-j ACCEPT
-A RH-Firewall-1-INPUT-p 51-j ACCEPT
-A RH-Firewall-1-INPUT-p udp-dport 5353-d 224.0.0.251-j ACCEPT
-A RH-Firewall-1-INPUT-p udp-m udp-dport 631-j ACCEPT
-A RH-Firewall-1-INPUT-p tcp-m tcp-dport 631-j ACCEPT
-A RH-Firewall-1-INPUT-m state-state ESTABLISHED,RELATED-j ACCEPT
-A RH-Firewall-1-INPUT-m state-state NEW-m tcp-p tcp-dport 22-j ACCEPT
-A RH-Firewall-1-INPUT-m state-state NEW-m tcp-p tcp-dport 5900 state NEW 5903-j ACCEPT
-A RH-Firewall-1-INPUT-j REJECT-reject-with icmp-host-prohibited
COMMIT
-A RH-Firewall-1-INPUT-j REJECT-reject-with icmp-host-prohibited
Before this trip, add the following:
-A RH-Firewall-1-INPUT-m state-state NEW-m tcp-p tcp-dport 5900 state NEW 5903-j ACCEPT
The meaning of this sentence is to allow other machines to access local ports 5900 to 5903, so that users of display:1, display:2, and display:3 can connect to the local machine.
Then restart the firewall and VNC using the root identity:
[root @ localhost ~] # / sbin/service iptables restart
Flushing firewall rules: [OK]
Setting chains to policy ACCEPT: filter [OK]
Unloading iptables modules: [OK]
Applying iptables firewall rules: [OK]
Loading additional iptables modules: ip_conntrack_netbios_n [OK]
[root @ localhost ~] # / sbin/service vncserver resatrt
Usage: / etc/init.d/vncserver {start | stop | restart | condrestart | status}
[root @ localhost ~] # / sbin/service vncserver restart
Shutting down VNC server: 1:root [OK]
Starting VNC server: 1:root
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Starting applications specified in / root/.vnc/xstartup
Log file is / root/.vnc/localhost.localdomain:1.log
[OK]
Windows logs in to VNC Server
The configuration of Windows client VNC Viewer: 1. Download VNC Free Edition for Windows Version 4.1.22 from http://www.realvnc.com/download.html. Open VNCViewer: fill in the IP of VNCServer: number (1 or 2 or …) 3. VNCViewer switches to full-screen mode: F8
Pay attention to my options
This password is the password of vncpasswd.
Ha ha. It has been successful.
8. Allow VNC server to be started during system startup. This can be configured from the "system Settings-> Server Settings-> Services" menu, and just select vncserver.
If you use the command line, run the following two commands as root:
Cd / etc/rc5.d
Mv K35vncserver S35vncserver
In addition, you can enter: ntsysv find vncserver in the terminal.
9. If you install it on VMware, you need to set it up one more step.
Virtual machine-Settings-options-remote display-enable
You can fill in the password or not.
Vnc source code installation
Anyway, download source code from
Http://www.realvnc.com/products/free/4.1/download.html
[root @ localhost Code] # tar zxvf vnc-4_1_3-x86_linux.tar.gz
[root @ localhost vnc-4_1_3-x86_linux] # cd vnc-4_1_3-x86_linux
Root @ vinco:/home/vinco/Downloads/vnc-4_1_3-x86_linux# ls
Java vncconfig vncpasswd vncserver.man vncviewer.man Xvnc
LICENCE.txt vncconfig.man vncpasswd.man vnc.so x0vncserver Xvnc.man
README vncinstall vncserver vncviewer x0vncserver.man
This action is important, believe it or not:
[root @ localhost vnc-4_1_3-x86_linux] # vim README
Vncviewer 4.1.2 is install by default:
[root @ localhost vnc-4_1_3-x86_linux] # which vncviewer
/ usr/bin/vncviewer
[root @ localhost vnc-4_1_3-x86_linux] #
[root @ localhost vnc-4_1_3-x86_linux] #. / vncinstall / usr/local/bin / usr/local/man
Can't install manual pages to / usr/local/man/man1
Copying Xvnc to / usr/local/bin
Copying vncviewer to / usr/local/bin
Copying vncpasswd to / usr/local/bin
Copying vncconfig to / usr/local/bin
Copying vncserver to / usr/local/bin
Copying x0vncserver to / usr/local/bin
[root @ localhost vnc-4_1_3-x86_linux] #
[root @ localhost vnc-4_1_3-x86_linux] # vncviewer
VNC Viewer Free Edition 4.1.2 for X-built Oct 6 2008 07:20:19
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
[root @ localhost vnc-4_1_3-x86_linux] #
[root @ localhost vnc-4_1_3-x86_linux] # which vncviewer
/ usr/local/bin/vncviewer
[root @ localhost vnc-4_1_3-x86_linux] #
Remove the old one:
[root @ localhost vnc-4_1_3-x86_linux] # rm / usr/bin/vncviewer
Things are not always the way its going:
[root @ localhost vnc-4_1_3-x86_linux] # vncserver
You will require a password to access your desktops.
Vncpasswd: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
[root @ localhost vnc-4_1_3-x86_linux] #
Somebody advised to create a soft link like this:
[root @ localhost lib] # pwd
/ usr/lib
[root @ localhost lib] # ln-s libstdc++.so.6.0.10 libstdc++-libc6.2-2.so.3
[root @ localhost lib] # ls-l libstdc*
Lrwxrwxrwx 1 root root 19 2012-05-31 20:40 libstdc++-libc6.2-2.so.3-> libstdc++.so.6.0.10
Lrwxrwxrwx 1 root root 19 2011-06-17 08:35 libstdc++.so.6-> libstdc++.so.6.0.10
-rwxr-xr-x 1 root root 966072 2008-11-05 20:14 libstdc++.so.6.0.10
[root @ localhost lib] #
The guy cheat me, it doesn't work at all:
[root @ localhost vnc-4_1_3-x86_linux] # vncserver
You will require a password to access your desktops.
Vncpasswd: symbol lookup error: vncpasswd: undefined symbol: _ _ builtin_vec_new
[root @ localhost vnc-4_1_3-x86_linux] #
These are the nine installation steps of realvnc server, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.