Download RPM and dependencies from yum repo

Use repotrack-command.

To get repotrack, install yum-utils.

yum install yum-utils


repotrack -p DIR PKG

where DIR is the directory to download rpms and PKG is the actual package you want. Wild card is allowed.

As an example, following command downlads all ncurses-packages and all dependencies to /repo/rpm directory

repotrack -p /repo/rpm ncurses*


Change host name

To temporarily change the host name, use command:


To permanently change the hostname, open file /etc/sysconfig/network. Use, for example, vi-editor:

vi /etc/sysconfig/network 

Find and change following line to your host name (and domain)

save file and restart network service

service network restart

This works in CentOS and Red Hat version 6.x. You may also need to change /etc/hosts file.