• No se han encontrado resultados

SECCIÓN DÉCIMA SEGUNDA OTROS INGRESOS Y BENEFICIOS

LIC. JOSÉ EDUARDO CALZADA ROVIROSA,

SECCIÓN DÉCIMA SEGUNDA OTROS INGRESOS Y BENEFICIOS

*) echo Invalid entry !!

;;

esac

RPM

Rpm is a powerful Package Manager for Red Hat, Suse and Fedora

Linux. It can be used to build, install, query, verify, update, and remove/erase individual software packages. A Package consists of an archive of files, and package information, including name, version, and description:

The RPM Package Manager

-RPM is a recursive acronym for -RPM Package Manager.

It used to be called the Red Hat Package Manager, but Red Hat changed its name to emphasis that other distributions use it too.

The new official name is RPM Package Manager, and yes, that’s a self-referencing acronym (SRA), just like GNU.

- RPM is the default package manager for Red Hat Linux systems.

- RPM system consists of a local database, the rpm executable, rpm package files.

- It deals with .rpm files, which contain the actual programs as well as various bits of meta-information about the package: what it is, where it came from, version information and info about package dependencies.

- RPMs are the files (called packages) which contain the instal-lable software; typically they have

the .rpm suffix.

RPM FACTS

---1. RPM is free - GPL

RPM is a very versatile program which solves a lot of problems that a distributor of software typically faces:

• Management of source files

• Management of the build process

• A distribution method and format for binary files, including pre- and

postinstall scripts. RPMs can be created by anyone, not only the manufacturer of your distribution.

2. stores info about packages in a database /var/lib/rpm

/var/lib/rpm contains all the database necessary for managing all of the packages installed on your system in the form of rpm

The database stores information about installed packages such as file attributes and package prerequisites.

When a certain system uses RPMs to install packages, a database of installed packages is stored in /var/lib/rpm. The database itself is in rpm format too, so it cannot be read directly. You will have to access the database using the rpm command.

Where to get RPMs

-http://rpmseek.com http://rpmfind.net http://www.redhat.com http://freshrpms.net http://rpm.pbone.net http://dag.wieers.com http://rpmforge.net http://filewatcher.com

b.sadhiq

Common Build Procedures

- source code install - tarball (.tar, .tar.gz, .tgz, tar.bz, tar.tbz)

- Configure/make/make install - Binary RPMs (.rpm)

- Source RPMs (.srpm) Some Query Options

$ rpm -ivh {rpm-file} Install the package

$ rpm -ivh mozilla-mail-1.7.5-17.i586.rpm

$ rpm -ivh --test mozilla-mail-1.7.5-17.i586.rpm

$ rpm -Uvh {rpm-file} Upgrade package

$ rpm -Uvh mozilla-mail-1.7.6-12.i586.rpm

$ rpm -Uvh --test mozilla-mail-1.7.6-12.i586.rpm

$ rpm -Fvh upgrades to a later version

$ rpm -ev {package} Erase/remove/ an installed package

$ rpm -ev mozilla-mail

$ rpm -ev --nodeps {package} Erase/remove/ an installed package without checking for dependencies

$ rpm -ev --nodeps mozilla-mail

$ rpm -qa Display list all installed packages rpm -qa

$ rpm -qa | less

$ rpm -qi {package} Display installed information along with package version and short description

$ rpm -qi mozilla-mail

$ rpm -qf {/path/to/file} Find out what package a file belongs to i.e. find what package owns the file

$ rpm -qf /etc/passwd

$ rpm -qf /bin/bash

$ rpm -qc {pacakge-name} Display list of configuration file(s) for a package

$ rpm -qc httpd

$ rpm -qcf {/path/to/file} Display list of configuration files for a command

$ rpm -qcf /usr/X11R6/bin/xeyes

$ rpm -qa --last Display list of all recently installed RPMs

$ rpm -qa --last

$ rpm -qa --last | less

$ rpm -qpR {.rpm-file}

$ rpm -qR {package} Find out what dependencies a rpm file has

$ rpm -qpR mediawiki-1.4rc1-4.i586.rpm

$ rpm -qR bash

$ rpm -qlp foo.rpm Which files are installed with foo.rpm?

$ rpm -i --prefix /new/directory package.rpm The --prefix and --re-locate options should make the rpm command re--re-locate a package to a new

location.

$ rpm -k <.rpm> we could verify the MD5 is OK

$ rpm --rebuilddb Task

Download xmms-1.2.10-1.i386.rpm & try to install

$ rpm –ivh xmms-1.2.10-1.i386.rpm

Will ask for dependency, Download dep from the given sites above &

install the same.

Download

glib-1.2.10-627.i586.rpm gtk-1.2.10-926.i586.rpm

gtk-32bit-1.2.10-926.x86_64.rpm

b.sadhiq

UserAdministration

Only root (i.e. system administrator)can use adduser command To create new users. It is not allow to other users.

Adduser is symlink of Useradd which is binary in /usr/sbin.

We(root)can

customise adduser by using another word(champu) & make it symlink of useradd.

Let's see

[root@localhost root]$ cd /usr/sbin

[root@localhost sbin]$ ln -s useradd uad Now uad is symlink of useradd.

There are 3 types of users |

__________________|____________________

| | |

Super user System user Normal user

<1> Superuser : At the time of linux installation it is create.

He has right to make other users & his`userid'& `groupid' is zero in `/etc/Passwd' file.

<2> Systemuser: These users create by System. They can't login becoz their shell `sbin/noloin' is default in seventh field in

`/etc/passwd' file.

<3> Normaluser: These users create by superuser.

Let's see how superuser make normaluser : [root@localhost root]$ adduser john

[root@localhost root]$ passwd john Changing password for user john.

New password:(user password)

[root@localhost root]$ userdel john ---> `userdel' command delete only name of the user from

/home directory but it's data remain there. It's /usr/sbin/userdel

[root@localhost root]$ userdel -r john

---->userdel -r delete name of user as well as data.

[root@localhost root]$ usermod -G groupname username i.e.

[root@localhost root]$ usermod -G john eric

---->`usermod -G' command makes the user eric member of the group john. /usr/sbin/usermod.

su ----> with the help of this command root can work as substitute user.

su -r ---->with the help of this command root come out from subtitute user.

The information of adduser refers 2 files & updates 4 files.

Config. files Refers

|----/etc/login.defs

|

|----/etc/default/useradd Updates

|----/etc/passwd

|

|----/etc/group

|

|----/etc/shadow

|

|----/etc/gshadow

b.sadhiq

/etc/login.defs

<1> /etc/login.defs : It keep the information of directory where mailboxes reside or name of file relative to the home directory, Password duration & how many users can login.

"Passwd file" & "Group file" get the information of userid &

groupid from this file.

"shadow file" & "Gshadow file" get the information of user login &

password duration of user from this file.

Min/max values for automatic uid selection in useradd.

UID-MIN 500 UID-MAX 60000

The id of user start from 500 & max it is 60000 which is default according to REDHAT but we can customise it.

If there are two department ACCOUNTANT & MARKETING in one office then I can start userid to ACCOUNTANT from 1000 & to MARKETING from 2000 which is reliable.

Similar way to Groupid GID-MIN 500

GID-MAX 60000

Outline

Documento similar