Product SiteDocumentation Site

3.2.5. Installing Over the Internet

All the commands to install packages covered so far assume that you have a local RPM file that you want to install. This is by far the most common case, but you can also use the rpm command to install packages available on a network. With the rpm command, you can get the packages to install by using the FTP or HTTP network protocols.
With the File Transfer Protocol (FTP), the rpm command connects to an FTP file server, downloads the named package, and installs that package. With the HyperText Transfer Protocol (HTTP) used for Web pages, the rpm command connects to a Web server, downloads the named package, and installs that package.

Name Spoofing

When using either FTP or HTTP, you need to provide the name of the remote server. An attack on your system can compromise the system of converting server host names into network addresses, thus spoofing the rpm command into installing a malicious package from the wrong host.

3.2.5.1. Installing Using FTP

The key to making the network protocols work with the rpm command is that you need to create a URL for the remote file name. The basic format of the command follows:
rpm -i ftp://hostname/path/to/file/filename.rpm
Note the use of ftp: in the URL for the file.
For example, the following downloads a package from an IBM FTP server.
rpm -i ftp://www-126.ibm.com/pub/jikes/jikes-1.16-1.src.rpm
Many FTP servers require users to log in. If you do not pass a user name and password on the rpm command line, the rpm command will prompt you for the missing data.
You can add a user name prior to the host name, separating the user name from the host name with an at sign, @. For example:
rpm -i ftp://unclejoe@www-126.ibm.com/pub/jikes/jikes-1.16-1.src.rpm
In this case, the user name is unclejoe.

Credentials are Examples

These examples do not show valid user names or passwords.
With just a user name, the rpm command will prompt you for the password. You can also include the password on the rpm command line. Separate the user name from the password with a colon (:).
For example:
rpm -i ftp://unclejoe:workers@www-126.ibm.com/pub/jikes/jikes-1.16-1.src.rpm
In this case, the user name is unclejoe and the password is workers.