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

≡放荡痞女 提交于 2020-12-24 23:55:53

问题


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 however after searching a lot for 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 zypper addrepo command for them?

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


回答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



回答2:


For SLES, you simply register the server:

suse_register -a regcode-sles=yourRegistrationCode -a email=you@email.com -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.




回答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.




回答4:


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).



来源:https://stackoverflow.com/questions/36638390/is-it-posssible-to-add-default-repository-repositories-to-sles-when-the-original

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!