Wednesday, May 20, 2009

Yum online Package Installation.

Dear ! All,
You can install other Repositories for e.g. if u r using Fedore core 8 open terminal give ip add & Dns, gateway according ur ISP then type below command. To Install & use livna server's Rpm's
To Install Livna's Repositories
rpm -ivh http://rpm.livna.org/livna-release-8.rpm
Now u r ready to install any rpm which are availabe on livna server.
e.g. u want to install xmms and samba from yum server
open terminal then type
1. yum install xmms*
2. yum install samba*
It will take few time to search & install.To installation Press Y
You can also rpmfusion Repositories for install rpmfusion's RPMs.
For Fedora 8, 9 or 10
rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
For RHEL5 or CentOS
rpm -ivh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm

For Fedora Alpha, Beta, Preview, Rawhide, RC, Snapshot aka. Fedora 11:-
rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm

To Save Yum Package in your PC/Server:-
Step1:-
vi /etc/yum.conf

replace in /etc/yum.conf

keepcache=1


save and exit

Step2:-
Now you can get your packages from /var/cache/yum/



Default Sample file of /etc/yum.conf
[main]

cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
# Don't check keys for localinstall
gpgcheck=0
plugins=1
metadata_expire=1800
# Changed this because some mirrors go down and then
# re-trying takes forever.
timeout=7


Note:-Where meaning of above options in yum.conf
cachedir
Directory where yum should store its cache and db files packages. The default is '/var/cache/yum'.

keepcache
Either '1' or '0'. Determines whether or not yum keeps the cache of headers and packages after succesful installation. Default is '1' (keep files)

/var/cache/yum/
By default, Yum stores temporary files under the directory

debuglevel
debug level. valid numbers are 0-10. default is 2.

logfile
Full directory and file name for where yum should write its log file.

errorlevel
another debug level. valid numbers are 0-2. default is 2

logfile

Full directory and file name for where yum should write its log file.
pkgpolicy
newest or last - Package sorting order. When a package is available from multiple servers, newest will install the most recent version of the package found. last will sort the servers alphabetically by serverid and install the version of the package found on the last server in the resulting list. If you don't understand the above then you're best left not including this option at all and letting the default (newest) occur

distroverpkg
The package used by yum to determine the "version" of the distribution. This can be any installed package. Default is 'redhat-release'.

tolerant
Either '1' or '0'. If enabled, then yum will be tolerant of errors on the command line with regard to packages. For example: if you request to install foo, bar and baz and baz is installed; yum won't error out complaining that baz is already installed. Default to '0' (not tolerant).
Commmand-line option: -t

exactarch
1 or 0 - set to 1 to make yum update only update the architectures of packages that you have installed. i.e.-- with this enabled yum will not install an i686 package to update an i386 package.
obsoletes
This option only has affect during an update. It enables yum's obsoletes processing logic. Useful when doing distribution level upgrades. See also the yum upgrade command documentation for more details (yum(8)).
Commmand-line option: --obsoletes

gpgcheck
Either '1' or '0'. This tells yum whether or not it should perform a GPG signature check on the packages gotten from this repository.

plugins
Either '0' or '1'. Global switch to enable or disable yum plugins. Default is '0' (plugins disabled). See the PLUGINS section of the yum(8) man for more information on installing yum plugins.

metadata_expire
Time (in seconds) after which the metadata will expire. So that if the current metadata downloaded is less than this many seconds old then yum will not update the metadata against the repository. If you find that yum is not downloading information on updates as often as you would like lower the value of this option

timeout
Overrides the timeout option from the [main] section for this repository.
Enjoy!
Regards,
Rahul Kumar















Wednesday, May 13, 2009

Forgotten root Password of RHEL,Fedora Core and CentOS.

If you want to reset or forgot root password.You will have to boot your linux in single user mode.If you are using Grub boot loader follow below steps.

Step 1:- At the boot loader menu, Press arrow keys to highlight the installation you want to edit and type A to enter into append mode.

Step2:- You are presented with a prompt that looks similar to the following:

grub append> ro root=LABEL=/

Step 3:- Press the Spacebar once to add a blank space, then add the word single to tell GRUB to boot into single-user Linux mode. The result should look like the following:

ro root=LABEL=/ single
or

ro root=LABEL=/ 1

Step 4:- Press [Enter] and Press b GRUB will boot single-user Linux mode. After it finishes loading, you will be presented with a shell prompt similar to the following:

sh-2.05b#

Step5:- You can now change the root password by typing

passwd root

It will be asked to re-type the password. Once you are finished, the password will be changed. You can then reboot by typing reboot at the prompt. Then you can log in to root as you normally would.
Enjoy!

The Boot Process of x8.6 REHL and Fedora Linux System

The Boot Process Of x86 system REHL and Fedora Linux

Step1:- Press button Power then Post run (Power on self test) .
The POST is a built-in diagnostic program that checks your hardware to ensure that everything is present and functioning properly (check min memory for boot ,keyboard,other devices).If there is no error found it goes to Step2 otherwise give any Beep error.

Step2:- Now BIOS transfers control for MBR .It checks primary hard disk and active partition.

Step3:- The first stage boot loader GRUB or LILO loads itself into memory and launches the second stage boot loader from the /boot/ partition.

Step4:-The second stage boot loader loads the kernel into memory, which in turn loads any necessary modules and mounts the root partition read-only.(The boot loader then places the appropriate initial RAM disk image, called an initrd, into memory. The initrd is used by the kernel to load drivers necessary to boot the system. This is particularly important if SCSI hard drives are present or if the systems uses the ext3 file system)

Step5:- The kernel transfers control of the boot process to the /sbin/init program.

Step6:- The /sbin/init program loads /etc/rc.d/rc.sysinit scrip , /etc/sysconfig/clock.The init command then runs the /etc/inittab script.the init command sets the source function library, /etc/rc.d/init.d/functions.Now checks /etc/inittab file.Default runlevel is 5 in RedLinux and fedora.It checks runlevel their scripts (/etc/rc.d/rc5.d/) then at last things the init program executes is the /etc/rc.d/rc.local file. load and all services and user-space tools, and runlevel 5, the /etc/inittab runs a script called /etc/X11/prefdm. The prefdm script executes the preferred X display manager — gdm, kdm, or xdm, depending on the contents of the /etc/sysconfig/desktop file mounts all partitions listed in /etc/fstab.

Step7:-Now user get login screen.