Installation of packages Objectives –Using software packaging tools Contents –Application...

11
Installation of packages Objectives Using software packaging tools Contents Application delivered as Where to get commonly used rpm’s Autofs on! Getting RPM from WEB/FTP Manually install from disk/net Installing SRPMS Creating RPMS Managing RPM’s Managing tar-balls Apt-get Practical none Summary

Transcript of Installation of packages Objectives –Using software packaging tools Contents –Application...

Page 1: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

Installation of packages

• Objectives– Using software packaging tools

• Contents– Application delivered as

– Where to get commonly used rpm’s

– Autofs on!

– Getting RPM from WEB/FTP

– Manually install from disk/net

– Installing SRPMS

– Creating RPMS

– Managing RPM’s

– Managing tar-balls

– Apt-get

• Practical– none

• Summary

Page 2: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

Application delivered as

• Binaries– Application comes precompiled

– Can be dependent of other libraries, dynamic built.

– Can be undependent of other libraries, static built.

– Is dependent on RedHat version

– Is dependent of plateform ie. I386 architecture or sparc

• Sourcecode– Application comes as open c/c++ -source code

– You need to have development enviroment installed ie. gcc

– Is undependent of plateform

• And is stoved in ”tar-balls”– Application is zipped togeather with tar (tape archive record)

– Most common for 3:party and application in sourcecode

• And is stoved in ”rpm’s”– Application is packaged in special redhat packet

– Most common for RedHat precompiled applications

Page 3: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

Where To Get Commonly Used RPMs

• RPMs On Your Installation CDs– You find all .rpm files in /RedHat/RPMS on CD1-3

– mount /dev/cdrom or install automount

• RPMs Downloaded From RedHat 9 ”Shrike”– http://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/

– ftp://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/

• Other places for RPM’s– http://rpmfind.net/

– ftp://ftp.sunet.se

Page 4: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

Getting RPMs Using Web Based FTP

• from RedHat site– Use your web browser to go to the RedHat link above

– Go to the /pub/redhat/linux/9/en/os/i386/RedHat/RPMS/ -directory

– Click on the openldap-clients-2.0.27-8.i386.rpm link

– Save the file to your hard drive

• from RPM find site– Go to the rpmfind link above

– Type in ”openldap" in the search box

– Click the search button

– Scroll down for the RPM that matches your version of Fedora

– The right hand column has the links with the actual names of the rpm files

– Click the link

– Save the file to Linux box's hard drive

• With wget# wget http://some.server.com/RPMS/application.rpm# wget http://some.server.com/RPMS/application.rpm

Page 5: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

Getting RPMs Using Anonymous FTP

• Open ftp.redhat.com

• Download your rpm’s– Here we used mget to download several files at same time

# ftp ftp.redhat.com

# cd /pub/redhat/linux/9/en/os/i386/RedHat/RPMS

# ls openldap*

200 PORT command OK.

150 Here comes the directory listing.

openldap-2.0.27-8.i386.rpm

openldap-clients-2.0.27-8.i386.rpm

openldap-devel-2.0.27-8.i386.rpm

openldap-servers-2.0.27-8.i386.rpm

226 Directory send OK.

# mget openldap*

. . . .

# by

# ftp ftp.redhat.com

# cd /pub/redhat/linux/9/en/os/i386/RedHat/RPMS

# ls openldap*

200 PORT command OK.

150 Here comes the directory listing.

openldap-2.0.27-8.i386.rpm

openldap-clients-2.0.27-8.i386.rpm

openldap-devel-2.0.27-8.i386.rpm

openldap-servers-2.0.27-8.i386.rpm

226 Directory send OK.

# mget openldap*

. . . .

# by

Page 6: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

How To Manually Install RPMs

• Installing Downloaded rpm-Files & from CDROMINSTALLING

# rpm -ivh foo-2.12.rpm

-i = Specifies installation as the action to be taken.

-v = Will display additional information while installing.

-h = Prints 50 hash marks (#) as installation progresses.

UPDATING

# rpm -Uvh filename.rpm

-U = Update

UPDATING WHEN DEPENDENCIES FAIL ABOVE

-nodeps = Ignode dependencies temporary while updating

# rpm –Uvh –nodeps filename.rpm

UNINSTALLING

# rpm -e gpm -would remove the package named gpm

Page 7: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

How To Manually Install RPMs from NET

• Installing rpm-Files from the net

FTP Anonymous passwords:

# rpm -ivh ftp://ftp.linux.tucows.com/pub/RedHat/foo.rpm

FTP Non anonymous:

# rpm -ivh ftp://[email protected]/put/RedHat/foo.rpm

HTTP

# rpm -ivh http://www.linux.tucows.com/pub/RedHat/foo.rpm

Page 8: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

More RPM afterwork and checkouts

• Test install before real installUpdate test

# rpm -Uvh –test application.rpm

Install test

# rpm -ivh --test application.rpm

QUERY EXACT

# rpm -q samba -show package version and if it is installed

VERIFY

# rpm –verify samba-2.0.6-62 -installed package status

IS INSTALLED

# rpm -qa | grep samba -grep all that begins with samba

LISTING FILES

# rpm -qpl dhcp-3.0pl1-23.i386.rpm .show all files stoved in rpm package

Page 9: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

How to Install Source RPMs, newer RH

• Usually installed using a supplier-produced scripts– You have to download them or get them from CD-roms

– Files lastnames are .src.rpm

– They are usally found in a catalog called SRPMS/

– In order to make your application, you need to compile:

• Installing compiled SRPMS

• RedHat keeps its SRPMS files– In: /usr/src/redhat/

# rpmbuild --rebuild application.src.rpm

. . .

# rpmbuild --rebuild application.src.rpm

. . .

# cd /usr/src/redhat/RPMS/i386

# rpm –ivh application.rpm

# cd /usr/src/redhat/RPMS/i386

# rpm –ivh application.rpm

Page 10: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

Install/Uninstall TAR-balls

• Unpacking TAR package application– tar xvfz application.tar.gz

• Preconfigure application– cd application

– Read the INSTALLATION and HOWTO’s

– ./configure or make config

• Compile application– Make is sometimes not needed if application is binary

– make

– make test

• Install application– If application is binary, you sometimes just run ./install or similar

– make install or ./install

• Uninstall applicationmake uninstall

Page 11: Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.

Other installation/uninstall tools

• APT– Debian tool for updating and installing application and system

components– # apt-get [options] install package [package ...]

– There options [update|check|install|upgrade|remove]

– Also available for RedHat

• pkgtool– Slackware package manager

• rpm2cpio– Extract cpio archive from RPM Package Manager (RPM) package

• rpm2tgz/rpm2targz– Mainly supposed for slackware

– Extract tar archive from RPM Package Manager (RPM) package