智星云文档
  • 新手入门

    • 算力租用流程
    • 常见问题
    • 如何选择GPU
  • 技术相关

    • turbovnc安装配置
    • 智星云huggingface加速节点使用教程
    • AI模型库:服务器预载,极速下载
    • linux安装cuda和pytorch方法
    • 测试服务器带宽的方法
    • windows常见问题
    • GPU测速
    • Linux实用基础
    • jupyter notebook连接linux
    • VSCode连接到云主机
    • macOS系统连接到云主机
    • 拓展磁盘
    • 端口映射
    • GPU无法调用
    • ssh链接保持
    • ssh在云主机后台运行
    • 基于SSH的链接异常
    • VSCode远程连接失败
    • centos7-epel加速
    • conda使用源
    • docker镜像压缩
    • dynslam安装
    • huggingface下载
    • ubuntu安装显卡驱动
    • 编译tensorflow
    • linux上传文件&数据上传Windows
    • 更新git到最新
    • 回环设备
    • nvidia-smi输出解析
    • Topaz 视频处理教程
# 对于 CentOS 7
sed -e 's|^mirrorlist= |#mirrorlist= |g' \ -e
's|^#baseurl=http://mirror.centos.org/centos|baseurl=https://mirrors.tuna.tsingh ua.edu.cn/centos|g' \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
 
# 对于 CentOS 8
sed -e 's|^mirrorlist= |#mirrorlist= |g' \ -e
's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=https://mirrors.tuna.t singhua.edu.cn/centos|g' \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
 
 
#  CentOS Stream 9
# 将这段代码保存为一个文件,例如 update_mirror.pl #!/usr/bin/perl
 
use strict;
use warnings; use autodie;
 
my $mirrors = 'https://mirrors.tuna.tsinghua.edu.cn/centos-stream';
 
if (@ARGV < 1) {
die "Usage: $0 <filename1> <filename2> ...\n"; }
 
while (my $filename = shift @ARGV) {
my $backup_filename = $filename . '.bak'; rename $filename, $backup_filename;
 
open my $input, "<", $backup_filename; open my $output, ">", $filename;
 
while (<$input>) {
s/^metalink/# metalink/;
 
if (m/^name/) {
my (undef, $repo, $arch) = split /-/; $repo =~ s/^\s+|\s+$//g;
($arch = defined $arch ? lc($arch) : '') =~ s/^\s+|\s+$//g;
 
if ($repo =~ /^Extras/) {
$_ .= "baseurl=${mirrors}/SIGs/\$releasever-stream/extras" . ($arch eq 'source' ? "/${arch}/" : "/\$basearch/") . "extras-common\n";
} else {
$_ .= "baseurl=${mirrors}/\$releasever-stream/$repo" . ($arch eq 'source' ? "/" : "/\$basearch/") . ($arch ne '' ? "${arch}/tree/" : "os") .
"\n";
} }

print $output $_; }
}
 
 
perl ./update_mirror.pl /etc/yum.repos.d/centos*.repo
 
# 如果没有perl # 使用 dnf
dnf clean all && dnf makecache
 
# 使用 yum
yum clean all && yum makecache
 
 
# ubuntu 24.04
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-proposed main restricted universe multiverse
 
# ubuntu22.04
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
 
# ubuntu20.04
# 默认注释了源码镜像以提高 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 http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/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

epel:

yum install epel-release
sed -e 's!^metalink= !#metalink= !g' \ -e 's!^#baseurl= !baseurl= !g' \
-e
's!https\?://download\.fedoraproject\.org/pub/epel!https://mirrors.tuna.tsinghua .edu.cn/epel!g' \
-e
's!https\?://download\.example/pub/epel!https://mirrors.tuna.tsinghua.edu.cn/epe l!g' \
-i /etc/yum.repos.d/epel{,-testing}.repo yum update
Prev
VSCode远程连接失败
Next
conda使用源