Friday, February 29, 2008

A Cool Fedora Story

You have to read this, It's a story about how to contribute software packages in to Fedora project. Fedora is the community OS release of RHEL.

http://www.redhatmagazine.com/2008/02/28/when-sally-met-eddie-the-fedora-package-story

Saturday, February 23, 2008

Accessing Windows partitions from Linux

By default any Linux system will fully support FAT partitions, But when it comes to NTFS some are still NOT supporting by default.

Desktop Editions such as Ubuntu 7.10 and Fedora 8 now fully supporting NTFS (with write support), and the partitions are automatically mounted.

Server Editions such as CentOS 5 and RHEL 5 you have to do the following to access NTFS partitions.

1. Configure RPMFroge 3rd party repository, Please read my tutorial about CentOS Repositories.

2. Install the following packages

# yum install dkms-fuse fuse-ntfs-3g

Accessing the Windows partitions.

1. See what are the current partitions in your system, and figure out what partitions belongs to windows.

# fdisk -l

Usually NTFS partitions will be displayed with a HPFS/NTFS label, Where as FAT partitions will be labeled as W95 FAT32 or W95 FAT16

In the example I'm assuming,

/dev/hda1 = NTFS
/dev/hda2 = FAT32

2. Create mount points for each windows partition that you have in the system.

# mkdir /media/ntfs
# mkdir /media/fat32

check

# ls -l /media

Note - The mount piont name can be any name that you like.

3. Manually mounting the partitions.

FAT


# mount /dev/hda2 /media/fat32
# cd /media/fat32
# ls -l

Note - You'll be having Read/Write access to FAT partitions.

NTFS


# mount -t ntfs-3g /dev/hda1 /media/ntfs
# cd /media/ntfs
# ls -l

Note - You'll be having Read/Write access to NTFS partitions.

Once you manually mount the partitions, when you shutdown your PC the partitions will be automatically unmounted.

4. Automatically mounting the partition on boot.

# nano /etc/fstab

at the end of file, enter the following lines.

/dev/hda1 /media/ntfs ntfs-3g defaults 0 0
/dev/hda2 /media/fat vfat defaults 0 0

What we have done is, first we give the partition number then the mount point then the file system then the permissions then whether to check the partition in case of a power failure, 0 (zero) means don't check since we don't have necessary tools to check NTFS or FAT partitions and finally the checking priority.

4. So now every time you boot your PC the partitions will be automatically mounted to the mount points.

Installing Adobe Flash Plugin for Firefox in Redhat / CentOS / Fedora

For 32 bit users

1. Go to Adobe Flash Plugin web site, Follow the instructions under option 3 " YUM REPOSITORY INSTALLATION"

Web site - http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash

For 64 bit users


1. Install the nspluginwrapper.i386 package to enable the 32-bit Adobe Flash plugin in x86_64 Firefox and the pulseaudio-libs.i386 package to enable sound from the plugin.

2. Create the 32bit mozilla plugin directory using this command.

# mkdir -p /usr/lib/mozilla/plugins

3. Install the nspluginwrapper.i386, nspluginwrapper.x86_64, and pulseaudio-libs.i386 packages.

# yum -y install nspluginwrapper.{i386,x86_64} pulseaudio-libs.i386

4. Install flash-plugin as shown in 32 bit section above.

5. Run mozilla-plugin-config to register the flash plugin.

# mozilla-plugin-config -i -g -v

6. Close all Firefox windows, and then relaunch Firefox.

7. Type about:plugins in the URL bar to ensure the plugin is loaded.

NOTE - The following was adapted from the Fedora 8 Release Notes. The 64 bit instructions may NOT work for RHEL 5 and CentOS 5.

Special Thanks to Fedora Documentation Team and
Mauriat Miranda

Tuesday, February 19, 2008

Using CentOS 5 Repos in RHEL 5 Server

1. Remove "yum-rhn-plugin" package from RHEL, this is used to check the activation in RHEL.

# rpm -e yum-rhn-plugin

2. Remove the "redhat-release" related packages, this is used to check the repositories compatibility. usually we can't remove these packages because they are used by other packages of the system for proper fuctioning. so we'll use the "--nodeps" parameter to forcely remove them from the system.

# rpm -e redhat-release-notes-5Server redhat-release-5Server --nodeps

3. Download & install the "centos-release" relates packages, to fill in the gap that we made by removing the "redhat-release" related packages.

i386 (32 bit)
http://mirrors.nl.kernel.org/centos/5/os/i386/CentOS/centos-release-5-2.el5.centos.i386.rpm
http://mirrors.nl.kernel.org/centos/5/os/i386/CentOS/centos-release-notes-5.2-2.i386.rpm

x86_64 (64 bit)
http://mirrors.nl.kernel.org/centos/5/os/x86_64/CentOS/centos-release-5-2.el5.centos.x86_64.rpm
http://mirrors.nl.kernel.org/centos/5/os/x86_64/CentOS/centos-release-notes-5.2-2.x86_64.rpm

4. To automatically inform about the updates in GUI, Do the following.

# nano /etc/yum/yum-updatesd.conf

In the file, type as follows under the section "# how to send notifications"

dbus_listener = yes

5. To change the OS name in the CLI login, Do the following.

# nano /etc/issue

Since we have installed the "centos-release" relates packages, the OS name will come as "CentOS release 5 (Final)", so delete it and type

Red Hat Enterprise Linux Server release 5 (Tikanga)

Or any name you like.

6. Now your system is ready.

7. Read my guide on "CentOS Repositories"

Monday, February 18, 2008

CentOS Repositories


What is a Repository?


A software repository (sometimes abbreviated as a repo) is a storage location from which software packages may be retrieved and installed on a computer. Many software publishers and other organizations maintain servers on the Internet for this purpose, either free of charge or for a subscription fee.

CentOS Software Repositories ( Official )

Base repo - The packages that comes with the release media. ( CDs or the DVD )

Addons repo - The packages used/produced in the build but not released with the release media

Extras repo - The additional packages that may be useful

Updates repo - The updated packages of the above repos

Centosplus repo - This repository is for items that actually upgrade certain base CentOS components. This repo will change CentOS to not be exactly like the upstream providers content

Website - http://mirror.centos.org/centos-5/5

The above Base repo, Addons repo, Extras repo, Updates repo are 100% compatible with RHEL, where as Centosplus repo is NOT 100% compatible with RHEL, so by default it's disabled.

CentOS Software Repositories ( 3rd Party )

**NOT maintained by official OS developers, but contains lots of helpful packages, 100% compatible with RHEL and CentOS.

RPMForge repo - This repository is a collaboration of Dag, Dries, and other packagers. They provide over 2600 packages for CentOS

Website - http://dag.wieers.com/rpm/packages.php

Fedora Extra Packages for Enterprise Linux (EPEL) repo - This repository provides rebuilds of Fedora packages for RHEL4 and RHEL5

Website for i386 packages - http://download.fedora.redhat.com/pub/epel/5/i386/repoview
Website for x64 packages - http://download.fedora.redhat.com/pub/epel/5/x86_64/repoview

How to use the CentOS Repositories?

In CentOS and RHEL to use the repositories we have to use a software management tool call "YUM" ( Yellow dog Updater, Modified ), the tool needs the repository information to manage software within your system. The information about the official repositories comes by default with YUM, but information about 3rd party repositories we have to manually configure.

The location of the repository information

# cd /etc/yum.repos.d
# ls -l

-rw-r--r-- 1 root root 2049 Nov 23 07:02 CentOS-Base.repo
-rw-r--r-- 1 root root 622 Nov 23 07:02 CentOS-Media.repo

CentOS-Base.repo file contains the information about the official CentOS repositories. To use the repos you have to have a live Internet connection.

CentOS-Media.repo file contaions the information about the packages included in the official CDs or the DVD, This you can use if you don't have internet.

How to use 3rd party Repositories?

You have to be careful, because in the 3rd party repos we might find packages that are already present in the official repos, we have to make sure we are NOT overlapping the packages, so this is how to do it.

1. Install "yum-priorities" plugin for YUM, this plugin will help you to prioritize the each repository that you use in the system, so we can give a high priority to official repositories and low priority to 3rd party repositories, so the packages in the 3rd party repos won't overlap the packages in the official repos.

# yum install yum-priorities

2. Then open the official yum repo information file

# nano /etc/yum.repos.d/CentOS-Base.repo

3. At the end of each heading, put like this

[base]
.
.
.
priority=1

[updates]
.
.
.
priority=1

[addons]

.
.
.
priority=1

[extras]

.
.
.
priority=1

[centosplus]

.
.
.
priority=2

What we have done above is, we have given priority=1 to [base], [updates], [addons] and [extras] repositories and priority=2 to [centosplus] repository, so [centosplus] repository packages won't overlap with [base], [updates], [addons] and [extras] repository packages.

4. Then we can install 3rd party repositories, first we'll configure RPMForge repo. All 3rd party repos can be configured by installing their release RPM. So to configure RPMForge, download and install the following packages.

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

for x64 - http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

5. Then check the location of the repository information and edit the rpmforge.repo file as follows.

# cd /etc/yum.repos.d
# ls -l

-rw-r--r-- 1 root root 2049 Nov 23 07:02 CentOS-Base.repo
-rw-r--r-- 1 root root 622 Nov 23 07:02 CentOS-Media.repo
-rw-r--r-- 1 root root 684 Mar 8 2007 mirrors-rpmforge
-rw-r--r-- 1 root root 428 Mar 8 2007 rpmforge.repo

# nano rpmforge.repo

[rpmforge]
.
.
.
priority=11

When we do this, the packages in RPMForge won't overwire packages in our official repos.

6. Then we'll install Fedora Extra Packages for Enterprise Linux (EPEL) repo, download and install the following package.

for i386 / x86_64 - http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm

7. Then check the location of the repository information and edit the epel.repo file as follows.

# cd /etc/yum.repos.d
# ls -l

-rw-r--r-- 1 root root 2049 Nov 23 07:02 CentOS-Base.repo
-rw-r--r-- 1 root root 622 Nov 23 07:02 CentOS-Media.repo
-rw-r--r-- 1 root root 954 Apr 3 2007 epel.repo
-rw-r--r-- 1 root root 771 Apr 3 2007 epel-testing.repo
-rw-r--r-- 1 root root 684 Mar 8 2007 mirrors-rpmforge
-rw-r--r-- 1 root root 428 Mar 8 2007 rpmforge.repo

# nano epel.repo

[epel]
.
.
.
priority=12

When we do this, the packages in Fedora Extra Packages for Enterprise Linux (EPEL) repo won't overwire packages in RPMForge repo or official repos.

8. Now your system ready to manage software packages.

Monday, February 11, 2008

How to enable default repositories in Ubuntu 7.10

Requirement - Live internet connection

Go to System -> Administration -> Software Sources

Do as follows




Then



Then



Now it'll reload the reopository information, thats it.

Thursday, February 7, 2008

Firestarter for CentOS5 / RHEL5

Firestarter is an open source visual firewall program. The software aims to combine ease of use with powerful features, therefore serving both Linux desktop users and system administrators.

More information - www.fs-security.com
Documentation - www.fs-security.com/docs.php

Download 1386 RPM for RHEL5 or CentOS5 (32 bit)

Download x86_64 RPM for RHEL5 or CentOS5(64 bit)

Saturday, February 2, 2008

Ubuntu Desktop Customization Guide

A nice customization guide about how to make your GNOME desktop beautiful, although written targeting Ubuntu most parts of the tutorial will be valid for any Linux distribution using GNOME.

http://tuxenclave.wordpress.com/2007/11/23/ubuntu-customization-guide-v2

Friday, February 1, 2008

Enabling Compiz Fusion on Ubuntu

Go to System -> Administration -> Synaptic Package Manager

Use the Search function and search for compizconfig-settings-manager, click on it and select Mark for Installation

Again
Use the Search function and search for emerald and gnome-compiz-manager, click on them and select Mark for Installation

Finally click on Apply

To access Compiz Fusion, Right click on Desktop -> Change Desktop Background -> Visual Effects -> Custom -> Preferences

Keyboard Shortcuts
Here's a list of the most common Compiz Fusion keyboard shortcuts:

SUPER+SHIFT+DRAG LEFT MOUSE = draw fire
SUPER+SHIFT+C = clear fire
CTRL+ALT+DRAG LEFT MOUSE = rotate cube
CTRL+ALT+LEFT ARROW = rotate cube
CTRL+ALT+DOWN ARROW = flat desktop
SHIFT+ALT+UP = initiate window picker
CTRL+ALT+DOWN = unfold cube
ALT+TAB = window switch
SUPER+TAB = flip switcher or ring switcher, depending on which is enabled.
ALT+F7 = initiate 'move windows'
SHIFT+F9 = water effect
SHIFT+F10 = slow animations
CTRL+ALT+D = show desktop

For Grouping and Tabbing:
SUPER+S = select single window
SUPER+T = tab group
SUPER+Left = change left tab
SUPER+Right = change right tab
SUPER+G = group windows
SUPER+U = ungroup windows
SUPER+R = remove group window
SUPER+C = close group
SUPER+X = ignore group
Hold the SUPER button then select the windows you want to group and then hit SUPER+G.

The SUPER key is the Windows key on most keyboards.

Special thanks to FalkoTimme @ howtoforge.com