Since only the graphical user interface is installed when RHEL5 is installed in VMWare, you want to install the graphical user interface. Software and software kits required in this article: [1] yum Software Installation Tool [2] XWindow kit [3] GNOME Desktop Environment [4] vnc server suite vnc-server package comes from locally mounted iso images, mount details refer to this article: http://www.linuxidc.com/L
Since only the graphical user interface is installed when RHEL5 is installed in VMWare, you want to install the graphical user interface.
Software and software kits required in this article:
[1] yum Software Installation Tool
[2] X Window suite
[3] GNOME Desktop Environment
[4] vnc server suite vnc-server
The software package comes from an iso image mounted locally. For mounting details, see this article: http://www.linuxidc.com/Linux/2011-09/41983.htm
Of course, you can also use software sources on the network, but the speed will be slow.
1. Install the X Window and GNOME desktop environments:
Yum groupinstall "X Window System"
Yum groupinstall "GNOME Desktop Environment"
After the installation is complete, run the startx command on the terminal to enter the graphic user interface.
Ps:In vmware, the shortcut keys for switching between the graphic user interface and character interface are as follows:
Figure: Ctrl + Alt + Space + F7 (or F8)
Character interface: Ctrl + Alt + Space + F3
2. Install vncserver:
After installing X Window, The vncserver has been installed by default. Check rpm-qa | grep vnc-server.
If not, yum install vnc-server
3. Configure vncserver:
After vnc-serve is installed, start service vncserver start. The following prompt appears:
[Root @ server01. vnc] # [root @ server01. vnc] # service vncserver restart
Shutting down VNC server: [OK]
Starting VNC server: no displays configured [OK]
This is because we have not configured/etc/sysconfig/vncservers. Edit/etc/sysconfig/vncservers and add the following two lines at the end of the file:
SERVERS = "1: root"
VNCSERVERARGS [2] = "-geometry 1280x800-nolisten tcp-nohttpd-localhost"
When you enter the vncserver for the first time, you are required to set a password:
After the password is set, the following prompt is displayed:
New 'server01: 1 (root) 'desktop is server01: 1
Starting applications specified in/root/. vnc/xstartup
Log file is/root/. vnc/server01: 1.log
Connect to vnc viewer 4 in windows (linux IP address in wmware: desktop number: 192.168.37.129: 1). The connection may fail. You can temporarily disable the firewall to stop the service iptables.
Now we should be able to connect smoothly. But we can log on to the X-Term interface, not the Gnome interface we want. What should we do? Or set!
The above xstartup script does not exist. Edit it:
Uncomment the following two lines:
Unset SESSION_MANAGER
Exec/etc/X11/xinit/xinitrc
Log on again, or the original interface. It doesn't matter. First, kill the related processes on the desktop:
[Root @ server01. vnc] # vncserver-kill: 1 <================Here: 1 is the desktop number
Run vncserver again to generate a new session, and still use desktop Number 1:
[Root @ server01. vnc] # vncserver: 1 <================= here
New 'server01: 5 (root) 'desktop is server01: 1
Starting applications specified in/root/. vnc/xstartup
Log file is/root/. vnc/server01: 1.log
In this case, the IP address (192.168.37.129: 1) entered in vnc viewer 4 in windows is successfully connected to the Gnome desktop environment.
This is a success.
Ps: because the above connections are all disabled by the firewall.