Thursday, August 13, 2009

basic command of linux.....

* Find info about an application

su -c 'yum info application_name'


* Update the whole system

su -c 'yum update'


* Enable a repository

su -c 'yum --enablerepo=repo_name'


* Disable a repository

su -c 'yum --disablerepo=repo_name'

* Importing Fedora GPG keys
Fedora has 2 basic repositories named 'fedora' and 'updates'. To use them and not get errors about unsigned packages you must import their GPG keys. Open a terminal and type:

su -c 'rpm --import /etc/pki/rpm-gpg/*'

**Note: You will get a few error messages like "import failed" but this is ok.
* Third party Repositories
* RPM Fusion

Fedora software repositories don't include support for MP3, DVD and Video playback/recording because of patent licenses. For this reason you have to install that software from third party repositories. But don't worry, this is pretty easy! ;)

Now we are going to install the RPM Fusion Repository. RPM Fusion is a merger of the Dribble, Freshrpms and RPM Fusion package repositories for Fedora and Red Hat Enterprise Linux. A variety of applications is included in that repository such as codecs for mp3 and unencrypted DVDs, multimedia applications such as mplayer, VLX and xine and the closed source Nvidia and ATi video drivers! RPM Fusion has two main repositories:

* one named "free" for Open Source Software (as defined by the Fedora Licensing Guidelines) which can't be included in Fedora because it might be patent encumbered in the US
* one named "nonfree" for non-free software, that is everything else which can't be in free; this includes software with public available source-code that has "no commercial use"-like restrictions


For the rest of this guide I will assume that you have installed and enabled the RPM Fusion Repository. If you are using Gnome (Fedora's default Desktop Environment) you can do this with a few clicks through Firefox. Users of KDE and kpackagekit can do this only manually because of a bug in kpackagekit. Here are both ways to install RPM Fusion Repository.

So if you are using Gnome just click the two links below and press Enter a few times:

RPM Fusion free for Fedora 8, 9, 10 or 11
RPM Fusion nonfree for Fedora 8, 9, 10 or 11

If you are using KDE open a terminal and type:

su -
rpm -ivh \
http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm -ivh \
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
yum update

If you get an error message like this "Public key for rpmfusion-nonfree-release-11-1.noarch.rpm is not installed" while trying to install a package from RPMFusion repository you have to import the GPG keys first. Open a terminal and type:

su -c 'rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-*'

You will get a few failure messages but this is ok.

* Adobe

The Adobe repository provides flash and acrobat reader packages for the x86 Fedora. To install it type:

su -
rpm -ivh http://linuxdownload.adobe.com/linux/i386/adobe-release-i386-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux


It will be automatically enabled.

* Google

Well, it has only picasa but for those who need it install it by typing:

su -
wget https://dl-ssl.google.com/linux/linux_signing_key.pub
rpm --import linux_signing_key.pub
rm linux_signing_key.pub
gedit /etc/yum.repos.d/google.repo


Depending on your architecture paste the following lines:

[google]
name=Google - i386
baseurl=http://dl.google.com/linux/rpm/stable/i386
enabled=1
gpgcheck=1



[google64]
name=Google - x86_64
baseurl=http://dl.google.com/linux/rpm/stable/x86_64
enabled=1
gpgcheck=1

* Graphical Interface for yum
If you don't like typing commands in your console you can use Fedora's Graphical interface for yum. You can find it under System -> Administration -> Add/Remove Software.

You can also install yumex for this reason.

su -c 'yum install yumex'

* Configure yum through Proxy
If you are behind an http proxy server and you want yum to connect to the internet through that proxy open a terminal and type:

su -c 'gedit /etc/yum.conf'


Add this line in the yum configuration

proxy=http://ip:port/


where ip is your proxy's ip address and port is the port the proxy listens to. Don't forget the / after the port number. Save and exit.
* Yum plugins
* Presto Plugin
The presto plugin provides faster, smaller size downloads to Fedora users. It downloads only the part of the rpm that has been updated and not the whole package. Presto is ofedora_firefoxicially included in the Fedora 11 release and I recommend to use it! Just a notice. If you have let's say version N of an rpm installed and you miss the N+1 installation presto can't take you directly to N+2. In this case you will have to download the whole rpm. But this shouldn't bother you. Yum will take care of everything. To install it type:

su -c 'yum install yum-presto'


* Fastest Mirror Plugin
Exactly what its name says. This plugin searches for the fastest mirror in your mirrorlist and downloads all packages from it. To install it type:

su -c 'yum install yum-fastestmirror'


Now, just use yum as usual. You can configure various settings of this plugin in the file:

su -c 'gedit /etc/yum/pluginconf.d/fastestmirror.conf'

* Security Plugin
This plugin allows you to search and install only security related updates. Very useful if you have Fedora installed on a Server production mode. To install it type:

su -c 'yum install yum-security'


To apply security plugins type:


su -c 'yum --security update'


For more information and additional options such as bugzilla updates and advisory information read its manual:

man yum-security

* Allowdowngrade Plugin
Yum by default doesn't allow you to downgrade a package. However sometimes a new package may cause you problems. In that case you can downgrade to the previous working version of the package with this plugin. To install it type:

su -c 'yum install yum-allowdowngrade'


To use it type:

su -c 'yum update --allow-downgrade'


You can disable this plugin by changing the option enabled in the file:

su -c 'gedit /etc/yum/pluginconf.d/allowdowngrade.conf'

No comments:

Post a Comment