Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Installation Guide: CentOS 5.1 Desktop


This document describes how to set up a CentOS 5.1 desktop. The result is a fast, secure and extendable system that provides all you need for daily work and entertainment.

This howto is a practical guide without any warranty – it doesn’t cover the theoretical backgrounds. There are many ways to set up such a system – this is the way I chose.

 

1 Install Media

The install media(s) are available at http://isoredirect.centos.org/centos/5/isos/i386/. I used the DVD-image for this howto.

 

2 Installation

Hit “Enter” to start the installation.

inst1

Test your install media if you want.

inst2

The installation wizard is starting.

inst3

Select your language and proceed.

inst4

Choose your keyboard-layout and proceed.

inst5

Here you can select/edit the partitioning layout.

inst6

If you chose the manual setup, you’ll see the following two windows.

inst7

If you chose the manual setup, you’ll see the following two windows.

inst8

Here you can adjust the network settings.

inst9

inst10

inst11

Select the location nearest to yours and configure the clock. Unmark the checkbox if there are other operating systems installed, that expects the clock to be set to local time – e.g. Windows.

inst12

Choose a password for the root-account and confirm it.

inst13

Here you can select predefined collections of software. You can also make a custom selection if you mark the corresponding radio button.

inst14

Select “Packages from CentOS Extras” – a window will pop up, asking for your network configuration. If you have already configured your network settings simply commit it – otherwise configure the settings now.

inst15

If you chose the custom selection you’ll see this and a few following windows. Select a main group on the left and afterwards one of its subgroups on the right. Now click on “Optional Packages” – you’ll see…

inst16

…this window with a detailed package list. Select or deselect packages as you like.

inst17

Click “Next” if your selection is complete. Dependencies are being checked.

inst18

The system is ready to install – click on “Next”.

inst19

The partition(s)/disk(s) are being formatted etc.

inst20

inst22

inst23

The system is being installed.

inst24

The installation is complete. Remove the install media and reboot the system.

inst25

3 First Start

If there’s no reason to do something special wait a few seconds to start with the standard settings.

fs1

The system is starting up.

fs2

The system is starting up.

fs3

This is the first start – the firstboot-wizard appears.

fs4

Here you can edit the firewall settings if you want. If you’re not planning to connect to this computer via ssh/scp/sftp etc you can close the corresponding port.

fs5

I recommend to deactivate SELinux – it can cause many problems, especially if you’re using software from additional repositories.

fs6

A reboot is required to make the changes effective.

fs7

Set the actual time and date.

fs8

If you enable the network time protocol, the time will be synchronized with a remote time server.

fs9

Time to add the first user-account to the system.

fs10

The system will test your soundcard (there was no soundcard added to this vm).

fs11

Here you can add software from additional CDs. Afterwards click on “Finish”.

fs12

The system has to reboot now.

fs13

When the system is up again, you’ll see the login window. Log in to the system with the userdata you chose in the firstboot-wizard.

login

Welcome to your desktop.

welcome

4 Basic Configuration

In various parts of this howto you have to switch to the root-account (within a terminal). The terminal is available in the gnome applications menu.

terminal1

terminal2

Enter the following to switch to the root-account:

su –
%rootpassword%

You can switch back to your user-account with:

exit

 

4.1 Yum Plugins & Yumex

Install some recommended packages to prevent problems with packages (broken/3rd party) and kernel-modules (root privileges needed):

yum install yumex yum-fastestmirror yum-skip-broken yum-kmod yum-kernel-module yum-priorities

Note: How to manage packages with yumex is described later at step 5.

After that we add priorities to the default repositories.

vi /etc/yum.repos.d/CentOS-Base.repo

Add a priority to each repository-entry – the content should look like this:

# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=2

 

4.2 RPMforge

The RPMforge-repository provides many packages like multimedia applications and drivers.

 

4.2.1 Installation

Install the repository:

rpm -ivh http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

 

4.2.2 Priority

Now let’s set a low priority (high number > 10) for this repository.

vi /etc/yum.repos.d/rpmforge.repo

Change the content that it looks like this:

# Name: RPMforge RPM Repository for Red Hat Enterprise 5 - dag
# URL: http://rpmforge.net/
[rpmforge]
name = Red Hat Enterprise $releasever - RPMforge.net - dag
#baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
priority=11

 

4.3 Remove Software

Before you are going to update the system for the first time you should check if there is software installed that you don’t need, or rather that you want to replace with another software. The goal should be a clean system with only the programs installed that you really need.

Which programs you should deinstall or replace with others is up to you – you’ll find a summary of already installed software at step 6 and a little assortment of additional software (including possible replacements for already installed software) at step 7.

You can simply deinstall software with the Yum Extender (yumex) – have a look at step 5.

 

4.4 Services

Some services are enabled by default on your system – maybe some of them are needless (depending on your hardware and your needs). The deactivation of needless services will save system resources, so it’s worth to take a look on the service settings – they are available in the gnome system menu.

services1

Enter the root password.

services2

Select “Runlevel All”.

services3

services4

4.4.1 Enable Services

  • Network Manager
  • Network Manager Dispatcher

 

4.4.2 Disable Services

  • bluetooth (disable this service if there is no bluetooth device connected to your system)
  • firstboot (this service is not longer needed)
  • mdmonitor (disable this service if you haven’t set up a RAID-system)
  • pcscd (disbale this service if there is no smart-card device connected to your system)
  • restorecond (disable this service if you deactivated SELinux)
  • sshd (disable this service if you’re not planning to connect to this computer via ssh/scp/sftp etc)

If you have a computer with a wlan-card I recommend to disable “network” in all runlevels – otherwise you’ll have a long boot-time cause the system tries to allocate a dhcp-ip to this device (regardless of the configuration). The network manager will enable the network automatically after you’ve logged in.

4.5 Nautilus

Nautilus opens a window for every single folder by default – to change this open any folder and edit the settings. It’s also a good idea to enable the delete command that bypasses the trash – because if you delete something from external storages with the standard delete command, the things will not really be deleted but moved to a trash on the device (.trash). This trash will not be affected when you delete the trash on your desktop.

nautilus1

nautilus2

Now it’s user-friendly.

nautilus3

4.6 Fonts

In this step we’ll make the fonts eye-friendly and change the resolution to a value that is used by most operating systems. The font settings are available in the gnome system menu.

fonts1

Choose 9px as font-size for all fonts. Select “Subpixel smoothing” if you’re using a LCD-monitor. Afterwards click on “Details”.

fonts2

The resolution should be 96dpi.

fonts3

4.7 System Update

The system will check for updates automatically and notify you if updates are available. Click on “View Updates“.

update1

Enter the root-password.

update2

The update information are being retrieved.

update3

You’ll see a summary of available updates and their details. Click on “Apply updates” to install the updates.

update4

The dependencies are being resolved.

update5

The updates are being downloaded …

update6

… and installed.

update7

Sometimes, e.g. when a new kernel was installed, it’s recommended to reboot the system.

update8

5 Yum Extender

The yum extender (a.k.a. yumex) is an easy to use gui for the yum package manager. With yumex you can install, deinstall or update packages – it’s available in the gnome applications menu.

yumex1

Enter the root-password.

yumex2

Yumex appears – make yourself familiar with the gui.

yumex3

5.1 Deinstall Packages

Select the radio-button “Installed” – now you’ll see all installed packages. Browse the list or enter a search term in the corresponding field to find a package.

yumex_deinst1

If you find a package that you want to remove simply unmark its checkbox.

yumex_deinst2

Alternatively you can use the group view.

yumex_group

This is the package queue – here you can see all the packages that you selected for deinstallation. If you made a mistake you can remove one or more packages from this list. If you agree to your selection click on “Process Queue” in the bottom right corner.

yumex_deinst3

If the packages that you want to deinstall have dependencies, they’ll also be marked for deinstallation. Proceed if you agree.

yumex_deinst4

The packages are being deinstalled.

yumex_deinst5

Deinstallation finished. Quit yumex or proceed to reload yumex.

yumex_ok

5.2 Install Packages

Select the radio-button “Available” – now you’ll see all installed packages. Browse the list or enter a search term in the corresponding field to find a package. If you find a package that you want to install simply mark its checkbox.

yumex_inst1

Alternatively you can use the group view.

yumex_group

The package queue contains all packages that you selected for installation. If you made a mistake you can remove one or more packages from this list.

yumex_inst2

The dependencies are being resolved, they’ll also be marked for installation.

yumex_inst3

Proceed if you agree.

yumex_inst4

The packages are being downloaded…

yumex_inst5

…checked…

yumex_inst6

…and installed.

yumex_inst7

Installation finished. Quit yumex or proceed to reload yumex.

yumex_ok

6 By Default Installed Software

6.1 Multimedia

  • Rhythmbox (audio player)
  • Totem (video player)

 

6.2 Graphics

  • Gimp (edit images/photos)

 

6.3 Office

  • OpenOffice.org (office suite)

 

6.4 Internet

  • Firefox (web browser)
  • Evolution (email client)
  • Ekiga (internet telephony)

7 Additional Software

7.1.1 Adobe Acrobat Reader

Homepage: http://www.adobe.com/products/reader/

With the Adobe Reader you can open PDF-documents.

acrobat_main

If you want to use the acrobat reader, open http://www.adobe.com/products/acrobat/readstep2_allversions.htm within firefox and choose your language.

acrobat1

Click on “Download now” and install the package with the software installer.

acrobat2

The plugin for firefox will be installed automatically. If you want to check it, restart firefox and enter about:plugins into the url-field. Afterwards you should see this:

ff_acrobat

7.1.2 Adobe Flash Player

Homepage: http://www.adobe.com/products/flashplayer/

Adobe provides an own repository – install the repository-package (root privileges needed):

rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm

Afterwards install the following package:

  • flash-plugin

The plugin for firefox will be installed automatically. If you want to check it, open firefox and enter about:plugins into the url-field. Afterwards you should see this:

ff_flash

7.1.3 Sun Java JRE

Homepage: http://java.sun.com/

Sun’s JAVA JRE adds full Java support to your system.

If you want to use Sun’s JAVA, open http://java.sun.com/javase/downloads/index.jsp within firefox and download the Linux self-extracting file – NOT the Linux RPM in self-extracting file.

The following steps require root privileges. Please note that you have to edit the following commands if your Java version is newer than the one I downloaded.

mv /home/%your_username%/Desktop/jre-6u3-linux-i586.bin /opt/
cd /opt/
chmod +x jre-6u3-linux-i586.bin
./jre-6u3-linux-i586.bin

Accept the license agreement and proceed.

rm -f jre-6u3-linux-i586.bin
ln -s /opt/jre1.6.0_03/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/

gedit /etc/profile.d/java.sh

It should look like this:

export J2RE_HOME=/opt/jre1.6.0_03
export PATH=$J2RE_HOME/bin:$PATH

Note: You have to add an empty line at the end of the file!

source /etc/profile.d/java.sh
alternatives –install /usr/bin/java java /opt/jre1.6.0_03/bin/java 2
/usr/sbin/alternatives –config java

Select the new Java JRE

2

Now let’s check if all went ok.

/usr/sbin/alternatives –display java

The first two lines of the output should look like this:

java – status is manual.
link currently points to /opt/jre1.6.0_03/bin/java

Additionally you have to install the following package to ensure that the firefox-plugin will work proper.

  • compat-libstdc++-33

Open firefox and enter about:plugins into the url-field. Afterwards you should see this:

ff_java

7.1.4 NTFS-3G

Homepage: http://www.ntfs-3g.org/

The NTFS-3G driver provides ntfs read/write support.

If you want to use the ntfs-3g driver, install the following packages:

  • fuse
  • fuse-ntfs-3g
  • dkms
  • dkms-fuse

 

7.1.5 Microsoft’s True Type Core Fonts

Some fonts, including Arial, Times New Roman and Verdana for example.

If you want to use these fonts, open http://www.mjmwired.net/resources/mjm-fedora-fc6.html#ttf within your browser and install the package with the software installer (simply click on it).

 

7.1.6 W32codecs & Others

Codecs needed to play MS and some other video formats.

If you want to use these codecs open a terminal and enter (root privileges needed):

cd /tmp/
wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2
tar xfvj all-20071007.tar.bz2
mkdir /usr/lib/codecs/
cp all-20071007/* /usr/lib/codecs/
ln -s /usr/lib/codecs/ /usr/lib/win32

 

7.2 Replacements

7.2.1 MPlayer (possible replacement for totem)

Homepage: http://www.mplayerhq.hu

mplayer

MPlayer is a video player with many features – supporting nearly every known video format, e.g. MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ and PVA (the codecs from step 7.1.6 are needed to support some of the listed formats).

If you want to use the mplayer, deinstall the following package…

  • totem

…and install these packages:

  • mplayer
  • mplayer-fonts
  • mplayer-skins
  • mplayerplug-in

 

7.2.2 Xmms (possible replacement for rhythmbox)

Homepage: http://www.xmms.org/

xmms

Xmms is a lean audio-player.

If you want to use xmms, deinstall the following package…

  • rhythmbox

…and install these packages:

  • xmms
  • xmms-mp3
  • xmms-skins

 

7.3 Optional

7.3.1 Unrar

With this package you’ll be able to unpack rar-files. If you want to use unrar, install the following package:

  • unrar

 

7.3.2 Network Traffic Applet

With this applet you can monitor the speed of your network devices.

netspeed3

If you want to use the network traffic applet, install the following package:

  • gnome-applet-netspeed

Afterwards add the applet to the gnome-panel. Right click on the panel, choose “Add to panel” and select the applet.

netspeed1

netspeed2

7.3.3 Bittorrent (bittorrent client)

Bittorrent is an easy to use bittorrent client.

bt

If you want to use bittorrent, install the following package:

  • bittorrent
  • bittorrent-gui

 

7.3.4 K3B

Homepage: http://www.k3b.org/

K3B is a burning suite with a lot of features.

k3b

If you want to use K3B, install the following packages:

  • k3b
  • k3b-extras
  • transcode
  • vcdimager

7.3.5 Skype (only beta for CentOS 5.x at the moment)

Homepage: http://www.skype.com/

Skype is a software for internet telephony, instant messaging etc.

skype

If you want to use skype, open a terminal and enter (root privileges needed):

cd /tmp/
wget http://www.skype.com/go/getskype-linux-beta-centos
wget http://www.skype.com/products/skype/linux/rpm-public-key.asc
rpm –import rpm-public-key.asc
yum localinstall skype-<version>-centos.i586.rpm

Note: If the gpg-key is not available, you have to disable the gpg-check in the yum configuration (

vi /etc/yum.conf

) before you do the localinstall. Keep in mind that you turn it on again afterwards.

 

7.3.6 Audacity

Homepage: http://audacity.sourceforge.net/

Audacity is a software to edit audio files.

audacity

If you want to use Audacity, install the following package:

  • audacity

 

7.3.7 Streamtuner

Homepage: http://www.nongnu.org/streamtuner/

Streamtuner is a stream directory browser. With Streamtuner you can listen to SHOUTcast-streams etc.

streamtuner

If you want to use Streamtuner, install the following package:

  • streamtuner

 

7.3.8 FireFTP

Homepage: http://fireftp.mozdev.org/

FireFTP is an extension for Firefox. It provides an easy to use, full featured ftp client. It can be startet without firefox from the gnome applications menu.

fireftp_main

If you want to use FireFTP, open https://addons.mozilla.org/en-US/firefox/addon/684 within Firefox and click on “Install Now“.

fireftp1

Accept the installation:

fireftp2

After the installation is finished restart Firefox. FireFTP is available in the upper menu or when you right click on an ftp-link.

fireftp3

fireftp4

Create a new launcher in the gnome applications menu to start FireFTP without Firefox. Open the main menu editor.

fireftp5

Click on “Internet” on the left side and afterwards on “New item” on the right side.

Insert/select the following in the launcher-window:

Name: FireFTP
Command: firefox -chrome chrome://fireftp/content/
Comment: FTP Client
Optional choose an icon for the new launcher.

fireftp6

7.3.9 Gparted

Homepage: http://gparted.sourceforge.net/

With gparted you are able to resize, move and format partitions – many file systems are supported.

gparted

If you want to use gparted, install the following packages:

  • gparted
  • xfsprogs
  • hfsutils

 

7.3.10 XChat

Homepage: http://www.xchat.org/

With XChat you can join multiple IRC channels (Internet Relay Chat). File transfer is supported. You can customize XChat with various scripts and plugins.

xchat

If you want to use xchat, install the following package:

  • xchat

 

7.3.11 Wine

Homepage: http://www.winehq.org/

Taken from the Wine Homepage: “Wine is an Open Source implementation of the Windows API on top of X, OpenGL, and Unix”.

With wine you can run a lot of Windows software on Linux. A list of software that is known to work on wine can be found on http://appdb.winehq.org/.

wine

If you want to use wine, install the following package:

  • wine

 

7.3.12 VMware Server

Homepage: http://www.vmware.com/products/server/

With VMware Server you can install guest operating systems as Windows, Linux, NetWare or Solaris.

vmware1

vmware1

If you want to use the VMware-Server, install the following packages:

  • kernel-devel
  • xinetd
  • gcc
  • gcc-c++

Afterwards open http://www.vmware.com/download/server/ within your browser. Install the latest version with the software-installer and register to get a serial number.

vmware4

Install it with the software installer.

vmware_dl

Next configure the VMware Server (root privileges needed).

vmware-config.pl

Answer all the questions with “yes” and accept the license agreement (if you agree with it). After that you’ll be asked a few questions about install paths etc. – simply hit enter for every question. The VMware Server is now available in the gnome applications menu.

 

CentOS: http://www.centos.org/
CentOS Wiki: http://wiki.centos.org/

 

Comments

comments