Prepare to build a VirtualBox virtual machine template, of course, CentOS. The latest version is 6.6x86 _ 64.
1. Install minimal version. If no other packages are installed, the new disk is dynamically divided into 50 GB. The logical volume created by LVM, Nic bridging, and static IP are selected.
2. After installation, go to the system and perform system updates.
Yum upgrade
3. Install the EPEL source
Yum install wget http://mirrors.hustunique.com/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm-ivh epel-release-6-8.noarch.rpm
4. Install the XFce desktop system
Yum grouplist | grep Xyum groupinstall "X Window System" yum groupinstall Xfce
Remember to check the folder permission and change the folder permission. Otherwise, the mouse cannot be used:
Chown-R haldaemon. haldaemon/var/cache/hald
After completing this step, you can start the desktop.
Startxfce4
At this time, the interface is in English, and the desktop is very ugly. After locale is modified, the XFce will automatically become Chinese.
Vi/etc/prpfileexport LANG = zh_CN.UTF-8
Then install the WenQuanYi font and change it to a desktop topic, which may look a lot better.
Yum search wqyyum install wqy *
5. Install VNC
Yum install tigervnc-server
Configure VNC
Vi/etc/sysconfig/vncserversVNCSERVERS = "1: root" VNCSERVERARGS [1] = "-geometry 800x600-nolisten tcp" # if multiple users are configured with VNCSERVERS = "1: root 2: linus "VNCSERVERARGS [1] ="-geometry 800x600-nolisten tcp "VNCSERVERARGS [2] ="-geometry 800x600-nolisten tcp"
Set vnc password
Vncpasswd
Start VNC
Service vncserver start
At this time, the connection ip Address: 1 or ip: 2 still has a problem, but it can be connected, but there is no picture, there is nothing, you need to modify the startup script:
Vi ~ /. Vnc/xstartup #! /Bin/sh [-r/etc/sysconfig/i18n] &. /etc/sysconfig/i18nexport LANGexport SYSFONTvncconfig-iconic & # unset SESSION_MANAGERunset DBUS_SESSION_BUS_ADDRESSOS = 'uname-s' if [$ OS = 'Linux ']; then case "$ WINDOWMANAGER" in * gnome *) if [-e/etc/SuSE-release]; then PATH = $ PATH:/opt/gnome/bin export PATH fi ;; esacfi # if [-x/etc/X11/xinit/xinitrc]; then # exec/etc/X11/xinit/xinitrc # fi # if [-f/etc/X11/xinit/xinitrc]; then # exec sh/etc/X11/xinit/xinitrc # fi [-r $ HOME /. xresources] & xrdb $ HOME /. xresourcesxsetroot-solid greyxterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop" & startxfce4 &
In this case, you can connect to Alibaba Cloud ~
References:
Http://my.oschina.net/std/blog/117407
Https://www.centos.org/forums/viewtopic.php? T = 6539
CentOS: Xfce + VNC installation