Enabling or Adding a Software Repository¶
This section explains how to enable or add a software repository in CentOS, SUSE, and Ubuntu.
CentOS¶
Run the following command to check whether a software repository has been enabled.
yum repolist all
If status is disabled, as shown in Figure 1, no software repository has been enabled. Proceed to the next step.
Run the following command to enable a software repository. This step uses Public-OTC-CentOS-7-Base as an example.
yum-config-manager --enable Public-OTC-CentOS-7-Base
Run the following command to check whether the software repository described in step 2 has been enabled.
yum repolist all
If status is enabled, as shown in Figure 3, the software repository has been enabled.
SUSE¶
Run the following command to check whether a software repository has been enabled.
zypper lr
If no software repository is detected, as shown in Figure 4, proceed to the next step.
Run the following command to add a software repository. This step uses opensuse12.2 as an example.
zypper addrepo http://download.opensuse.org/distribution/12.2/repo/oss/ opensuse-main
Run the following command to update and add software repositories.
zypper refresh
Run the following command to check whether the software repository described in step 2 has been enabled.
zypper lr
If Enabled is Yes, as shown in Figure 7, the software repository has been enabled.
Ubuntu¶
Run the following command to add a software repository.
apt-add-repository http://archive.canonical.com/ubuntu
Run the following command to update and add software repositories.
apt-get update