原文地址: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的更多相关文章

  1. 指定文件夹 指定文件后缀名 删除整个文件夹 git 冲突解决 create a new repository on the command line push an existing repository from the command line

    http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001375840038939c2 ...

  2. Failure to find xxx in xxx was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced @ xxx

    问题: 在linux服务器上使用maven编译war时报错: 16:41:35 [FATAL] Non-resolvable parent POM for ***: Failure to find * ...

  3. your local repository contains non-ascii

    安装CCS时候遇到  your local repository contains non-ascii 问题. 解决方法:  不要在中文目录下安装.

  4. Maven-010-maven 编译报错:Failure to ... in ... was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced.

    今晚在编译 maven 项目的时候,命令行报错,出现 Failure to ... in ... 类似错误,详细的错误信息如下所示: [INFO] -------------------------- ...

  5. Maven 迁移local repository

    1.1 Maven仓库主要有2种: remote repository:相当于公共的仓库,大家都能访问到,一般可以用URL的形式访问,一般默认的地址:http://search.maven.org/ ...

  6. SharePoint自动化系列——Create a local user and add to SharePoint

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 实现过程:在本地创建一个local user并将该user添加到Administrators组中, ...

  7. maven编译项目时提示:cached in the local repository

    今天使用命令mvn compile编译maven项目时提示错误信息,部分错误信息如下: ...... was cached in the local repository, resolution wi ...

  8. 【转】Install Oracle Jdbc driver in your Maven local repository

    Install Oracle Jdbc driver in your Maven local repository If you are using Oracle, you must first in ...

  9. Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from http://repo.maven.apache.org/ maven2 was cached in the local repository, resolution will not be reattempted until the update interv

    Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from http://repo.maven.apache.org/  mave ...

随机推荐

  1. Python学习二|Python的一些疑问

    最近写了一点Python代码,作为一个java程序员,面对Python这么便捷的语言不禁有点激动.不过呢,有时候也会遇到一些无法理解的东西. 例如: er = [[1,2,3], [4,5,6], [ ...

  2. make distclean

    清空bin目录make dirclean 清空所有相关的东西,包括下载的软件包,配置文件,feeds内容等make distclean 这个命令会删除feeds目录及其下面的所有的文件,直接结果就是运 ...

  3. html可用于跨域的三个标签

    img 应用场景: <img>用于打点统计,统计网站可能是其他域 script 应用场景: 可以用于cdn,还可以用于JSONP link 可用于cdn

  4. 2018-2019-2 《网络对抗技术》Exp0 Kali安装 Week1 20165301

    2018-2019-2 <网络对抗技术>Exp0 Kali安装 Week1 20165301 安装kali 参考此网站 设置共享文件夹 虚拟机->设置->选项->共享文件 ...

  5. 如何批量删除word文档中的超级链接?

    有时候从网页上copy来的文章中,会带有非常多的链接,这些链接很烦人是吧?如何批量删除(一次性全部删除)word文章中的超链接呢? 有些朋友说,Ctrl+A全选文章,然后点击格式工具栏上的“清除格式” ...

  6. 定制自己的new和delete:operator new 和 operator delete

    new和delete不同用法 基本用法 int * aptr = new int(10); delete aptr, aptr = nullptr; 上面的代码是我们最基本也是最常见的使用new和de ...

  7. .NetCore 使用AutoMapper

    添加引用 AutoMapper AutoMapper.Extensions.Microsoft.DependencyInjection 注册服务 services.AddAutoMapper(); 配 ...

  8. 002 @RequestMapping的说明

    一:修饰方法 1.举例 2.效果 二:修饰类 1.测试类 2.index.jsp 3.效果 ---------------- 三:映射请求请求方法 1.使用语法 分别是method 2.Method的 ...

  9. 初识thinkphp(1)

    作为一名准备成为CTF里WEB狗的萌新,在做了3个月的CTF的web题后,发现自己php代码审计非常不过关,并且web的架构模式条理也十分的不清晰,于是抱着提高代码审计能力的态度在近期会去写一个简单的 ...

  10. BZOJ.4514.[SDOI2016]数字配对(费用流SPFA 二分图)

    BZOJ 洛谷 \(Solution\) 很显然的建二分图后跑最大费用流,但有个问题是一个数是只能用一次的,这样二分图两部分都有这个数. 那么就用两倍的.如果\(i\)可以向\(j'\)连边,\(j\ ...