Install GNOME Desktop Environment & Xrdp Server on Centos 6

Desktop Environment is not neccessary for Server usage, though. But Sometimes installation or using an application requires Desktop Environment, then build Desktop Environment as follows.

Install GNOME Desktop Environment on here.

[root@pemulalinux ~]#  yum -y groupinstall “X Window System

[root@pemulalinux ~]# yum -y groupinstall “Desktop”

[root@pemulalinux ~]# yum -y groupinstall “General Purpose Desktop”

 Before we start to remote we need to install xrdp server to connect to CentOS from Windows clients with the Remote Desktop function.

# install from EPEL

[root@pemulalinux ~]# yum –enablerepo=epel -y install xrdp tigervnc-server

[root@pemulalinux ~]# /etc/rc.d/init.d/xrdp start
Starting xrdp: [ OK ]
Starting xrdp-sesman: [ OK ]

[root@pemulalinux ~]# chkconfig xrdp on

 If xrdp server and gnome already installed lets try command this.

[root@pemulalinux ~]# startx

 Connect from Windows clients. For example on Windows 7, input “Remote Desktop” to start the remote desktop function.

 Input the hostname or IP address you’d like to connect and push the “Connect” button.

Remote Desktop [pemulalinux.pic1]

 Input a user which is in CentOS to authenticate.

xrdp login [pemulalinux.pic2]

 Just connected. If failed to login at first time (sometimes happens at first login), retry to login again.

Desktop Centos [pemulalinux.pic3]

Change a server’s hostname in CentOS 6

  1. Using a text editor, open the server’s /etc/sysconfig/network file.
    # sudo nano /etc/sysconfig/network
  2. Modify the HOSTNAME= value to match your FQDN hostname.
    HOSTNAME=myserver.domain.com
  3. For internal networking, change the host that is associated with the main IP address for your server (found at /etc/hosts).
    127.0.0.1             localhost       localhost.localdomain 
    
    123.45.67.89      hostname.domain.com hostname 
    
    ~
    
     ~
    
     ~
    
     ~
    
     -- INSERT --                                                  2,43-57 ALL
  4. Run the hostname command. This command lets you change the hostname on the server that the command line remembers, but it does not actively update all programs that are running under the old hostname.
    [root@defiant ~]# hostname hostname.domain.com
    
    [root@defiant ~]# hostname
    
    hostname.domain.com
    
    [root@defiant ~]#
  5. Restart networking on your server to ensure that changes will persist on restart.
    # /etc/init.d/network restart