Book Image

Troubleshooting CentOS

By : Jonathan Hobson
Book Image

Troubleshooting CentOS

By: Jonathan Hobson

Overview of this book

Table of Contents (17 chapters)
Troubleshooting CentOS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Downloading an RPM package with Yum


If there is ever an occasion where you need to download a package but not install it, then this can be achieved with Yum. However, to begin this process, you need to ensure that your system maintains the following utility:

# yum install yum-plugin-downloadonly

In most cases, it may already be installed (as it forms part of the yum-utils package mentioned previously), but having completed this task (or confirmed that it is already present), you can simply download the required package to a directory of your choice by customizing the following command:

# yum install <package_name> --downloadonly --downloaddir=/path/to/folder

For example, and to make sense of the the preceding command, you can download Samba and all of its dependencies to a user-based directory by typing:

# yum install samba --downloadonly --downloaddir=/home/username

Alternatively, you can also invoke the following variation, although this version of the command will assume that the...