当前位置: 首页 > news >正文

阿里云免费网站建设模板临淄信息网招聘

阿里云免费网站建设模板,临淄信息网招聘,网站优化师,成都网站建设zmcms更换 Ubuntu 系统 apt 命令安装软件源清华大学开源软件镜像站 https://mirrors.tuna.tsinghua.edu.cn/ 1. Ubuntu 的软件源配置文件 /etc/apt/sources.list MIRRORS -> 使用帮助 -> ubuntu https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ Ubuntu 系统 apt 命令安…

更换 Ubuntu 系统 apt 命令安装软件源

清华大学开源软件镜像站
https://mirrors.tuna.tsinghua.edu.cn/

1. Ubuntu 的软件源配置文件 /etc/apt/sources.list

MIRRORS -> 使用帮助 -> ubuntu
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

Ubuntu 系统 apt 命令安装软件默认源为国外源 (服务器位于国外),在国内使用速度较慢,建议改为国内的镜像源服务器。

Ubuntu 的软件源配置文件 /etc/apt/sources.list

yongqiang@yongqiang:~$ cat /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://archive.ubuntu.com/ubuntu/ focal universe
deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates multiverse## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partnerdeb http://security.ubuntu.com/ubuntu/ focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted
deb http://security.ubuntu.com/ubuntu/ focal-security universe
# deb-src http://security.ubuntu.com/ubuntu/ focal-security universe
deb http://security.ubuntu.com/ubuntu/ focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ focal-security multiverse
yongqiang@yongqiang:~$

备份软件安装源配置文件,以防更换的软件源无法使用,可以使用备份文件再恢复到原来的镜像源地址。

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
yongqiang@yongqiang:~$ lsb_release -c
Codename:       focal
yongqiang@yongqiang:~$
yongqiang@yongqiang:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
yongqiang@yongqiang:~$
yongqiang@yongqiang:~$ lsb_release -a | grep Codename | awk '{print $2}'
No LSB modules are available.
focal
yongqiang@yongqiang:~$

2. 清华大学开源软件镜像站 - Ubuntu 镜像

本镜像仅包含 32/64 位 x86 架构处理器的软件包,在 ARM (arm64, armhf)、PowerPC (ppc64el)、RISC-V (riscv64) 和 S390x 等架构的设备上 (对应官方源为 ports.ubuntu.com) 请使用 ubuntu-ports 镜像。

2.1 手动替换

Ubuntu 的软件源配置文件是 /etc/apt/sources.list。将系统自带的该文件备份,将该文件替换为下面内容,即可使用 TUNA 的软件源镜像。

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

更换软件安装源

sudo vim /etc/apt/sources.list

选择你的 ubuntu 版本: 20.04 LTS

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

2.2 命令替换

执行如下命令自动替换

sudo sed -i "s@http://.*archive.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
sudo sed -i "s@http://.*security.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list

更新软件列表

sudo apt-get update

更新软件:

sudo apt-get upgrade

3. Certificate verification failed: The certificate is NOT trusted.

Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification.

3.1 更新证书 ca-certificates (建议)

  1. 编辑 /etc/apt/sources.list 文件,临时将 https 源修改为 http 源。
  2. 更新证书 ca-certificates
sudo apt install ca-certificates
sudo apt-get install --reinstall ca-certificatessudo apt-get update
  1. 编辑 /etc/apt/sources.list 文件,将 http 源修改回 https 源。

3.2 https 源修改为 http 源

编辑 /etc/apt/sources.list 文件,将 Ubuntu 对应版本的软件源里的 https 替换成 httphttps 是加密传输,需要证书认证。去掉 s,将 https 源修改为 http 源。

References

https://yongqiang.blog.csdn.net/
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

http://www.yayakq.cn/news/518021/

相关文章:

  • 网站结构怎么分析会议指出
  • 网站建设的具体流程做问卷的网站有那些
  • seo网站首页推广软件工程专业考研考什么
  • 微网站费用国家公示系统官网
  • 石家庄响应式模板建站wordpress用户只能一年内使用
  • 做快递单的网站会不会是骗人的个人网页模板
  • 网站正在建设中网页贵州网站优化
  • 山东卓商网站建设公司如何设置wordpress的语言
  • 外网服装设计网站做网站建设业务员好吗
  • 商城网站合同网站项目建设的必要性
  • 怎么区分模板网站和定制网站已注册商标查询官网
  • 泰国做企业网站全国信用企业公示平台官网
  • 仿win8 网站百度百科优化排名
  • 做网站上传服务器制作安卓app的软件
  • dede被挂网站网站木马系统优化的知识
  • 信宜做网站设置网站内的新闻怎样做链接
  • 福州商城网站开发公司聊城做网站的公司流程
  • 免费开源企业网站程序wordpress no follow
  • 个人网站要备案吗一个专做里番的网站
  • 网站建设答案网站开发培训时间
  • 兰州新区建设局网站地址网站开发需求分析实例
  • 兰州网站建设redu免费asp企业网站源码
  • 无忧网站建设多少钱动漫做暧视频在线观看网站
  • 网站建设排版规定网络管理系统平台有哪些
  • 站点与网站有什么区别免费推广的途径
  • 论文明星个人网站建设推广最好的平台有哪些
  • 三线建设学兵连网站西安地区联系人建设网站加盟
  • it培训网站模板做海报一般都去什么网站看
  • 网站是如何建立的网站内容建设ppt
  • 深圳住房建设局网站申报加盟网站建设