Fedora Notebook

Notes on Fedora 9

Change Your Grub Background

So, you want to change your Grub background or wallpaper?
First, find an image that is at least 640x480. Open the image in GIMP.

gimp grub_background.jpg

Now, resize the image to 640x480 if needed ( Image -> Scale Image... )

GIMP Scale

And then save the image as an XPM ( File -> Save As... ).

GIMP Save

Be sure to save the file as an X PixMap image (.xpm).

GIMP XPM

Compress the file and place it on your /boot partition, inside the grub folder.

gzip grub_background.xpm
sudo cp grub_background.xpm.gz /boot/grub/

Finally, edit your /boot/grub/grub.conf and add or replace the splashimage entry with your custom background.

splashimage=(hd0,0)/grub/grub_background.xpm.gz

Reboot to test your changes. If the Grub background appears like television snow, check that the image size is exactly 640x480.

Compile Apache on Fedora

Below is a walk-through for compiling Apache 2.2 on Fedora 9. First, download and unpack the source tarball from Apache.org. As of August 2008, the latest version of Apache is 2.2.9 (httpd-2.2.9.tar.gz)

tar -xzvf httpd-2.2.9.tar.gz
cd httpd-2.2.9

Next, configure the source for build. You can provide configure with --help to see the large list of options. The example below enables mod_rewrite, mod_cache, mod_mem_cache and mod_ssl as shared modules in /opt/apache2/modules. Change --prefix to adjust your install PREFIX and adjust the configure options to suit your needs.

./configure --prefix=/opt/apache2 --enable-rewrite=shared --enable-cache=shared --enable-mem-cache=shared --enable-module=so

Now, build and install Apache.

make
sudo make install

Your Apache configuration will be in /opt/apache2/conf and you can control Apache with /opt/apache2/bin/apachectl. Refer to the Apache documentation for more details.

Compile PHP on Fedora

Below is an outline on how to compile a feature rich, PHP Apache module on Fedora 9. First, compile Apache on the system using these instructions. This document assumes that Apache and the APache eXtenSion Tool are installed in the PREFIX: /opt/apache2.

Once you have Apache prepared, download the PHP source from php.net. As of August, 2008 the latest version is PHP 5.2.6. So, the following examples will use the php-5.2.6.tar.gz source tarball. Use your browser to download the latest and greatest. Then, untar the source.

tar -xzvf php-5.2.6.tar.gz
cd php-5.2.6

Next, configure the source for compile. Use the configure command. You can provide --help to see the large list of options.

./configure --help

For every option you enable, make sure you have the necessary RPMs installed to build PHP. For example, if you run configure with --with-snmp, you will need the net-snmp-devel RPM installed to complete the build. To ensure that you can build PHP with a full suite of options, install the following RPMs. Trim the list to suit your needs.

yum install aspell-devel curl-devel cyrus-sasl-devel e2fsprogs-devel freetype-devel glibc-devel keyutils-libs-devel krb5-devel libgcc libidn-devel libjpeg-devel libpng-devel libselinux-devel libsepol-devel libstdc++-devel libX11-devel libXau-devel libXdmcp-devel libxml2-devel libXpm-devel mysql-devel net-snmp-devel openldap-devel openssl-devel tcp_wrappers zlib-devel

Then, configure with the following settings. Change the configure --prefix to adjust your install PREFIX. Again, trim the list to suit your needs.

./configure --prefix=/opt/php5 --with-apxs2=/opt/apache2/apxs --with-mysql=/usr/bin/mysql_config --with-mysqli=/usr/bin/mysql_config --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --enable-safe-mode --enable-magic-quotes --with-pspell --with-gettext --with-jpeg-dir=/usr --with-zlib --with-curl --enable-soap --with-ldap=/usr --enable-sockets --with-openssl --with-snmp --enable-mbstring --with-freetype-dir=/usr --with-xpm-dir=/usr --with-libdir=lib64

Please note that if you are on a 32bit system, remove:

--with-libdir=lib64

Finally, build PHP and test it.

make
make test

If you are comfortable with the results (a few errors are OK in make test), then install PHP.

sudo make install

The install will place the PHP module in /opt/apache2/modules and prepare /opt/apache2/conf/httpd.conf with these settings:

LoadModule php5_module modules/libphp5.so

Then, place a php.ini in /opt/php5/lib (or your PREFIX/lib).

cp -a php.init-recommended /opt/php5/lib/php.ini

Finally, prepare your Apache Virtual Host to support index.php with the following code:

AddType application/x-httpd-php .php .inc .class
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php

Refer to PHP.net and Apache.org for reference.

Convert YouTube Videos

So, you need to extract an audio WAV or MP3 file from a YouTube video? Or maybe create a portable AVI or MPEG video from a YouTube posting? This article will show you how.

Download the Original Flash Video File

First, you will need a file to convert. Use one of the many online video downloaders to extract an FLV from a YouTube (or MetaCafe, iFilm, etc) URL. Here are a few:

http://www.youtubex.com/
http://keepvid.com/
http://www.techcrunch.com/get-youtube-movie/

When you download the file from the specific URL, rename the file to include a .flv extention. Most of the web based download tools give you a file named something like "get_video".

bash$ mv get_video myvideo.flv

FYI: you can play flv files with the VideoLAN media player (VLC).

Install FFmpeg and Media Codecs

FFmpeg is a collection of libraries and tools that allow you to convert media files. Make sure you have ffmpeg installed with access to the proper codecs. Fedora and RedHat users can use Livna.org for src and binary RPMs. Ubuntu and Debian users can install ffmpeg with apt-get. Or, if you download the source code for ffmpeg, here are the options the Livna RPM for Fedora Code 6 are compiled with:

bash$ ffmpeg -version
FFmpeg version SVN-r8876, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --arch=x86_32 --extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables --enable-libmp3lame --enable-libogg --enable-libtheora --enable-libvorbis --enable-libfaad --enable-libfaac --enable-libgsm --enable-xvid --enable-x264 --enable-liba52 --enable-liba52bin --enable-libdts --enable-pp --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-opts --disable-strip
libavutil version: 49.4.0
libavcodec version: 51.40.4
libavformat version: 51.12.1
built on May 3 2007 11:15:43, gcc: 4.1.1 20070105 (Red Hat 4.1.1-51)
ffmpeg SVN-r8876
libavutil 3212288
libavcodec 3352580
libavformat 3345409

If you need codec libaries, download them from MPlayer's Codec Releases.

bash$ wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20061022.tar.bz2
bash$ tar -xjvf all-20061022.tar.bz2
bash$ sudo mkdir -p /usr/lib/codecs
bash$ sudo cp all-20061022/* /usr/lib/codecs/

Use FFmpeg to Convert Files

This is how you convert the flv to various audio and video formats:

# FLV to WAV -ac 2 is stereo, change to 1 for mono audio
ffmpeg -title "Custom Title" -i myvideo.flv -ac 2 -y myvideo.wav
# FLV to MP3 -ab 128 is the mp3 bit rate
ffmpeg -title "Custom Title" -i myvideo.flv -acodec mp3 -ac 2 -ab 128 -vn -y myvideo.mp3
# FLV to MPEG -s is geometry of video
ffmpeg -title "Custom Title" -i myvideo.flv -s 320x240 -y myvideo.mpeg
# FLV to AVI -ac 2 is stereo, change to 1 for mono audio
ffmpeg -title "Custom Title" -i myvideo.flv -ac 2 -y myvideo.avi

Fedora 9 GDM Theme

So, you want to change the theme or background for GDM in Fedora 9 and can't find gdmsetup? Since GDM is currently being undergoing a rewrite, some functionality from the old version is temporarily missing. You might also find some changes. For instance, gdmsetup no longer exists.

bash$ gdmsetup
-bash: gdmsetup: command not found

The New Way

You can change various GDM parameters as described in the GDM Configuration page. In short, the GDM backend is configured using files in /etc/gdm and the front end uses GConf for most settings. Unfortunately, there is no option (yet!) to change the GDM theme or background.

bash$ ls /etc/gdm/
custom.conf gdm.schemas Init PostLogin PostSession PreSession Xsession
bash$ gconf-editor

Change your GDM Background

Fedora 9 currently displays as a GDM menu with a background that changes depending on the time of day. The XML governing the GDM 2.22 backgrounds and their timing is /usr/share/backgrounds/waves/waves.xml. To change your GDM background, you will need to edit this XML file. I suggest you backup the entire 'waves' folder first.

bash# cd /usr/share/backgrounds
bash# cp -a waves waves.orig
bash# cd waves && vim waves.xml

With a custom background installed in /home/foo/background.jpg, the XML can be trimmed to just this:

<background>
<static>
<!-- 24 Hours -->
<duration>86400.00</duration>
<file>
    <size width="800" height="480">/home/foo/background.jpg</size>
    <size width="1280" height="1024">/home/foo/background.jpg</size>
    <size width="1600" height="1200">/home/foo/background.jpg</size>
    <size width="1920" height="1200">/home/foo/background.jpg</size>
</file>
</static>
</background>

Save the file, and restart GDM by logging out of Gnome.

Alternate One Liner

Alternately, Todd Zullinger showed me how to change the background using gconftool-2.
From: https://www.redhat.com/archives/fedora-list/2008-June/msg00248.html

su -c 'gconftool-2 --direct --config-source xml:readwrite:/var/lib/gdm/.gconf -s --type string /desktop/gnome/background/picture_filename /home/foo/background.jpg' gdm

Fedora 9 Java

Fedora 9 provides OpenJDK!
See the Fedora Java FAQ for details: http://fedoraproject.org/wiki/JavaFAQ

Fedora 9 Nvidia

Fedora 9 comes with two drivers that can be used in /etc/X11/xorg.conf to support your Nvidia card.

  1. NV: http://xorg.freedesktop.org/wiki/nv
  2. Nouveau: http://nouveau.freedesktop.org/wiki/

Although these two drivers work, they have their limitations. It is best to install the Nvidia driver from Nvidia.com. You can either build the source from Nvidia's Driver Website, or use Livna.org to install a binary kernel module.

Livna's Binary Nvidia Driver

To use Livna.org's binary driver, install Livna's release package for Fedora 9. This will provide you with access to Livna.org's Fedora 9 YUM repository using /etc/yum.repos.d/livna.repo.

rpm -ivh http://rpm.livna.org/livna-release-9.rpm

Next, install the Nvidia kernel module and all of it's dependencies:

sudo yum install kmod-nvidia

Then, use the nvidia-xconfig script to configure /etc/X11/xorg.conf. This will configure /etc/X11/xorg.conf with the 'nvidia' driver and it's options.

sudo /usr/sbin/nvidia-xconfig

Finally, reboot your system. You should see the Nvidia driver loading during boot. If you have any X errors, check /var/log/Xorg.log. If you want to tweak your driver, OpenGL or display settings, use nvidia-settings.

sudo /usr/bin/nvidia-settings

Fedora 9 Perlcc

As of version 5.10.0-RC2, Perlcc is no longer distributed with Perl. This means that Fedora 9 does not include perlcc. Here is the official statement regarding perlcc from CPAN.org:

Removal of the bytecode compiler and of perlcc

perlcc, the byteloader and the supporting modules (B::C, B::CC, B::Bytecode, etc.) are no longer distributed with the perl sources. Those experimental tools have never worked reliably, and, due to the lack of volunteers to keep them in line with the perl interpreter developments, it was decided to remove them instead of shipping a broken version of those. The last version of those modules can be found with perl 5.9.4.

However the B compiler framework stays supported in the perl core, as with the more useful modules it has permitted (among others, B::Deparse and B::Concise).

Sources
CPAN.org: perldelta - what is new for perl 5.10.0

Fedora Apache Quickstart

If you are running Fedora and need Apache's HTTP web server, you have a couple of options. One, you can install Fedora's pre-built RPMs. Two, you can compile Apache to meet your specific needs.

Compiling Apache can improve performance and security. But, if you are starting out or need to get up and running quickly, use Fedora's RPMs.

Quick Install

To quickly install Fedora's Apache packages, install the 'Web Server' Yum group. This will install HTTPD with support for PHP, mod_perl, mod_ssl, and mod_python. The Web Server group also contains squid and weblizer.

yum groupinstall "Web Server"

If you want more control over the packages you need, install them one at a time. First, install HTTPD and then add on the modules you need.

yum install httpd
yum install mod_ssl mod_python

Apache Configuration

If you are feeling lazy and want to use a GUI, Fedora provides a graphical interface for configuring Apache. Install system-config-httpd:

yum install system-config-httpd

Then, run the tool as root:

/usr/bin/system-config-httpd

You can also configure the httpd.conf file manually. See the Apache documentation for details on how to configure your web server.

vim /etc/httpd/conf/httpd.conf
vim /etc/httpd/conf.d/README

Start Apache

You can set Apache to start at boot using chkconfig:

chkconfig httpd on

Finally, start Apache with the service command:

service httpd start

For more information, see Fedora's official documentation or the Fedora Documentation Project's Wiki.

Fedora Codec Installation

If you just need MP3 support, you might want to start here. Otherwise, I recommend using Livna.org's MPLayer package with the codecs found at http://www.mplayerhq.hu.

Install Livna's release package for Fedora 9. This will provide you with access to Livna.org's Fedora 9 YUM repository using /etc/yum.repos.d/livna.repo.

rpm -ivh http://rpm.livna.org/livna-release-9.rpm

Install mplayer from Livna.org.

sudo yum -y install mplayer

Now, visit the MPlayer Codecs Directory and download the latest 'All' tarball.

wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2

Next, prepare the codecs folder. MPlayer from Livna.org will use /usr/lib/codecs.

sudo mkdir -p /usr/lib/codecs

Other media players like Xine and avifile might use /usr/lib/win32, so create a symlink.

sudo ln -s /usr/lib/codecs /usr/lib/win32
ls -l /usr/lib/win32
lrwxrwxrwx 1 root root 15 2008-05-24 08:02 /usr/lib/win32 -> /usr/lib/codecs

Finally, extract the contents of the tarball and copy all files to /usr/lib/codecs.

tar -xjvf all-20071007.tar.bz2
sudo cp -a all-20071007/* /usr/lib/codecs/

See the MPlayer(1) man page for /usr/bin/mplayer usage.

man 1 mplayer

Fedora Codecs with MPlayer

If you just need MP3 support, you might want to start here. Otherwise, I recommend using Livna.org's MPLayer package with the codecs found at http://www.mplayerhq.hu.

Install Livna's release package for Fedora 9. This will provide you with access to Livna.org's Fedora 9 YUM repository using /etc/yum.repos.d/livna.repo.

rpm -ivh http://rpm.livna.org/livna-release-9.rpm

Install mplayer from Livna.org.

sudo yum -y install mplayer

Now, visit the MPlayer Codecs Directory and download the latest 'All' tarball.

wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2

Next, prepare the codecs folder. MPlayer from Livna.org will use /usr/lib/codecs.

sudo mkdir -p /usr/lib/codecs

Other media players like Xine and avifile might use /usr/lib/win32, so create a symlink.

sudo ln -s /usr/lib/codecs /usr/lib/win32
ls -l /usr/lib/win32
lrwxrwxrwx 1 root root 15 2008-05-24 08:02 /usr/lib/win32 -> /usr/lib/codecs

Finally, extract the contents of the tarball and copy all files to /usr/lib/codecs.

tar -xjvf all-20071007.tar.bz2
sudo cp -a all-20071007/* /usr/lib/codecs/

See the MPlayer(1) man page for /usr/bin/mplayer usage.

man 1 mplayer

Fedora MP3 Support

Fedora 9 does not release native support for MP3, so you need to get the right bits from another source like rpm.livna.org. First, install Livna's release package for Fedora 9. This will provide you with access to Livna.org's Fedora 9 YUM repository using /etc/yum.repos.d/livna.repo.

rpm -ivh http://rpm.livna.org/livna-release-9.rpm

Now, for XMMS MP3 support, install xmms and xmms-mp3

yum install xmms xmms-mp3

For Amarok MP3 support, install amarok and amarok-extras-nonfree.

yum install amarok amarok-extras-nonfree

For xine with MP3 support, install xine and xine-lib-extras-nonfree

yum install xine xine-lib-extras-nonfree

To create MP3s with LAME, install lame and lame-mp3x

yum install lame lame-mp3x

Fedora Source RPM

So, you want to rebuild a Fedora package from source using a src.rpm file? Maybe make some tweaks along the way? This is how.

Quick Prerequisites Check

First, make sure you have yum-utils and rpmdevtools installed

sudo yum -y install yum-utils rpmdevtools

Next, configure your user's .rpmmacros file. Use your username, not root! Edit ~/.rpmmacros and add these lines:

%_topdir %(echo $HOME)/rpmbuild
%__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot

The first line, indicates the rpm build top directory. Then, we add some some post install commands. Systems with SMP enabled should also add the following to enable parallel compiles during builds. Adjust the job number to be the number of CPU cores available. In my example, two.

%_smp_mflags -j2

I also like to format my rpm query string so that architecture is part of the name:

%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}

To review, here is my .rpmmacros file:

%_topdir %(echo $HOME)/rpmbuild
%_smp_mflags -j2
%__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}

Get the Source

Build the rpmbuild folder and it's subfolders using rpmdev-setuptree from the rpmdevtools package. Note that you can also wipe ~/rpmbuild clean with /usr/bin/rpmdev-wipetree.

/usr/bin/rpmdev-setuptree

Then, cd into ~/rpmbuild/SRPMS and use yumdownloader (part of yum-utils) to download the source code. In the following example, I am downloading httpd.

cd ~/rpmbuild/SRPMS/
yumdownloader --source httpd

Build the Source

Use yum-builddep as root to install all packages needed to build the source RPM. The yum-builddep tool is part of the yum-utils package.

sudo yum-builddep httpd-2.2.8-3.src.rpm

You have two options when compiling the RPM from source. One, you just rebuild the src.rpm as-is. This will drop a binary RPM in ~/rpmbuild/RPMS/$(arch):

rpmbuild --rebuild httpd-2.2.8-3.src.rpm

Otherwise, if you want to make changes to the source RPM's spec file, first install the source RPM:

rpm -ivh httpd-2.2.8-3.src.rpm

Now you can edit the spec file in ~/rpmbuild/SPECS and build a binary package using the edited spec file:

cd ~/rpmbuild
vim SPECS/httpd.spec
rpmbuild -bb SPECS/httpd.spec

To also build a new source RPM from your edited SPEC, use rpmbuild -bs

rpmbuild -bs SPECS/httpd.spec

Again, binary RPMs are produced in ~/rpmbuild/RPMS/$(arch).

Sources

FedoraProject.org: Docs/CustomKernel
HowToForge.com: How To Compile A Kernel - The Fedora Way

Firefox i386 on FC9 x86_64

Fedora 9 does not provide the i386 Firefox package in the x86_64 YUM repositories. So, if you need a 32-bit browser on your 64-bit Fedora 9 installation, you will need to add new YUM repositories. Start by creating /etc/yum.repos.d/fedora-i386.repo with the following contents:

[fedora-i386]
name=Fedora $releasever - i386
failovermethod=priority
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/i386/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=i386
enabled=1
gpgcheck=1
includepkgs=firefox
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
#
[updates-i386]
name=Fedora $releasever - i386 - Updates
failovermethod=priority
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/i386/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=i386
enabled=1
gpgcheck=1
includepkgs=firefox
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

This will provide you with access to the Fedora 9 i386 Yum repositories for Firefox only (note includepkgs=firefox). Now, remove your 64-bit Firefox RPM.
sudo rpm -e firefox.x86_64

Finally, install the 32-bit Firefox RPM with the new Yum repository.
sudo yum install firefox.i386

Now, run Firefox as normal. You will be running a 32-bit Firefox on an x86_64 system.

Flash Plugin on Fedora 10

The Adobe Flash Plugin, with sound support, is available on Fedora. These instructions guide you through the installation of Adobe's Flash Plugin on Fedora 10.

Install Audio Libraries

First, install the audio libraries needed for sound support by the Flash Plugin.

su -c "yum -y install pulseaudio-libs alsa-lib alsa-plugins-pulseaudio"

Using 64-bit Firefox?

Adobe Labs has been offering a 64-bit Flash plugin since Dec 12, 2008. Be sure to first uninstall any other versions of Flash you have installed on the system. Then, download and unpack the 64-bit Flash Plugin for Linux into your Mozilla Plugins folder. For updates and details, visit the Adobe Labs Download page for Flash: http://labs.adobe.com/downloads/flashplayer10.html

cd $HOME/.mozilla/plugins
wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10....
tar -xzvf libflashplayer-10.0.d21.1.linux-x86_64.so.tar.gz

Don't forget to restart your browser!

32-bit Users Only

Visit http://www.adobe.com/products/flashplayer/ and click Download Now. Then select YUM for Linux and download the provided RPM (adobe-release-i386-1.0-1.noarch.rpm).

Install the downloaded RPM which installs /etc/yum.repos.d/adobe-linux-i386.repo.

su -c "rpm -ivh adobe-release-i386-1.0-1.noarch.rpm"

Check that you can access the Adobe Yum repository.

su -c "yum --disablerepo=* --enablerepo=adobe* list"

Now, install the Adobe Flash Plugin

su -c "yum install flash-plugin"

Then, add the Flash Plugin is in your $HOME/.mozilla/plugins folder.

mkdir -p $HOME/.mozilla/plugins
cd $HOME/.mozilla/plugins
ln -s /usr/lib/flash-plugin/libflashplayer.so .

Don't forget to restart your browser!

Flash Plugin on Fedora 9

Fedora 10 Users

Go here if you are a Fedora 10 user: http://hacktux.com/fedora/10/flash

OpenSource Flash Plugins

Fedora 9 features the Open Source Flash player, Swfdec. You can install the Swfdec plugin for Firefox using Yum.
sudo yum install swfdec-mozilla

Fedora 9 also provides Gnash.
sudo yum install gnash-plugin

Install Adobe Flash Using Yum

Alternatively, you can use Adobe's Flash plugin. To install the Adobe Flash plugin on Fedora 9 visit http://www.adobe.com/products/flashplayer/ and click Download Now. Then select YUM for Linux and download the provided RPM (adobe-release-i386-1.0-1.noarch.rpm).

Install the downloaded RPM which installs /etc/yum.repos.d/adobe-linux-i386.repo.
sudo rpm -i adobe-release-i386-1.0-1.noarch.rpm

Check that you can access the Adobe Yum repository.
yum --disablerepo=* --enablerepo=adobe* list

Next, remove the Fedora Swfdec and Gnash plugin to avoid conflicts.
sudo yum remove swfdec-mozilla gnash-plugin

Now, install the Adobe Flash Plugin
sudo yum install flash-plugin

Finally, add the Adobe plugin is in your $HOME/.mozilla/plugins folder.
mkdir -p $HOME/.mozilla/plugins
cd $HOME/.mozilla/plugins
ln -s /usr/lib/flash-plugin/libflashplayer.so .

For Fedora 9 i386, you should be done. If you are running x86_64, read on.

Firefox x86_64 with 32-bit Adobe Flash

The Adobe Flash plugin is not available as an x86_64 package. If you need to run a 64-bit browser, but need Adobe Flash, you can use ndiswrapper to run the 32-bit Adobe Flash plugin on the 64-bit Firefox browser.

First, install Livna's release package for Fedora 9. This will provide you with access to Livna.org's Fedora 9 YUM repository using /etc/yum.repos.d/livna.repo.

rpm -ivh http://rpm.livna.org/livna-release-9.rpm

Next, install ndiswrapper from Livna.org.

sudo yum -y install ndiswrapper

Now, install both the i386 and x86_64 packages for nspluginwrapper from Fedora's YUM repositories

sudo yum -y install nspluginwrapper.{i386,x86_64}

Finally, install the i386 version of libflashsupport and the i386 version of pulseaudio-libs (for flash sound support).

sudo yum -y install pulseaudio-libs.i386 libflashsupport.i386

Sources

fedorasolved.org: Adding the Flash Player Plugin
adobe.com: Adobe - Flash Player: Installation instructions

MP3 on Fedora 9

Fedora 9 does not release native support for MP3, so you need to get the right bits from another source like rpm.livna.org. First, install Livna's release package for Fedora 9. This will provide you with access to Livna.org's Fedora 9 YUM repository using /etc/yum.repos.d/livna.repo.

rpm -ivh http://rpm.livna.org/livna-release-9.rpm

Now, for XMMS MP3 support, install xmms and xmms-mp3

yum install xmms xmms-mp3

For Amarok MP3 support, install amarok and amarok-extras-nonfree.

yum install amarok amarok-extras-nonfree

For xine with MP3 support, install xine and xine-lib-extras-nonfree

yum install xine xine-lib-extras-nonfree

To create MP3s with LAME, install lame and lame-mp3x

yum install lame lame-mp3x

RPM -e Error Specifies Multiple Packages

Running into this?

bash$ sudo rpm -e zlib-devel
error: "zlib-devel" specifies multiple packages

This is because zlib-devel.i386 and zlib-devel.x86_64 are both installed. It is possible to remove them individually:

bash$ sudo rpm -e zlib-devel.i386
bash$ sudo rpm -e zlib-devel.x86_64

By default, Fedora, CentOS and RedHat shells do not specify the architecture of an RPM in the query format. This can lead to duplicate entries from queries:

bash$ rpm -q zlib-devel
zlib-devel-1.2.3-14.fc8
zlib-devel-1.2.3-14.fc8

You can use the --queryformat switch when running rpm -q, or configure the query format setting in ~/.rpmmacros.

bash$ rpm -q --queryformat "%{name}.%{arch}\n" zlib-devel
zlib-devel.i386
zlib-devel.x86_64
bash$ cat ~/.rpmmacros
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
bash$ rpm -q zlib-devel
zlib-devel-1.2.3-14.fc8.i386
zlib-devel-1.2.3-14.fc8.x86_64

Yum Force Reinstall

Since Yum does not have a force flag, rpm commands must be used along with Yum to do some heavy lifting. Here are a few ways to force the reinstall of a broken package on a Yum Managed system.

Yum Remove and then Install

The easiest solution is to yum remove the package and then yum install the same package. If there are too many dependencies at stake with the package in question, try another method.

yum remove PACKAGE
yum install PACKAGE

Force Erase and then Yum Install

RPM dependencies sometimes make a simple yum remove impossible and Yum will want to erase your entire OS before moving on. In this case, use rpm to force erase, then yum to install.

rpm -e --nodeps PACKAGE
yum install PACKAGE

Prune RPM Database and then Yum Install

If your package install is so corrupted that an rpm -e is dangerous or impossible, even with --nodeps, remove the package from the local RPM database to trick yum into reinstalling the package. No files are deleted when using rpm -e with --justdb.

rpm -e --justdb --nodeps PACKAGE
yum install PACKAGE