VNC service configuration in Linux

Prerequisites: Graphical

# yum groupinstall "GNOME Desktop Environment" (CentOS 5.x installs the GNOME desktop environment)
# yum groupinstall "X Window System" "Desktop" (CentOS 6.x installs the GNOME desktop environment)
# yum groupinstall Xfce (CentOS installs the Xfce desktop environment, optional)

 

VNC service configuration in Linux
1. Confirm whether VNC is installed in your linux system.
Red Hat Enterprise Linux uses: vnc-server
Fedora uses: tigervnc-server
rpm -q tigervnc-server
2. Install VNC (when it is not installed)
rpmhttp ://rpmfind.net/linux/rpm2html/search.php?query=tigervnc-server
Download address: http://tigervnc.org/
2.1. Install rpm package:
vnc-server-4.1.2-9.el5.x86_64 .rpm, the installation command is as follows:
rpm -ivh /mnt/Server/vnc-server-4.1.2-9.el5.x86_64.rpm
or
2.2, online download and installation (the system must be connected to the Internet) (this method is used by yourself)
command: yum install tigervnc-server

# yum install vnc-server vnc* (in CentOS 5.x)
# yum install tigervnc-server (in CentOS 6.x)
3. VNC configuration To configure
vnc as a system service, add your user name to the following In the configuration file:
[test@localhost ~]$ vi /etc/sysconfig/vncservers
At the end of the configuration file, add the following statement. My username is test, you can fill in yours.
VNCSERVERS="1:test"
4. VNC login password setting
Before starting the vnc service, use the vncpasswd command to create a test login password.
[test@localhost ~]$ vncpasswd
Note that in the home directory at this time, a hidden directory .vnc will be automatically created, and there is a file passwd that saves your test password.
5. Start the VNC service
Of course, if it is checked that you have VNC installed, it will tell him in linux that you want to start it. Take Red Hat Enterprise Linux as an example to demonstrate:
the command is as follows:
[root@testdb ~]# vncserver :1
or
[root@testdb ~]# vncserver
which includes 3 desktop numbers: such as vncserver:1, vncserver:2, vncserver:3
After entering the command, the interface will appear, asking you to enter the password, which is the password you will use to connect to the linux server. Note: To elaborate, during the execution of the above command, because it is the first execution, you need to enter a password, which is encrypted and stored in the .vnc subdirectory (/root/.vnc/passwd) under the user's home directory; At the same time, the xstartup configuration file (/root/.vnc/xstartup) is automatically created for the user in the .vnc subdirectory under the user's home directory. Each time the VND service is started, the configuration information in the file will be read.
In addition: There is also a "testdb:1.pid" file in the /root/.vnc/ directory. This file records the process number corresponding to the acquired operating system after starting VNC, and is used to accurately locate the process number when stopping the VNC service.
6: If you want to restart the vncserver service, the
method is as follows:
[root@testdb ~]# vncserver -kill :1
[root@testdb ~]# vncserver :1

Client test
client download address:
1. The first client test :http://www.realvnc.com/
Here I will briefly explain that the IP to be entered after the server is the IP of my linux server, and the colon and 1 indicate the same as the 1 in VNCSERVERS="1:test" correspond.

 

Other reference addresses:

http://www.ha97.com/4634.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327047043&siteId=291194637