SUSE 12 sp5切换国内软件源
时间: 2024-05-21 21:17:04 浏览: 361
可以尝试以下步骤来切换国内软件源:
1. 打开终端,使用 root 权限登录系统。
2. 备份原有的软件源配置文件。
```
cp /etc/zypp/repos.d/* /root/
```
3. 编辑软件源配置文件。
```
vim /etc/zypp/repos.d/SUSE_SLES12_SP5.repo
```
4. 在文件中添加以下内容。
```
[SUSE_SLES12_SP5-oss]
name=SUSE_SLES12_SP5-oss
enabled=1
autorefresh=1
baseurl=http://mirrors.aliyun.com/suse/sles12sp5/oss/
type=yast2
gpgcheck=0
[SUSE_SLES12_SP5-update]
name=SUSE_SLES12_SP5-update
enabled=1
autorefresh=1
baseurl=http://mirrors.aliyun.com/suse/sles12sp5/update/
type=yast2
gpgcheck=0
```
注意:以上配置文件为阿里云镜像,也可以根据需要选择其他国内镜像源。
5. 保存并退出配置文件。
6. 更新软件源。
```
zypper refresh
```
7. 完成后,可以使用以下命令查看当前的软件源。
```
zypper lr
```
如果输出类似以下内容,则说明已经成功切换到了国内软件源。
```
# | Alias | Name | Enabled | GPG Check | Refresh
--+------------------------+---------------------------+---------+-----------+--------
1 | SUSE_SLES12_SP5-oss | SUSE_SLES12_SP5-oss | Yes | (none) | Yes
2 | SUSE_SLES12_SP5-update | SUSE_SLES12_SP5-update | Yes | (none) | Yes
```
阅读全文
相关推荐


















