RPM Installation on Linux : A Close Look

RPM – A Close Look!

Querying:

With –q
-a – query all installed package
-f – query the package which owns the file
-c – displays list of marked configuration file.
-i – displays information about the rpm package
-l – displays list of file that package contains
-s – displays the state of the file.

Freshening:

rpm –Fvh

RPM’s freshen option checks the versions of the packages specified on the command line against the versions of packages that have already been installed on your system. When a newer version of an already-installed package is processed by RPM’s freshen option, it is upgraded to the newer version.

However, RPM’s freshen option does not install a package if no previously-installed package of the same name exists

Upgrading:

Upgrading a package is similar to installing one. Type the following command at a shell prompt:

rpm -Uvh foo.rpm

As part of upgrading a package, RPM automatically uninstalls any old versions of the foo package. In fact, you may want to always use -U to install packages which works even when there are no previous versions of the package installed.

Uninstalling:

Uninstalling a package is just as simple as installing one. Type the following command at a shell
prompt:

rpm -e foo

Conflicting Files:

rpm -ivh –replacefiles foo-1.0-1.i386.rpm

Package Already Installed:

rpm -ivh –replacepkgs foo-1.0-1.i386.rpm

Misc:

To find out which package owns it,
enter:

rpm -qf /usr/bin/ggv

To verify the package that owns that program, but you do not know which package owns ‘paste’. Enter the following command:

rpm -Vf /usr/bin/paste

To find information about RPM, use the following command:

rpm -qip crontabs-1.10-7.noarch.rpm

Perhaps you now want to see what files the crontabs RPM installs. You would enter the following:

rpm -qlp crontabs-1.10-5.noarch.rpm

–aid – Add suggested packages to the transaction set when needed.

–nodeps – Don’t do a dependency check before installing or upgrading a package.

Be the first to comment - What do you think?  Posted by ZACH - October 20, 2011 at 6:00 pm

Categories: Linux Administration   Tags: , , ,

Remi Repository for YUM

Wanna need some extra power to your YUM….Just add REMI repo and see the difference

cd /etc/yum.repos.d/
vi remi.repo

add the following lines

[remi]
name=Les RPM de remi pour Enterpise Linux $releasever – $basearch
baseurl=http://remi.collet.free.fr/rpms/el$releasever.$basearch/
#http://iut-info.univ-reims.fr/remirpms/el$releasever.$basearch/
enabled=0
gpgcheck=1
gpgkey=http://remi.collet.free.fr/RPM-GPG-KEY-remi

[remi-test]
name=Les RPM de remi en test pour Enterpise Linux $releasever – $basearch
baseurl=http://remi.collet.free.fr/rpms/test-el$releasever.$basearch/
#http://iut-info.univ-reims.fr/remirpms/test-el$releasever.$basearch/
enabled=0
gpgcheck=1
gpgkey=http://remi.collet.free.fr/RPM-GPG-KEY-remi

write quit then do
yum check-update

Be the first to comment - What do you think?  Posted by jomos - at 5:57 pm

Categories: General   Tags: ,

Kernel Requirements for Oracle Installation

Kernel parameter and values setting on Linux for Oracle Installation.

1) semopm = 100
2) file_max = 6815744
3) ip_local_port_range = 9000 & 65500
4) rmem_default = 262144
5) rmem_max = 4194304
6) wmem_default = 262144
7) wmem_max = 1048576
8) aio_max_nr = 1048576
————————————-
Maximum open file descriptors value needs to be increased to 65536.

Be the first to comment - What do you think?  Posted by jomos - at 5:47 pm

Categories: Linux Administration   Tags: , , ,

Configure cron job in Linux with crontab examples

How to setup cron job in Linux.

1. Minute 0,59
2. Hour 0,23
3. Day of the month 1,31
4. Month of the year 1,12
5. Day of the week (0,6 with 0=Sunday)

Examples

1. Clean up core files every weekday morning at 3:15 am:

15 3 * * 1-5 find $HOME -name core 2>/dev/null | xargs rm -f

2. Mail a birthday greeting:

0 12 14 2 * mailx john%Happy Birthday!%Time for lunch.

3. As an example of specifying the two types of days:

0 0 1,15 * 1
would run a command on the first and fifteenth of each month, as well as on every Monday. To specify days by only one field, the other field should be set to ‘*’ ; for example:

0 0 * * 1

would run a command only on Mondays.

0 0 1,10,15 * * — midnight on 1st ,10th & 15th of month

By default cron jobs sends a email to the user account executing the cronjob. If this is not needed put the following command At the end of the cron job line .

>/dev/null 2>&1

Another example

This will run tar czvf /usr/local/backups/daily/etc.tar.gz /etc at 3:12am every day. The >> /dev/null 2>&1 part means to send any standard output to /dev/null (the linux trash can) and to redirect standard error (2) to the same place as the standard output (1). Basically it runs the command without any output to a terminal etc.

http://www.htmlbasix.com/crontab.shtml

0 12 * * * wget -q http://www.maturenudie.com/thumbs/cgi/cron.cgi >dev/null /* to run cgi */

* /10 * * * * /usr/local/bin/php /home/rnbload/public_html/cronjob.php /*to run php in every 5 minutes*/

Be the first to comment - What do you think?  Posted by ZACH - October 2, 2011 at 10:14 pm

Categories: Linux Administration   Tags: , , , ,

How to mount NFS using ‘autofs’

Mounting NFS using autofs

Autofs uses the automount daemon to manage your mount points by only mounting them dynamically when they are accessed.

Autofs consults the master map configuration file /etc/auto.master to determine which mount points are defined. It then starts an automount process with the appropriate parameters for each mount point. Each line in the master map defines a mount point and a separate map file that defines the file systems to be mounted under this mount point. For example, the /etc/auto.misc file might define mount points in the /misc directory; this relationship would be defined in the /etc/auto.master file.

Each entry in auto.master has three fields. The first field is the mount point. The second field is the location of the map file, and the third field is optional. The third field can contain information such as a timeout value.

For example, to mount the directory /jomlu on the remote machine rock.home.net at the

mount point /misc/nfs_jomlu on your machine, add the following line to auto.master:

/misc /etc/auto.misc –timeout 60

Next, add the following line to /etc/auto.misc:

nfs_jomlu -rw,soft,intr,rsize=8192,wsize=8192 rock.home.net:/jomlu

To start the autofs service, at a shell prompt, type the following command:
/sbin/service autofs restart

Be the first to comment - What do you think?  Posted by jomos - at 10:04 pm

Categories: Linux Administration   Tags: ,