6月 262014
 

最小化安装系统后查看系统默认软件源列表

linux-o2qn:~ # zypper repos
 # | Alias | Name | Enabled | Refresh
 --+---------------------------+------------------------------------+---------+--------
 1 | openSUSE-13.1-1.10 | openSUSE-13.1-1.10 | Yes | No
 2 | repo-debug | openSUSE-13.1-Debug | No | Yes
 3 | repo-debug-update | openSUSE-13.1-Update-Debug | No | Yes
 4 | repo-debug-update-non-oss | openSUSE-13.1-Update-Debug-Non-Oss | No | Yes
 5 | repo-non-oss | openSUSE-13.1-Non-Oss | Yes | Yes
 6 | repo-oss | openSUSE-13.1-Oss | Yes | Yes
 7 | repo-source | openSUSE-13.1-Source | No | Yes
 8 | repo-update | openSUSE-13.1-Update | Yes | Yes
 9 | repo-update-non-oss | openSUSE-13.1-Update-Non-Oss | Yes | Yes
 linux-o2qn:~ #

删除安装系统时生成的安装光盘软件源后重新查看源列表

linux-o2qn:~ # zypper removerepo openSUSE-13.1-1.10
 Removing repository 'openSUSE-13.1-1.10' ..........................................................[done]
 Repository 'openSUSE-13.1-1.10' has been removed.
 linux-o2qn:~ # zypper repos
 # | Alias | Name | Enabled | Refresh
 --+---------------------------+------------------------------------+---------+--------
 1 | repo-debug | openSUSE-13.1-Debug | No | Yes
 2 | repo-debug-update | openSUSE-13.1-Update-Debug | No | Yes
 3 | repo-debug-update-non-oss | openSUSE-13.1-Update-Debug-Non-Oss | No | Yes
 4 | repo-non-oss | openSUSE-13.1-Non-Oss | Yes | Yes
 5 | repo-oss | openSUSE-13.1-Oss | Yes | Yes
 6 | repo-source | openSUSE-13.1-Source | No | Yes
 7 | repo-update | openSUSE-13.1-Update | Yes | Yes
 8 | repo-update-non-oss | openSUSE-13.1-Update-Non-Oss | Yes | Yes
 linux-o2qn:~ #

删除软件源配置时同时也删除了目录中的配置文件

linux-o2qn:~ # ls /etc/zypp/repos.d/
 repo-debug.repo repo-debug-update.repo repo-oss.repo repo-update-non-oss.repo
 repo-debug-update-non-oss.repo repo-non-oss.repo repo-source.repo repo-update.repo
 linux-o2qn:~ #
 linux-o2qn:~ # zypper rr repo-oss repo-non-oss repo-update repo-update-non-oss
 Removing repository 'openSUSE-13.1-Non-Oss' .......................................................[done]
 Repository 'openSUSE-13.1-Non-Oss' has been removed.
 Removing repository 'openSUSE-13.1-Oss' ...........................................................[done]
 Repository 'openSUSE-13.1-Oss' has been removed.
 Removing repository 'openSUSE-13.1-Update' ........................................................[done]
 Repository 'openSUSE-13.1-Update' has been removed.
 Removing repository 'openSUSE-13.1-Update-Non-Oss' ................................................[done]
 Repository 'openSUSE-13.1-Update-Non-Oss' has been removed.
 linux-o2qn:~ # ls /etc/zypp/repos.d/
 repo-debug.repo repo-debug-update-non-oss.repo repo-debug-update.repo repo-source.repo
 linux-o2qn:~ #

添加阿里云软件源,可以提高访问和下载速度
linux-o2qn:~ # zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/13.1/repo/oss/ openSUSE-13.1-Oss
Adding repository ‘openSUSE-13.1-Oss’ …………………………………………………….[done]
Repository ‘openSUSE-13.1-Oss’ successfully added
Enabled: Yes
Autorefresh: Yes
GPG check: Yes
URI: http://mirrors.aliyun.com/opensuse/distribution/13.1/repo/oss/

linux-o2qn:~ # zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/13.1/repo/non-oss/ openSUSE-13.1-Non-Oss
Adding repository ‘openSUSE-13.1-Non-Oss’ …………………………………………………[done]
Repository ‘openSUSE-13.1-Non-Oss’ successfully added
Enabled: Yes
Autorefresh: Yes
GPG check: Yes
URI: http://mirrors.aliyun.com/opensuse/distribution/13.1/repo/non-oss/

linux-o2qn:~ # zypper repos
# | Alias | Name | Enabled | Refresh
–+—————————+————————————+———+——–
1 | openSUSE-13.1-Non-Oss | openSUSE-13.1-Non-Oss | Yes | Yes
2 | openSUSE-13.1-Oss | openSUSE-13.1-Oss | Yes | Yes
3 | repo-debug | openSUSE-13.1-Debug | No | Yes
4 | repo-debug-update | openSUSE-13.1-Update-Debug | No | Yes
5 | repo-debug-update-non-oss | openSUSE-13.1-Update-Debug-Non-Oss | No | Yes
6 | repo-source | openSUSE-13.1-Source | No | Yes
linux-o2qn:~ #

使用短参数添加软件源
linux-o2qn:~ # zypper ar -f http://mirrors.aliyun.com/opensuse/update/13.1/ openSUSE-13.1-Update-Oss
Adding repository ‘openSUSE-13.1-Update-Oss’ ………………………………………………[done]
Repository ‘openSUSE-13.1-Update-Oss’ successfully added
Enabled: Yes
Autorefresh: Yes
GPG check: Yes
URI: http://mirrors.aliyun.com/opensuse/update/13.1/

linux-o2qn:~ # zypper ar -f http://mirrors.aliyun.com/opensuse/update/13.1-non-oss/ openSUSE-13.1-Update-Non-Oss
Adding repository ‘openSUSE-13.1-Update-Non-Oss’ …………………………………………..[done]
Repository ‘openSUSE-13.1-Update-Non-Oss’ successfully added
Enabled: Yes
Autorefresh: Yes
GPG check: Yes
URI: http://mirrors.aliyun.com/opensuse/update/13.1-non-oss/

linux-o2qn:~ #

更改软件源后执行刷新

linux-o2qn:~ # zypper refresh
 Retrieving repository 'openSUSE-13.1-Non-Oss' metadata ............................................[done]
 Building repository 'openSUSE-13.1-Non-Oss' cache .................................................[done]
 Retrieving repository 'openSUSE-13.1-Oss' metadata ................................................[done]
 Building repository 'openSUSE-13.1-Oss' cache .....................................................[done]
 Retrieving repository 'openSUSE-13.1-Update-Non-Oss' metadata .....................................[done]
 Building repository 'openSUSE-13.1-Update-Non-Oss' cache ..........................................[done]
 Retrieving repository 'openSUSE-13.1-Update-Oss' metadata .........................................[done]
 Building repository 'openSUSE-13.1-Update-Oss' cache ..............................................[done]
 All repositories have been refreshed.
 linux-o2qn:~ #

linux-s4lx:~ # uname -ar
Linux linux-s4lx 3.11.6-4-default #1 SMP Wed Oct 30 18:04:56 UTC 2013 (e6d4a27) x86_64 x86_64 x86_64 GNU/Linux
linux-s4lx:~ # zypper update
Loading repository data…
Reading installed packages…

The following NEW packages are going to be installed:
kernel-default-3.11.10-11.1 keyutils

The following packages are going to be upgraded:
aaa_base aaa_base-extras autofs bind-libs bind-utils ca-certificates ca-certificates-mozilla coreutils
curl dbus-1 dbus-1-x11 file file-magic fontconfig gio-branding-openSUSE glib2-tools glibc glibc-extra
glibc-locale gpg2 grub2 grub2-i386-pc grub2-x86_64-efi iputils kernel-firmware kpartx krb5 less
libblkid1 libcap-ng0 libcurl4 libdbus-1-3 libgio-2_0-0 libglib-2_0-0 libgmodule-2_0-0 libgobject-2_0-0
libgudev-1_0-0 libmagic1 libmount1 libopenssl1_0_0 libparted0 libpng16-16 libprocps1 libpython2_7-1_0
libsolv-tools libstorage4 libstorage-ruby libtirpc1 libudev1 libupower-glib1 libuuid1 libxml2-2
libyaml-0-2 libzypp logrotate lvm2 mdadm mozilla-nspr multipath-tools nfs-client nscd openssh openssl
pam parted pm-utils procps python-base release-notes-openSUSE rpm rsync ruby20 sudo SuSEfirewall2
sysconfig sysconfig-netconfig sysconfig-network systemd systemd-presets-branding-openSUSE
systemd-sysvinit tar udev udevmountd upower util-linux vim yast2 yast2-add-on yast2-ldap-client
yast2-network yast2-ruby-bindings yast2-storage yast2-trans-en_US yast2-ycp-ui-bindings zypper
zypper-aptitude

96 packages to upgrade, 2 new.
Overall download size: 104.6 MiB. After the operation, additional 160.8 MiB will be used.
Continue? [y/n/? shows all options] (y):

 
http://mirrors.sohu.com/opensuse/update/13.1/
http://mirrors.sohu.com/opensuse/update/13.1-non-oss/
http://mirrors.sohu.com/opensuse/distribution/13.1/repo/non-oss/
http://mirrors.sohu.com/opensuse/distribution/13.1/repo/oss

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据