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

4

10

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.

Tedium answered 15/4, 2016 at 4:40 Comment(2)
@Tedium did the repo url in the answer marked as answer below work for you? what repos did you end up with in the end?Organography
@Costin Gușă Sorry, the question was long time ago. I don't work with that any more. I ended up not to use SLES if not needed. It was awful. The sysadmin also could not help with up-to-date packages. New packages and how-to docs seemed to be not available for SLES.Tedium
M
21

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
Metalepsis answered 24/8, 2016 at 10:9 Comment(3)
the link you provided states that "These are the official openSUSE repositories" - are you 100% sure that link is also default for SLES (Suse Linux Enterprise Server) that op has asked?Organography
Actually the official information on suse.com is not very good and you won't find any URLs for that. For me the URL from the post worked very well.Metalepsis
This answer works great when you have a SLES server but do not want to register the server with SLES repositories. OpenSUSE repositories work just as well.Contrecoup
U
9

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:

https://updates.suse.com/repo/$RCE/SLES11-SP4-Pool/sle-11-ia64

The repos listed in the other answer are not the official SLES repos.

Untouched answered 27/7, 2017 at 6:42 Comment(2)
can also be done with autoyast suse.com/documentation/sles-12/book_autoyast/data/…Shopworn
user1177071 refers to this answer by Clerenz as non-official. They are provided by openSuse - that other answer explains the difference.Noddle
F
1

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.

Fugere answered 25/9, 2020 at 7:3 Comment(2)
Why would the OpenSUSE repos not work as well as SLES? The accepted answer seems to work fine, and as far as I can tell OpenSUSE is almost the same content though it may not have the same support as SLES.Contrecoup
@Contrecoup If it works for you - good. But I work on enterprise solutions and had few terrible experiences using openSuSE repos in SLES. Generally companies would buy licenses of SLES which includes complete support from SuSE. So I suggest using SLES repos if available.Fugere
W
0

I found out that in YaST2 you can add following repository for accessing packages of SLES 11:

https://nu.novell.com/repo/$RCE/SLES11-SP4-Pool/sle-11-x86_64

Change "SP4" if you have a different SP.

When asked for credentials insert the ones you can find on SUSE Customer Center > Organization > Organization Credentials.

I don't know if you need to register your SLES or not for this to work (I did it).

Waadt answered 28/2, 2018 at 15:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.