Fedora

From Alessandro's Wiki
Jump to: navigation, search

Gestore Pacchetti Software RPM

  • Come avere la lista degli rpm installati ordinati per dimensione?
rpm -qa --qf "%-10{SIZE} %-30{NAME}\n" | sort -n
  • sapere a che rpm appartiene un pacchetto:
rpm -q --whatprovides libltdl.so.3
libtool-libs-1.4.3-6

Yum

  • gestore repositori Fedora/RedHat

Repositories

  • Livna:
rpm -ivh http://rpm.livna.org/livna-release-6.rpm
  • Remi:
wget http://remi.collet.free.fr/rpms/fc6.i386/remi-release-1-2.fc6.remi.noarch.rpm
rpm -ivh remi-release-1-2.fc6.remi.noarch.rpm
wget  http://remi.collet.free.fr/RPM-GPG-KEY-remi
rpm --import RPM-GPG-KEY-remi
  • ATrpms
echo '[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/fc$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1' > /etc/yum.repos.d/atrpms.repo
rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms
  • block a package globally: /etc/yum.conf
exclude=firefox
  • block a package from in a repository: /etc/yum.repos.d/repository_name.repo
exclude=package_name
example
  • in scientific linux 6.1 , with rpmforge,epel,adobe I have a problem upgrading the syst em after installing VLC:
[root@clustergang01 ~]# yum update
Loaded plugins: refresh-packagekit
epel/metalink                                                                                                                          |  16 kB     00:00     
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package libmodplug.i686 0:0.8.7-1.el6.rf will be updated
--> Processing Dependency: libmodplug.so.0 for package: vlc-1.1.11-1.el6.rf.i686
---> Package libmodplug.i686 1:0.8.8.3-2.el6 will be an update
--> Finished Dependency Resolution
Error: Package: vlc-1.1.11-1.el6.rf.i686 (@rpmforge)
           Requires: libmodplug.so.0
           Removing: libmodplug-0.8.7-1.el6.rf.i686 (@rpmforge)
               libmodplug.so.0
           Updated By: 1:libmodplug-0.8.8.3-2.el6.i686 (epel)
               Not found
  • so I "ban"
exclude=libupnp,libmodplug

from

/etc/yum.repos.d/epel.repo

Installare il Kernel "Futuro"

yum --enablerepo=development update kernel

Update Distribuzione

rpm -Uhv http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/fedora-release-6-4.noarch.rpm http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/fedora-release-notes-6-3.noarch.rpm
  • e se usiamo il repositorio Livna:
rpm -Uvh http://rpm.livna.org/livna-release-6.rpm

networking

  • add a static route to the network scripts:

in /etc/sysconfig/network-scripts/route-eth1

192.168.251.0/24        dev eth1 via 192.168.252.1

is the equivalent of doing:

route add -net 192.168.251.0/24 gw 192.168.252.1

BUGS & Problems

USB storage devices

  • Usb storage devices (Hard disks, pen drives, cd/dvd) are not working

se facendo:

modprobe usb_storage 

oppure

[root@localhost ~]# dmesg |grep usb_storage|tail -3
usb_storage: Unknown symbol scsi_scan_host
usb_storage: Unknown symbol scsi_add_host
usb_storage: Unknown symbol scsi_host_alloc

si hanno questi errori, una soluzione che ho trovato su un portatile Acer Centrino è:

vi /etc/modprobe.d/scsi_mod

e commento la linea

# options scsi_mod max_scsi_luns=6

provo e inserisco il modulo in memoria:

modprobe usb_storage 
[root@localhost ~]# modinfo usb_storage
filename:       /lib/modules/2.6.20-1.2925.fc6/kernel/drivers/usb/storage/usb-storage.ko
license:        GPL
description:    USB Mass Storage driver for Linux
author:         Matthew Dharm <mdharm-usb@one-eyed-alien.net>
srcversion:     F3B413F507F36B5282158A7
depends:        scsi_mod
vermagic:       2.6.20-1.2925.fc6 SMP mod_unload 686 4KSTACKS
parm:           delay_use:seconds to delay before using a new device (uint)

Risolto