Installation of packages Objectives Using software packaging tools
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
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 Red. Hat version Is dependent of plateform ie. I 386 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 Red. Hat precompiled applications
Where To Get Commonly Used RPMs • RPMs On Your Installation CDs – You find all. rpm files in /Red. Hat/RPMS on CD 1 -3 – mount /dev/cdrom or install automount • RPMs Downloaded From Red. Hat 9 ”Shrike” – http: //ftp. redhat. com/pub/redhat/linux/9/en/os/i 386/Red. Hat/RPMS/ – ftp: //ftp. redhat. com/pub/redhat/linux/9/en/os/i 386/Red. Hat/RPMS/ • Other places for RPM’s – http: //rpmfind. net/ – ftp: //ftp. sunet. se
Getting RPMs Using Web Based FTP • from Red. Hat site – – Use your web browser to go to the Red. Hat link above Go to the /pub/redhat/linux/9/en/os/i 386/Red. Hat/RPMS/ -directory Click on the openldap-clients-2. 0. 27 -8. i 386. 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
Getting RPMs Using Anonymous FTP • Open ftp. redhat. com # cd /pub/redhat/linux/9/en/os/i 386/Red. Hat/RPMS # ls openldap* 200 PORT command OK. 150 Here comes the directory listing. openldap-2. 0. 27 -8. i 386. rpm openldap-clients-2. 0. 27 -8. i 386. rpm openldap-devel-2. 0. 27 -8. i 386. rpm openldap-servers-2. 0. 27 -8. i 386. rpm 226 Directory send OK. # mget openldap*. . # by • Download your rpm’s – Here we used mget to download several files at same time
How To Manually Install RPMs • Installing Downloaded rpm-Files & from CDROM INSTALLING # 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
How To Manually Install RPMs from NET • Installing rpm-Files from the net FTP Anonymous passwords: # rpm -ivh ftp: //ftp. linux. tucows. com/pub/Red. Hat/foo. rpm FTP Non anonymous: # rpm -ivh ftp: //yahoo@ftp. linux. tucows. com/put/Red. Hat/foo. rpm HTTP # rpm -ivh http: //www. linux. tucows. com/pub/Red. Hat/foo. rpm
More RPM afterwork and checkouts • Test install before real install Update 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. 0 pl 1 -23. i 386. rpm. show all files stoved in rpm package
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: # rpmbuild --rebuild application. src. rpm. . . • Installing compiled SRPMS # cd /usr/src/redhat/RPMS/i 386 # rpm –ivh application. rpm • Red. Hat keeps its SRPMS files – In: /usr/src/redhat/
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 test • Install application – If application is binary, you sometimes just run. /install or similar – make install or. /install • Uninstall application make uninstall
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 Red. Hat • pkgtool – Slackware package manager • rpm 2 cpio – Extract cpio archive from RPM Package Manager (RPM) package • rpm 2 tgz/rpm 2 targz – Mainly supposed for slackware – Extract tar archive from RPM Package Manager (RPM) package
- Slides: 11