Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it posssible to add default repository/repositories to SLES when the original repository is unavailable?

I've got a SLES server installed by someone who is not available. I've checked /etc/zypp/repos.d , there is a repo file SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109.repo

It's content is:

[SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109]
name=SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109
enabled=1
autorefresh=0
baseurl=cd:///?devices=/dev/sr0
path=/
type=yast2
keeppackages=0

The CD repository (/dev/sr0) is not available.

I would like to add default net repository/repositories to it (such as e.g. this, which zypper puts to /etc/zypp/repos.d). However after searching a lot, I could not find how to do that. I know how to add a repository, but I don't know how to add default repositories.

Could you please provide a zypper addrepo/zypper ar command for these?

EDIT: This question can be applied generically to any version of SLES, not just for SLES 11 SP4 as when it was originally asked.

like image 611
quantummind Avatar asked Apr 15 '16 04:04

quantummind


3 Answers

The "default" repositories of suse are listed here. I guess you might at least want to add Official Repositories > OSS.

zypper addrepo http://download.opensuse.org/distribution/11.4/repo/oss/ oss
like image 189
Clerenz Avatar answered Oct 25 '22 13:10

Clerenz


For SLES, you simply register the server:

suse_register -a regcode-sles=yourRegistrationCode -a [email protected] -L /root/.suse_register.log

Then, the repos will be added automatically. You can also log into your account here and click on Base and Extension Products. I will give you one of the URLs I see there, but it will be useless to you because the repos require authentication before you can connect and also because I'm using the Itanium version. Here is an example repo.

The repos listed in this other answer by Clerenz are not the official SLES repos, but only openSUSE repos. The difference is explained in this answer.

like image 42
user1177071 Avatar answered Oct 25 '22 11:10

user1177071


From How to add SLES repository on SLES server:

Repositories are added to SLES automatically when a system is registered to the SUSE Customer Center (SCC), SUSE Manager, or SMT/RMT. If you need to manually add a repository or iso as a repository:

Please make sure to have the SLES ISO or DVD to add as a repository to the server.

  1. Launch YaST | Software | Software Repositories
  2. Select Add
  3. Select Media Type and press Next
  4. Browse to the ISO or insert the DVD and press Next
  5. Finish adding the repository, and close YaST

Explanation See the cd:///?devices=/dev/sr0 - it means zypper is looking for repo from virtual cd (mounted ISO). Mount it again and zypper will be good. FYI, you can use yast2 utility to add/remove repos from ISO into zypper configuration.

I suggest to not use openSuSE (suggested by accepted answer) as that is a freely distributed OS while SLES is developed by SuSE on top of openSuSE. So all packages from the repos of openSUSE may not work very well with the SLES.

like image 25
Kshitij Mathur Avatar answered Oct 25 '22 13:10

Kshitij Mathur