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

53,545

Solution 1

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

Solution 2

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.

Solution 3

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.

Share:
53,545
quantummind
Author by

quantummind

20+ years of experience in programming, system administration, databases, team leading, project management. What I'm good at: Problem solving Technical architecture planning Knowing many tools and languages (from assembly through c++ to python)

Updated on December 12, 2021

Comments

  • quantummind
    quantummind over 2 years

    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.

    • Costin Gușă
      Costin Gușă over 7 years
      @quantummind did the repo url in the answer marked as answer below work for you? what repos did you end up with in the end?
    • quantummind
      quantummind about 7 years
      @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.
  • Costin Gușă
    Costin Gușă over 7 years
    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?
  • Clerenz
    Clerenz about 7 years
    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.
  • Sully
    Sully almost 6 years
  • activedecay
    activedecay over 3 years
    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.
  • activedecay
    activedecay over 3 years
    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.
  • Kshitij Mathur
    Kshitij Mathur about 3 years
    @activedecay 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.