当原始存储库不可用时,是否可以将默认 repository/repositories 添加到 SLES?

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

我有一个不可用的人安装了 SLES 服务器。 我检查了 /etc/zypp/repos.d ,有一个回购文件 SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109.repo

内容是:

[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

CD 存储库 (/dev/sr0) 不可用。

我想向其中添加默认网络 repository/repositories(例如 e.g. thiszypper 放入 /etc/zypp/repos.d)。但是经过大量搜索后,我找不到该怎么做。 我知道如何添加存储库,但我不知道如何添加默认存储库。

能否为这些提供 zypper addrepo/zypper ar 命令?

编辑: 这个问题一般适用于任何版本的 SLES,而不仅仅是 SLES 11 SP4问。

列出了 "default" 个 suse 存储库 here。我想您可能至少想要添加 Official Repositories > OSS。

zypper addrepo http://download.opensuse.org/distribution/11.4/repo/oss/ oss

对于 SLES,您只需注册服务器:

suse_register -a regcode-sles=yourRegistrationCode -a email=you@email.com -L /root/.suse_register.log

然后,repos 将自动添加。您也可以登录您的帐户 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.

are not the official SLES repos, but only openSUSE repos. The difference is explained 中列出的存储库。

我发现在 YaST2 中您可以添加以下存储库以访问 SLES 11 的包:

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

如果您有不同的 SP,请更改 "SP4"。

当要求提供凭据时,请插入您可以在 SUSE Customer Center > 组织 > 组织凭据中找到的凭据。

我不知道你是否需要注册你的 SLES 才能工作(我做到了)。

来自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

说明 请参阅 cd:///?devices=/dev/sr0 - 这意味着 zypper 正在从虚拟 cd(安装的 ISO)中寻找 repo。再挂载一下,zypper 就好了。仅供参考,您可以使用 yast2 实用程序 add/remove 从 ISO 重新定位到 zypper 配置。

我建议不要使用 openSuSE(已接受的答案建议),因为它是免费分发的 OS,而 SLES 是由 SuSE 在 openSuSE 之上开发的。所以来自 openSUSE repos 的所有软件包可能无法很好地与 SLES 一起工作。