Archive

Posts Tagged ‘yum’

Install video drivers and Compiz 3-D desktop effects on Fedora 10 in just 3 commands!

December 1st, 2008

This is how-to-Install 3D desktop effects on a vanilla Fedora 10 installation (I tried this on a freshly installed Fedora 10, installed from DVD).  Basically all you need to do is get 3d hardware acceleration enabled for your video card and then install the fusion-icon package and reboot. In the past this was easier said than done.

rotating compiz desktop cube in fedora 10rotating compiz desktop cube in fedora 10rotating compiz desktop cube in fedora 10rotating compiz desktop cube in fedora 10

First Install the new rpmfusion non-free repositories.  Rpmfusion is a new set of repositories that’s putting all the free and non-free repos like livna and freshrpms together in one place.  Install your video driver kernel module, install fusion-icon, and reboot.  YUM will handle all the compiz dependencies for you.  Here’s the three steps along with their output.

[admica@myhost ~]$ sudo rpm -Uvh \
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
Retrieving http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
warning: /var/tmp/rpm-tmp.PIcyrO: Header V3 DSA signature: NOKEY, key ID b1981b68
Preparing…                ########################################### [100%]
1:rpmfusion-nonfree-relea########################################### [100%]

[admica@myhost ~]$ sudo yum install kmod-nvidia

yum install kmod-nvidia
Loaded plugins: fedorakmod, refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package kmod-nvidia.x86_64 0:177.82-1.fc10.4 set to be updated
–> Processing Dependency: kmod-nvidia-2.6.27.5-117.fc10.x86_64 = 177.82-1.fc10.4 for package: kmod-nvidia
–> Running transaction check
—> Package kmod-nvidia-2.6.27.5-117.fc10.x86_64.x86_64 0:177.82-1.fc10.4 set to be updated
–> Processing Dependency: nvidia-kmod-common >= 177.82 for package: kmod-nvidia-2.6.27.5-117.fc10.x86_64
–> Running transaction check
—> Package xorg-x11-drv-nvidia.x86_64 0:177.82-1.fc10 set to be updated
–> Processing Dependency: xorg-x11-drv-nvidia-libs-x86_64 = 177.82-1.fc10 for package: xorg-x11-drv-nvidia
–> Processing Dependency: livna-config-display >= 0.0.21 for package: xorg-x11-drv-nvidia
–> Processing Dependency: livna-config-display for package: xorg-x11-drv-nvidia
–> Running transaction check
—> Package xorg-x11-drv-nvidia-libs.x86_64 0:177.82-1.fc10 set to be updated
—> Package livna-config-display.noarch 0:0.0.22-1.fc10 set to be updated
–> Processing Dependency: system-config-display for package: livna-config-display
–> Running transaction check
—> Package system-config-display.noarch 0:1.1.1-1.fc10 set to be updated
–> Processing Dependency: rhpxl >= 0.34-1 for package: system-config-display
–> Running transaction check
—> Package rhpxl.x86_64 0:1.9-3.fc10 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
Package                                                Arch                     Version                           Repository                           Size
=============================================================================================================================================================
Installing:
kmod-nvidia                                            x86_64                   177.82-1.fc10.4                   rpmfusion-nonfree                    23 k
Installing for dependencies:

kmod-nvidia-2.6.27.5-117.fc10.x86_64                   x86_64                   177.82-1.fc10.4                   rpmfusion-nonfree                   2.5 M
livna-config-display                                   noarch                   0.0.22-1.fc10                     rpmfusion-nonfree                    65 k
rhpxl                                                  x86_64                   1.9-3.fc10                        fedora                               98 k
system-config-display                                  noarch                   1.1.1-1.fc10                      fedora                              193 k
xorg-x11-drv-nvidia                                    x86_64                   177.82-1.fc10                     rpmfusion-nonfree                   3.5 M
xorg-x11-drv-nvidia-libs                               x86_64                   177.82-1.fc10                     rpmfusion-nonfree                   6.2 M

Transaction Summary
=============================================================================================================================================================
Install      7 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 13 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): kmod-nvidia-177.82-1.fc10.4.x86_64.rpm                                                                                         |  23 kB     00:00
(2/7): livna-config-display-0.0.22-1.fc10.noarch.rpm                                                                                  |  65 kB     00:01
(3/7): rhpxl-1.9-3.fc10.x86_64.rpm                                                                                                    |  98 kB     00:00
(4/7): system-config-display-1.1.1-1.fc10.noarch.rpm                                                                                  | 193 kB     00:00
(5/7): kmod-nvidia-2.6.27.5-117.fc10.x86_64-177.82-1.fc10.4.x86_64.rpm                                                                | 2.5 MB     00:52
(6/7): xorg-x11-drv-nvidia-177.82-1.fc10.x86_64.rpm                                                                                   | 3.5 MB     01:07
(7/7): xorg-x11-drv-nvidia-libs-177.82-1.fc10.x86_64.rpm                                                                              | 6.2 MB     02:01
————————————————————————————————————————————————————-
Total                                                                                                                         53 kB/s |  13 MB     04:04
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID b1981b68
rpmfusion-nonfree/gpgkey                                                                                                              | 1.7 kB     00:00
Importing GPG key 0xB1981B68 “RPM Fusion repository (Fedora - nonfree) <rpmfusion-buildsys@lists.rpmfusion.org>” from /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : rhpxl                                                                                                                                 1/7
Installing     : system-config-display                                                                                                                 2/7
Installing     : livna-config-display                                                                                                                  3/7
Installing     : kmod-nvidia                                                                                                                           4/7
Installing     : kmod-nvidia-2.6.27.5-117.fc10.x86_64                                                                                                  5/7
Installing     : xorg-x11-drv-nvidia                                                                                                                   6/7
Installing     : xorg-x11-drv-nvidia-libs                                                                                                              7/7

Installed:
kmod-nvidia.x86_64 0:177.82-1.fc10.4

Dependency Installed:
kmod-nvidia-2.6.27.5-117.fc10.x86_64.x86_64 0:177.82-1.fc10.4 livna-config-display.noarch 0:0.0.22-1.fc10 rhpxl.x86_64 0:1.9-3.fc10
system-config-display.noarch 0:1.1.1-1.fc10                   xorg-x11-drv-nvidia.x86_64 0:177.82-1.fc10  xorg-x11-drv-nvidia-libs.x86_64 0:177.82-1.fc10

Complete!

[admica@myhost ~]$ sudo yum install fusion-icon

Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package fusion-icon.noarch 0:0.1.0-0.3.5e2dc9git.fc10 set to be updated
–> Processing Dependency: fusion-icon-ui=0.1.0-0.3.5e2dc9git.fc10 for package: fusion-icon
–> Processing Dependency: ccsm for package: fusion-icon
–> Running transaction check
—> Package fusion-icon-qt.noarch 0:0.1.0-0.3.5e2dc9git.fc10 set to be updated
–> Processing Dependency: PyQt4 for package: fusion-icon-qt
—> Package ccsm.noarch 0:0.7.6-2.fc10 set to be updated
–> Processing Dependency: compizconfig-python >= 0.7.6 for package: ccsm
–> Processing Dependency: libcompizconfig >= 0.7.6 for package: ccsm
–> Processing Dependency: python-sexy for package: ccsm
–> Running transaction check
—> Package PyQt4.x86_64 0:4.4.3-1.fc10 set to be updated
–> Processing Dependency: sip >= 4.7.7 for package: PyQt4
—> Package compizconfig-python.x86_64 0:0.7.6-1.fc10 set to be updated
—> Package libcompizconfig.x86_64 0:0.7.6-2.fc10 set to be updated
—> Package python-sexy.x86_64 0:0.1.9-6.fc10 set to be updated
–> Running transaction check
—> Package sip.x86_64 0:4.7.7-3.fc10 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
Package                         Arch               Version                                 Repository          Size
=====================================================================================================================
Installing:
fusion-icon                     noarch             0.1.0-0.3.5e2dc9git.fc10                fedora              43 k
Installing for dependencies:
PyQt4                           x86_64             4.4.3-1.fc10                            fedora             3.1 M
ccsm                            noarch             0.7.6-2.fc10                            fedora             679 k
compizconfig-python             x86_64             0.7.6-1.fc10                            fedora              43 k
fusion-icon-qt                  noarch             0.1.0-0.3.5e2dc9git.fc10                fedora             6.7 k
libcompizconfig                 x86_64             0.7.6-2.fc10                            fedora              63 k
python-sexy                     x86_64             0.1.9-6.fc10                            fedora              24 k
sip                             x86_64             4.7.7-3.fc10                            fedora             237 k

Transaction Summary
=====================================================================================================================
Install      8 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 4.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): fusion-icon-qt-0.1.0-0.3.5e2dc9git.fc10.noarch.rpm                                     | 6.7 kB     00:00
(2/8): python-sexy-0.1.9-6.fc10.x86_64.rpm                                                    |  24 kB     00:00
(3/8): fusion-icon-0.1.0-0.3.5e2dc9git.fc10.noarch.rpm                                        |  43 kB     00:00
(4/8): compizconfig-python-0.7.6-1.fc10.x86_64.rpm                                            |  43 kB     00:00
(5/8): libcompizconfig-0.7.6-2.fc10.x86_64.rpm                                                |  63 kB     00:00
(6/8): sip-4.7.7-3.fc10.x86_64.rpm                                                            | 237 kB     00:00
(7/8): ccsm-0.7.6-2.fc10.noarch.rpm                                                           | 679 kB     00:01
(8/8): PyQt4-4.4.3-1.fc10.x86_64.rpm                                                          | 3.1 MB     00:05
———————————————————————————————————————
Total                                                                                475 kB/s | 4.2 MB     00:09
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : libcompizconfig                                                                               1/8
Installing     : compizconfig-python                                                                           2/8
Installing     : python-sexy                                                                                   3/8
Installing     : sip                                                                                           4/8
Installing     : PyQt4                                                                                         5/8
Installing     : ccsm                                                                                          6/8
Installing     : fusion-icon                                                                                   7/8
Installing     : fusion-icon-qt                                                                                8/8

Installed:
fusion-icon.noarch 0:0.1.0-0.3.5e2dc9git.fc10

Dependency Installed:
PyQt4.x86_64 0:4.4.3-1.fc10                           ccsm.noarch 0:0.7.6-2.fc10
compizconfig-python.x86_64 0:0.7.6-1.fc10             fusion-icon-qt.noarch 0:0.1.0-0.3.5e2dc9git.fc10
libcompizconfig.x86_64 0:0.7.6-2.fc10                 python-sexy.x86_64 0:0.1.9-6.fc10
sip.x86_64 0:4.7.7-3.fc10

Complete!

Now reboot and the next time gnome/kde/xfce/whatever runs, you can open a terminal and run fusion-icon and it will handle loading the 3d environment for you.

[admica@myhost ~]$ fusion-icon &

* Detected Session: unknown
* Searching for installed applications…
* NVIDIA on Xorg detected, exporting: __GL_YIELD=NOTHING
* Using the GTK Interface
* Interface not installed
… Trying another interface

blah blah blah, and it works…  To get better looking themes, try installing emerald and emerald-themes.

Linux, ooo! Shiny... , , , , , , , ,

How to install a specific version of some rpm with YUM

November 23rd, 2008

You want to install a special version of openssl that’s not the latest release, but some other app requires that specific one — how do you do it?

Lets assume you don’t have the right repository installed, and you need to set that up first.  If you’re looking for some package that you know is in freshrpms or livna, then right out of the box, the default fedora installation won’t look in those repositories.  So import the GPG key and add the repo file.

rpm –import http://freshrpms.net/RPM-GPG-KEY-freshrpms
rpm -ivh http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/8/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm

The –import lets the gpg check pass, and will fail if someone tries to stick a bad package in their repo, unless they’ve gotten ahold of their key a-la the fedora fiasco a few months ago.  But don’t worry about any of that right now.  Just import the key or else yum will complain when you try to install anything.  The 2nd line “rpm -ivh”, that’s going to install a package.  The package will have the .repo file, and it will put it in /etc/yum.repos.d/  that’s what really enables you to search in freshrpms.

Here’s another one, installing livna this time (livna is great for nvidia and ati drivers.  They compile the video drivers for specific kernels and package them for you.)

rpm –import http://livna-dl.reloumirrors.net/RPM-LIVNA-GPG-KEY
rpm -ivh http://rpm.livna.org/livna-release-8.rpm

Now onto installing a specific version of something.  If you know what you’re looking for, say openssl for example, put the version after the package name when you install it from the command line.  You can also specify the architecture and distribution release version too.  But when that doesn’t work, try this:

  • Open a browser and go to http://mirrors.fedoraproject.org/publiclist
  • Find a mirror somewhat geographically close to you, or one that you know will serve your requests fast, and click on “http”.  I’ll choose mirrors.kernel.org.  At this point you’ll be in a basic directory browsing mode.
Name                    Last modified      Size

Parent Directory - core/ 17-Oct-2006 12:46 - development/ 23-Nov-2008 06:30 - extras/ 18-Jun-2007 21:00 - releases/ 18-Nov-2008 22:12 - updates/ 21-Nov-2008 19:16
  • From here I clicked updates, then 9, then x86_64.newkey and ended up here: http://mirrors.kernel.org/fedora/updates/9/x86_64.newkey/  with a huge list of packages.
  • Find this file in a terminal.  It’s probably going to download to your home directory, or ~/Desktop but that all depends on how your browser is set up.  Once you’re there, here’s the line to install it properly.

$ sudo yum localinstall openssl-0.9.8g-9.fc9.i686.rpm

  • The end result is exactly the same as if you installed from the repository.

Linux , , , ,

Setup your own YUM repository, the easy way!

September 25th, 2008

I don’t understand why some people think this is a complicated thing to set up, so here goes my approach which I think is the easiest method.  Perhaps you’re behind a very restrictive corporate firewall or you want to conserve bandwidth when you’re setting up several machines.  You can set up your own repositories on one machine in your network and have it download the packages and updates in the off-hours.  Whenever a client machine on your network wants updates, they’ll get them much faster and you’ll save bandwidth too.

Step-by-step:

Install createrepo on the machine you want to be your update server.

[user@hostname ~]$ sudo yum install createrepo

Now you’ll create a few crons to create and maintain your mirror.  Let’s start with the one that does the grunt work of downloading the packages.  I’ll go ahead and set a bandwidth limit and log my mirroring.  I don’t care about debug stuff so i’ll exclude that and any iso’s that may get dumped in there too.

#!/bin/sh
# GET THE LATEST PACKAGES
/usr/bin/rsync -aq –bwlimit=500 –stats –log-file=/var/log/rsync/i386.rsync.1.log rsync://your-favorite-linux-mirror/linux/updates/9/i386.newkey/ –exclude=debug/ –exclude=*.iso /opt/yum/updates/8/i386/
/usr/bin/rsync -aq –bwlimit=500 –stats –log-file=/var/log/rsync/x86_64.rsync.1.log rsync://your-favorite-linux-mirror/linux/updates/9/x86_64.newkey/ –exclude=debug/ –exclude=*.iso /opt/yum/updates/8/x86_64/

Create a cron to update your repo as new rpms get mirrored.

#!/bin/sh
# CREATE/MAINTAIN MY LOCAL REPOSITORY
/usr/bin/createrepo –update /opt/yum/base/8/i386
/usr/bin/createrepo –update /opt/yum/base/8/x86_64

Create another cron to rotate your logs, saving the last week’s worth.

#!/bin/sh
# ROTATE THE LOGS
rm -f /var/log/rsync/yum-rsync-log7.tar.gz
mv -f /var/log/rsync/yum-rsync-log6.tar.gz /var/log/rsync/yum-rsync-log7.tar.gz
mv -f /var/log/rsync/yum-rsync-log5.tar.gz /var/log/rsync/yum-rsync-log6.tar.gz
mv -f /var/log/rsync/yum-rsync-log4.tar.gz /var/log/rsync/yum-rsync-log5.tar.gz
mv -f /var/log/rsync/yum-rsync-log3.tar.gz /var/log/rsync/yum-rsync-log4.tar.gz
mv -f /var/log/rsync/yum-rsync-log2.tar.gz /var/log/rsync/yum-rsync-log3.tar.gz
mv -f /var/log/rsync/yum-rsync-log1.tar.gz /var/log/rsync/yum-rsync-log2.tar.gz
mv -f /var/log/rsync/yum-rsync-log.tar.gz /var/log/rsync/yum-rsync-log1.tar.gz
tar -czf /tmp/yum-rsync-log.tar.gz /var/log/rsync/*.log
rm -rf /var/log/rsync/*.log
mv -f /tmp/yum-rsync-log.tar.gz /var/log/rsync/

On your client machines, move or delete the existing repo definitions and create a new one that points to your local repositories.  Assuming your server machine’s IP address is 192.168.1.2 and you’re using Fedora your new repo definitions would look something like this:

[fairfield-base]
name=My_Local_Repo - base - Fedora $releasever - $basearch
failovermethod=priority
baseurl=http://192.168.1.2/yum/base/$releasever/$basearch
enabled=1
gpgcheck=1

[fairfield-updates]
name=My_Local_Repo - updates - Fedora $releasever - $basearch
failovermethod=priority
baseurl=http://192.168.1.2/yum/updates/$releasever/$basearch
enabled=1
gpgcheck=1

Wait until your cron fills your repositories or download a few packages and run your createrepo.  From now on your updates will execute much faster.  And if you want to build new machines, you can point your kickstart to get packages from your local mirror instead of just your cdrom so you can build machines that are fully up to date right out of the box.  Try updating on your clients.  You should notice it takes ten times longer to install the updates than it does to download them.

[user@hostname ~]$ sudo yum update

root|ninja

Linux , , , , , , ,