How To Create A Local Repository For SUSE Linux
2015-10-24 11:28
441 查看
原文地址: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 thepackage 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:
Or view the follwing file:
Now creating the suse HA repository:
After created,refresh the suse repository:
Now,you can install any packages by zypper.
As you know,you can use the yum command to install packages on redhat linux.It's a powerful tool than it can resolve thepackage 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.
相关文章推荐
- centos6.7x86_64php7安装笔记 new
- 查看linux下arp信息
- 查看linux下网卡mac地址
- linux下通过lseek()实现文件大小设置
- 查看linux路由信息
- 定制自己的内核
- 内核配置与裁剪浅析
- centos 安装rpmforge、rpmfusion、epel软件仓库 ( a old article !!!!!! )
- linux日志文件
- Linux系统下设置静态IP或自动获取动态IP的简单方法
- Linux下的platform总线驱动
- Ubuntu 14.04 wubi 硬盘安装 ~ linux小白
- CentOS yum 源的配置与使用----rpmforge
- LinuxCNC+EtherCAT(3)翻译一篇东西KINS——LinuxCNC中的HAL运动学组件~~~~~~~~~
- Linux 系统信息分析
- CentOS7 添加用户到 sudoers
- 在 Linux 下使用 RAID(九):如何使用 ‘Mdadm’ 工具管理软件 RAID
- 在 Linux 下使用 RAID(九):如何使用 ‘Mdadm’ 工具管理软件 RAID
- LinuxCNC+EtherCAT(2)~~~~~~
- /etc/group文件详解