UOS配置apt源

一、本地源

1、首先将镜像文件挂载到mnt临时挂载目录下

[root@Server01 /]# mount /dev/sr0 /mnt/


2、编辑apt文件

[root@Server01 /]# nano /etc/apt/sources.list
deb [trusted=yes] file:///mnt fou main


3、更新源

[root@Server01 /]# apt-get update
[root@Server01 /]# apt-get upgrade


4、测试

[root@Server01 /]# apt-get install bind9-y
#安装成功就是配置完成

二、网络源

1、将 /etc/apt/source.list 中的内容备份或者清除更换上阿里

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse  
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

猜你喜欢

转载自blog.csdn.net/LLLLLoodwd/article/details/131325499