Chapter 12: Software Installation
Colorado State University
Computer Science Department
Original slides from Dr. James Walden at Northern Kentucky University.
dpkg and APT (advanced package tool)
pkg-add packaging system
portage with emerge command
installpkg manages .tgz files
rpm packaging system.
rpm
src, RPM contains source code for building the package.
cpio archive compressed with gzip.
rpm2cpio to obtain cpio archive.
> rpm -Uvh foo-1.0-1.i386.rpm
Preparing... ############################## [100%]
1:foo ############################## [100%]
> rpm -Uvh foo-1.0-1.i386.rpm
Preparing... ################################ [100%]
1:foo ################################ [100%]
Completely removes package from system.
> rpm -e foo-1.0-1
> rpm -q foo
package foo is not installed.
# rpm -e setup
error: Failed dependencies:
setup is needed by (installed) basesystem-8.0-1
setup >= 2.0.3 is needed by (installed)
initscripts-6.95-1
setup >= 2.5.4-1 is needed by (installed)
filesystem-2.1.6-5
setup is needed by (installed) xinetd-2.3.7-2
setup is needed by (installed) dump-0.4b28-4
# rpm -q setup
setup-2.5.20-1
up2date, yum
rpm: /etc/sysconfig/rhn/sources
yum: /var/cache/yum
--prefix: install in new location.
rpm --prefix /usr/local -Uvh *.rpm
--oldpackage: revert to an older version
rpm --oldpackage -Uvh foo-0.9-2.i386.rpm
--force allows overwriting of files/packages.
--nodeps allows install w/o dependency check.
--test) discovers common errors:
--root /tmp) changes fs root.
chroot() environment.
# rpm -q telnet
telnet-0.17-31.EL4.3
# rpm -ql telnet
/usr/bin/telnet
/usr/share/man/man1/telnet.1.gz
# rpm -qi telnet
Name : telnet Relocations: (not)
Version : 0.17 Vendor: CentOS
Release : 31.EL4.3 Build Date: Tue 14 Jun 2005
Install Date: Sat 11 Feb 2006 Build Host: build5
Group : Applications/Internet Src RPM: telnet-0.17.src.rpm
Size : 87254 License: BSD
Signature : DSA/SHA1, Tue 14 Jun 2005, Key ID a53d0bab443e1821
Packager : Johnny Hughes <johnny@centos.org>
Summary : Client program for telnet remote login protocol.
Description :
Telnet is a popular protocol for logging into remote systems over the
Internet. The telnet package provides a command line telnet client.
# rpm -qc bash
/etc/skel/.bash_logout
/etc/skel/.bash_profile
/etc/skel/.bashrc
# rpm -qd sendmail
/usr/share/man/man1/mailq.sendmail.1.gz
/usr/share/man/man1/newaliases.sendmail.1.gz
/usr/share/man/man5/aliases.sendmail.5.gz
/usr/share/man/man8/mailstats.8.gz
/usr/share/man/man8/makemap.8.gz
/usr/share/man/man8/praliases.8.gz
/usr/share/man/man8/rmail.8.gz
/usr/share/man/man8/sendmail.sendmail.8.gz
/usr/share/man/man8/smrsh.8.gz
# rpm -qa | grep telnet
telnet-0.17-31.EL4.3
# rpm -qa | grep py
python-2.3.4-14.1
pyOpenSSL-0.6-1.p23
rpm-python-4.3.3-11_nonptl
pygtk2-2.4.0-1
python-devel-2.3.4-14.1
python-ldap-2.0.1-2
pyxf86config-0.3.19-1
libxml2-python-2.6.16-6
python-elementtree-1.2.6-4
python-sqlite-1.1.6-1
dbus-python-0.22-12.EL.5
pyparted-1.6.8-2
python-urlgrabber-2.9.6-2
# rpm -qf /usr/bin/telnet
telnet-0.17-31.EL4.3
# rpm -qf /etc/security/limits.conf
pam-0.77-66.11
-p to any query to apply it to a .rpm file instead of to
an installed package.
# rpm -V telnet
# rpm -V telnet-server
missing c /etc/xinetd.d/telnet
missing /usr/sbin/in.telnetd
missing d /usr/share/man/man5/issue.5.gz
Most free software uses autoconf:
$ tar zxf software_package
$ cd software_package
$ patch <../package.patch
$ ./configure
$ make
$ su
# make install
rpm -ivh foo-1.0-2.src.rpm
cd /usr/src/redhat
SOURCES: Contains archive of sources + patches.
SPEC: SPEC files describe how to build RPMs.
BUILD: The actual build takes place here.
RPMS: Binary RPMs stored under arch subdirs.
SRPMS: Source RPMs stored here.
rpmbuild to build the RPMs.
rpmbuild -ba SPECS/foo.spec
ls -l RPMS
ls -l SRPMS
rpm -qi shows you.
# yum install postgresql.x86_64
Resolving Dependencies
Install 2 Package(s)
Is this ok [y/N]: y
Package(s) data still to download: 3.0 M
(1/2): postgresql-9.0.4-5.fc15.x86_64.rpm | 2.8 MB 00:11
(2/2): postgresql-libs-9.0.4-5.fc15.x86_64.rpm | 203 kB 00:00
------------------------------------------------------------
Total 241 kB/s | 3.0 MB 00:12
Running Transaction
Installing : postgresql-libs-9.0.4-5.fc15.x86_64 1/2
Installing : postgresql-9.0.4-5.fc15.x86_64 2/2
# yum remove postgresql.x86_64
Resolving Dependencies
---> Package postgresql.x86_64 0:9.0.4-5.fc15 will be erased
Is this ok [y/N]: y
Running Transaction
Erasing : postgresql-9.0.4-5.fc15.x86_64 1/1
Removed:
postgresql.x86_64 0:9.0.4-5.fc15
# yum info samba-common.i686
Available Packages
Name : samba-common
Arch : i686
Epoch : 1
Version : 3.5.11
Release : 71.fc15.1
Size : 9.9 M
Repo : updates
Summary : Files used by Samba servers and clients
URL : http://www.samba.org/
License : GPLv3+ and LGPLv3+
Description : Samba-common provides files necessary for both the
server and client packages of Samba.
# yum update postgresql.x86_64 // update package
# yum list | less // list packages
# yum search firefox // search packages
Loaded plugins: langpacks, presto, refresh-packagekit
============== N/S Matched: firefox ======================
firefox.x86_64 : Mozilla Firefox Web browser
gnome-do-plugins-firefox.x86_64 : gnome plugins for firefox
mozilla-firetray-firefox.x86_64 : System tray for firefox
mozilla-adblockplus.noarch : Adblocking extension for Firefox
mozilla-noscript.noarch : JavaScript list extension for Firefox
Name and summary matches only, use "search all" for everything.
|
Modified: 2013-09-17T20:36 User: Guest Check: HTML CSSEdit History Source |
Apply to CSU |
Contact CSU |
Disclaimer |
Equal Opportunity Colorado State University, Fort Collins, CO 80523 USA © 2015 Colorado State University |
|