1 / 14

Installation of packages

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

coby-riley
Download Presentation

Installation of packages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. 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 SuSE 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 SuSE packet • Most common for SuSE precompiled applications

  3. Where To Get Commonly Used RPMs • RPMs On Your Installation CDs • You find all .rpm files in /suse/i386/9.3/suse on CD1-5 • mount /dev/cdrom or install automount • RPMs Downloaded From SuSE 9.3 • http://ftp.suse.com/pub/suse/i386/9.3/suse/i586/ • ftp://ftp.suse.com/pub/suse/i386/9.3/suse/i586 • http://ftp.suse.com/pub/suse/i386/9.3/suse/noarch Note that you can download i686 and x86_64 as well! • RPMs Downloaded From SuSE 10.0 • http://ftp.opensuse.org/pub/opensuse/distribution/SL-OSS-stable/inst-source/suse/i586/ • Note that you can download i686 and x86_64 as well! • Also look in ”noarch” directory if searching for something • Other places for RPM’s • http://rpmfind.net/ • ftp://ftp.sunet.se

  4. Autofs on! • Activate automount of CD rom for ease use. • Usally it is already there, this is how you can check: • You can then ensure that it runs when the system boots using the chkconfig command. • There are two automount configuration files in /etc • auto.master • auto.misc • Restart autofs # rpm -qa | grep autofs autofs-x.x.x-xx # chkconfig autofs on /misc       /etc/auto.misc     --timeout 60 cdrom -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom # /etc/init.d/autofs restart

  5. Getting RPMs Using Web Based FTP • from Open SuSE site http://ftp.opensuse.org/ • Use your web browser to go to theSuSE link above • Go to the /pub/opensuse/distribution/SL-OSS-stable/inst-source/suse/noarch/ -directory • Click on the ulimit-1.1-134.noarch.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 SuSE • 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://ftp.opensuse.org/pub/opensuse/distribution/SL-OSS-stable/inst-source/suse/noarch/ulimit-1.1-134.noarch.rpm

  6. Getting RPMs Using Anonymous FTP • Open ftp.suse.com • Download your rpm’s • Here we used mget to download several files at same time # ftp ftp.suse.com ftp> cd pub/suse/i386/9.3/suse/i586 ftp> ls clam* ftp> ls clam* 227 Entering Passive Mode (195,135,221,132,54,181) 150 Listing -rw-r--r-- 1 ftp ftp 905426 Jun 01 13:35 clamav-0.85.1-1.1.i586.rpm -rw-r--r-- 1 ftp ftp 2183851 Jun 01 13:35 clamav-db-0.85.1-1.1.i586.rpm -rw-r--r-- 1 ftp ftp 516505 Mar 19 2005 clamav-debuginfo-0.83-4.i586.rpm 226 Directory send OK. ftp> mget clam* . . . . # by

  7. How To Manually Install RPMs • Installing Downloaded rpm-Files & from CDROM INSTALLING # rpm -ivh ulimit-1.1-134.noarch.rpm # rpm-ivh clamav-0.85.1-1.1.i586.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 clamav-db-0.85.1-1.1.i586.rpm -U = Update UNINSTALLING # rpm -e clamav -would remove the package named clamav -e = erase

  8. How To Manually Install RPMs from NET • Installing rpm-Files from the net FTP Anonymous passwords: # rpm –ivh ftp://www.linux.tucows.com/pub/SuSE/foo.rpm FTP Non anonymous: # rpm -ivh ftp://yahoo@ftp.linux.tucows.com/put/SuSE/foo.rpm password: HTTP # rpm -ivh http://www.linux.tucows.com/pub/SuSE/foo.rpm

  9. More RPM afterwork and checkouts • Test install before real install Update test # rpm -Uvh –test clamav-db-0.85.1-1.1.i586.rpm Install test # rpm -ivh --test clamav-0.85.1-1.1.i586.rpm QUERY EXACT # rpm -q ulimit -show package version and if it is installed VERIFY # rpm –verify samba-3.0.13-1.1 -installed package status (as most unix commands,this will only show you results if there are) IS INSTALLED # rpm -qa | grep samba -grep all that begins with samba LISTING FILES # rpm -qpl clamav-0.85.1-1.1.i586.rpm -show all files stoved in rpm package

  10. How to Install Source RPMs • 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 src/ • In order to make your application, you need to compile: • Installing compiled SRPMS • SuSE 9.3 keeps its SRPMS files • In: /suse/i386/9.3/suse/src • Built SRPMS is in /usr/src/packages directories: BUILD RPMS SOURCES SPECS SRPMS # rpmbuild --rebuild application.src.rpm . . . # cd /usr/src/packages/RPMS/i586 # rpm –ivh application.rpm

  11. Creating RPM’S • Uses a special rpm script language, similar to shellscript • RPMS must be created on a stock revision of SuSE • Because it must be based on standard libraries and kernels • In order to be licensed and accepted by SuSE • Much more ease of supporting endusers who make installations • Not needed in isolated homogenus enviroments • RPMS are based on ”tar-balls” & cpio • Add a user called rpm • Place your tar ball in /usr/suse/SOURCE or ~rpm/SOURCE • To begin create a ”spec” file in /usr/src • Spec file describes vendor, package structure, patches and much more • Create your RPMS • You will get RPMS SRPMS and TGZ/BZ2 files for mass installation • All files reside in /usr/suse • Create your RPM with rpm -v -ba rpmtests-v1.0.spec

  12. 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 application make uninstall

  13. Creating simplyfied TAR-balls f. deploy • Prepare your binary tree • Populate application binaries in stock SuSE • Create nessesary catalogs in stock SuSE • Backup your binary tree • tar cvfz bin/myapp etc/myapp.conf • Write some INSTALLATION and HOWTO’s for installer • Write ./configure and basic Makefile or other installation script • Scripts can be more or less complicated. They must be able to: • Check if application is installed • Update old installed versions • Cleanup after installation or uninstallations • Install dependencies or at least tell installer • This you usally bake inside ./configure that prepare the Makefile

  14. 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 SuSE • 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

More Related