Centos6.5 vncserver installation and configuration
I. First, the server needs a graphic interface with a running level of 5, and The GNOME desktop graphic interface has been installed.
The command can be used to query
Rpm-Qa gnome
Runlevel
Ii. Use Yum to install and configure vncserver
1. Use the vncserver command to configure the VNC Remote Password
2. Edit the VNC startup graphic interface file (or change it)
VI/root/. VNC/xstartup
Comment out the last line of TWM & and then add a line of content.
Gnome-session &
Save and exit
3. Edit another VNC configuration file.
VI/etc/sysconfig/vncservers
Modify the last two rows as follows:
Vncservers = "1: Root 2: Root"
Vncserverargs [2] = "-geometry 800x600-nolisten TCP-localhost" then save and exit
4. Start the vncserver and set it to boot. (If the system firewall is not used, disable it)
Service vncserver start
Chkconfig vncserver on
Service iptables stop
Chkconfig iptables on
3. Add multiple users
Useradd user1 // Add user1
Passwd user1 // set the user's Linux logon Password
Su user1 // switch to user user1
Vncpasswd // set the user's user1 logon Password
Exit
Useradd user2 // Add User user2
Passwd user2 // set the user's Linux logon Password
Su user2 // switch to user user2
Vncpasswd // set the user's user2 logon Password
Exit
Iv. Summary
For the configuration file/etc/sysconfig/vncservers
The correct syntax for multiple users is:
Vncservers = "1: Root 3: admin"
Vncserverargs [2] = "-geometry 800x600-nolisten TCP-localhost" (with "1: Root)
Vncserverargs [4] = "-geometry 800x600-nolisten TCP-localhost" (with "3: admin)
The root login port is 5901.
The logon port of admin is 5903.
Now the vncserver server has been configured. Use the client to remotely perform graphical interface. Note that when the VNC is remote, the first port is 5901 by default, and the second interface is 5902, and so on. Therefore, when using the VNC client remotely, pay attention to it. Otherwise, the connection fails.
Centos6.5 vncserver installation and configuration