我是靠谱客的博主 畅快鲜花,最近开发中收集的这篇文章主要介绍How To Create A Local Repository For SUSE Linux,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

原文地址:http://candon123.blog.51cto.com/704299/1009294/

 

As you know,you can use the yum command to install packages on redhat linux.It's a powerful tool than it can resolve the package dependence.But in suse,you can also do it easily by zypper command.Before,you must know how to create the packages repository.

By default,the SUSE linux dvd as the default repository,you can check it by following command:

suse:~ # zypper repos 
# | Alias       | Name        | Enabled | Refresh 
--+-------------+-------------+---------+-------- 
1 | SUSE-11-SP2 | SUSE-11-SP2 | Yes     | No 

Or view the follwing file:

suse:~ # cd /etc/zypp/repos.d 
suse:/etc/zypp/repos.d # ls SUSE-11-SP2.repo SUSE-HA.repo
suse:
/etc/zypp/repos.d # cat SUSE-11-SP2.repo [SUSE-11-SP2] name=SUSE-11-SP2 enabled=1 autorefresh=0 baseurl=cd:///?devices=/dev/sr0 path=/ type=yast2 keeppackages=0

 

Now creating the suse HA repository:

//Mount the suse HA iso file 
suse:~ # mount -o loop SLE-HA-11-SP2-x86_64-GM-CD1.iso /ha 

//Edit the /etc/zypp/repos.d/SUSE-11-SP2.repo file and append following lines: [SUSE-HA] name=SUSE-HA enabled=1 autorefresh=0 baseurl=file:///ha path=/ type=yast2 keeppackages=0

After created,refresh the suse repository:

suse:/etc/zypp/repos.d # zypper ref 
Retrieving repository 'SUSE-HA' metadata [done] 
All repositories have been refreshed. 
suse:/etc/zypp/repos.d # zypper ls 
# | Alias       | Name        | Enabled | Refresh | Type  
--+-------------+-------------+---------+---------+------ 
1 | SUSE-11-SP2 | SUSE-11-SP2 | Yes     | No      | yast2 
2 | SUSE-HA     | SUSE-HA     | Yes     | No      | yast2 

 

 

Now,you can install any packages by zypper.

最后

以上就是畅快鲜花为你收集整理的How To Create A Local Repository For SUSE Linux的全部内容,希望文章能够帮你解决How To Create A Local Repository For SUSE Linux所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(69)

评论列表共有 0 条评论

立即
投稿
返回
顶部