• Aucun résultat trouvé

Table 3-8 alien Options

Dans le document Practice on state- of-the-art test- (Page 170-178)

The options for alienare shown in Table 3-8.

Table 3-8 alien Options

Option Alternate Purpose

-d --to-deb The default. Tells alien to create a .deb package

--patch=<filename> Only used with -d. Specifies the patch file to use.

--nopatch Only used with -d. Specifies that no patch file should be used.

-r --to-rpm Creates an RPM package.

-t --to-tgz Creates a Slackware .tgzpackage.

--to-slp Creates a Stampede package.

-i --install Installs the package after creation.

-g --generate Unpacks the package, but does not generate a new one.

Continued Objective

Table 3-8 (continued)

Option Alternate Purpose

-s --single Does the same as -g, but does not create the .origdirectory.

-c --scripts Includes scripts in the new package.

-k --keep-version Does not change the version of the generated package.

--description= Sets the package’s description.

-h --help Shows the help options.

-v --version Shows the version of alien.

For example, to convert the wgetpackage to a .debfile, you would use the follow-ing command:

cp -a `ls |grep -v debian` debian/tmp dh_installdocs

Now the new .debfile is available for install.

alienis used to convert packages from one type to another.

Key Point Summary

Packaging systems have come a long way in Linux and are a great timesaver for users and administrators. The different packaging systems may seem very different at first but share many similar processes and ideas. The key for the exam is remem-bering which system uses which tools and how those tools relate to one another.

✦Tarball files contain only the source code or files needed for an application.

✦The ./configurescript generates a Makefiletuned for the system it was run on.

Makefilesmay need to be edited to add additional Include directories.

✦Source code is compiled using the makeand make installcommands.

✦RPM is used on many different Linux distributions and was created by Red Hat.

✦The main tool for use with RPM is rpm.

✦The common rpmcommands are as follows:

• To install a package use rpm -Ior rpm --install

• To remove a package use rpm -eor rpm --uninstall

• To upgrade a package use rpm -Uor rpm --upgrade

• To query the database use rpm -qor rpm --query

• To rebuild the RPM database use rpm --rebuilddb

✦The Debian distribution and its variants use the dpkgtool for low-level processing.

✦The common dpkgcommands are as follows:

• To install a package use dpkg -Ior dpkg --install

• To remove a package use dpkg -ror dpkg --remove

• To purge a package use dpkg -Por dpkg --purge

dselectprovides an easy to use interface for dpkg. Exam Tip

apt-getautomatically retrieves requested packages and their dependencies.

apt-get’s sources are configured via the /etc/apt/sources.listfile.

alienis used to convert packages to different types.

✦ ✦ ✦

STUDY GUIDE

The following questions and exercises will allow you to review the information cov-ered in this chapter. Take your time when completing this section of the chapter, carefully reviewing any questions that you may have. Answering the question cor-rectly is not as important as understanding the answer, so review any material that you might still be unsure of. Being comfortable with the questions and answers pre-sented here will help you be more prepared for the certification exam questions.

Assessment Questions

1.Which script generates a Makefilefor your specific system?

A../gen B../genmake C../configure D../config

2.Which command installs compiled software?

A.make B../install C.make setup D.make install

3.Which packaging system does Red Hat use?

A.rpm B.deb C.tgz D.rhp

4.Which rpmoption is used when you receive strange errors when installing packages, suggesting rpmdatabase corruption?

A.rpm --fixdb B.rpm --rebuilddb C.rpm --updatedb D.rpm --regendb

5.Which methods does RPM support to check package integrity? (Select all that apply.)

A.MD5 B.3DES C.PGP D.GnuPG

6.The command _____________________ would be entered to install the package named processor-4.2.i386.rpm.

7.Which tool is used to update the ld.so.cachefile?

A.ldcache B.ldupdate C.ldconf D.ldconfig

8.Which linking method creates smaller executable files?

A.Dynamic B.Unlinked C.Variable D.Static

9.Which command(s) is/are used to remove an RPM package?

A.rpm --uninstall <packagename>

B.rpm --remove <packagename>

C.rpm -e <packagename>

D.rpm -u <packagename>

10.Which file specifies how an RPM source package is compiled?

A.Makefile B.specfile C.configfile D..conffile

11.Which tool is used to convert packages from one system to another?

A.alien B.dpkg C.apt D.Pconvert

12.Which command is used to install a Debian package?

A.apt --install <packagename>

B.dpkg --install <packagename>

C.apt-get -I <packagename>

D.rpm -i <packagename>

13.Which command removes a Debian package, including its configuration files?

A.dpkg --remove <packagename>

B.dpkg -e <packagename>

C.apt-get purge <packagename>

D.dpkg -P <packagename>

14.Which tool provides an easy-to-use interface to access Debian package management?

A.dselect B.apt-get C.dpkg D.gnorpm

15.To change the sources for apt-get, the ________ file is edited.

A.sources.list B.apt.sources C.sources.apt D.dpkg.sources

16.Which apt-getparameter updates the available package database?

A.upgrade B.refresh C.reload D.update

17.The apt-gettool supports which of the following sources? (Select all that apply.)

A. FTP B.HTTP C.NFS D.CD-ROM

18.Which command clears old packages from the Debian archives?

A.dpkg -clean B.apt-get autoclean C.dpkg -autoclean D.dselect

19.aliensupports which of the following package formats? (Select all that apply.)

A.RPM B..deb C.BSD D..tgz

20.Which command converts an RPM package to Debian format?

A.alien -r package.rpm B.alien -t package.rpm C.alien -d package.deb D.alien -d package.rpm

Scenarios

1.You have found a new software package you want to install on your Debian system. The problem is that it is distributed only in source code and RPM for-mat. What is the best option to install this package on your system?

2.Red Hat has released a new version of the RPM system. You install the new version on your system, but now when you try to install a package, you receive an error stating that dependency packages are not installed. You know that you installed these packages before the upgrade, but they no longer show up. What steps could you go through to fix this problem?

Lab Exercises

The following labs allow you to exercise some of the commands learned in this chapter. These are only a few examples. The key to learning all of the commands and tools is experience. Work through installing several packages and create depen-dency problems to work through.

Dans le document Practice on state- of-the-art test- (Page 170-178)

Documents relatifs