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.

转载于:https://www.cnblogs.com/AloneSword/p/4906489.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值