Linux系统初始化更新(更换阿里源)(centos7mini)
1. Centos6、7
修改Linux配置
更换yum 更新源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum clean all
yum makecache更新系统
yum -y updatesudo yum list kernel -y
sudo yum update -y kernel
更新完成后,重启系统。(让新的内核版本生效)
重启后,查看内核版本:
2. ubuntu16
源目录位置:/etc/apt/sources.list
sudo apt-get update
sudo apt-get dist-upgrade
更换源
1.备份系统自带源mv /etc/apt/sources.list /etc/apt/sources.list.bak2.修改/etc/apt/sources.list文件vim /etc/apt/sources.list 加入如下内容deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse3.更新生效apt-get update
3. centos7 mini初始化
系统初始化
systemctl stop NetworkManager
systemctl disable NetworkManager
echo nameserver 114.114.114.114 > /etc/resolv.conf
vi /etc/sysconfig/network-scripts/ifcfg-ens33
修改文件中的ONBOOT=no,将no改为yes
service network restart更换国内镜像源
curl https://mirrors.aliyun.com/repo/Centos-7.repo > /etc/yum.repos.d/CentOS-Base.repo
添加阿里云epel
curl http://mirrors.aliyun.com/repo/epel-7.repo > /etc/yum.repos.d/epel.repo
配置生效
yum clean all; yum makecache
Linux系统初始化更新(更换阿里源)(centos7mini)相关推荐
- s5.CentOS、Ubuntu、Rocky Linux系统初始化脚本
CentOS.Ubuntu.Rocky Linux系统初始化脚本 Shell脚本源码地址 Gitee:https://gitee.com/raymond9/shell Github:https://g ...
- Win10安装Maven并更换阿里源
Win10安装Maven并更换阿里源 文章目录 Win10安装Maven并更换阿里源 前言 安装Maven 配置环境变量 更换Maven源 参考文章 前言 根据百度百科的描述,Maven 是基于项目对 ...
- Anaconda/pip 更换阿里源,助力 conda create -n 虚拟环境搭建
Anaconda/pip 更换为阿里源,助力 conda create -n 虚拟环境搭建 一.问题概述: 由于网络和时间的限制,很多的 conda 源,如 清华源,中科大源都需要想办法才能创建好 ...
- Ubuntu 18.04 更换阿里源
我们在装好Ubuntu18.04之后,通常都要设置下root用户密码和配置下国内的阿里源. 接下来,讲下Ubuntu18.04如何配置阿里源! 1.第一步:备份 sources.list sudo c ...
- Linux系统之Centos安装epel源
Linux系统之Centos安装epel源 一.检查本地系统环境 1.检查系统版本 2.检查系统内核版本 二.检查yum仓库 1.查看repo文件 2.检查yum仓库的状态 三.安装epel源 1.查 ...
- 【Ubuntu】apt 更换阿里源
Ubuntu apt 更换阿里源 1.Ubuntu apt 更换阿里源 1.1 找到阿里官方相关镜像 1.2 找到apt的源管理文件 1.3 使用命令替换其源地址 1.4 刷新源信息 1.5 Fail ...
- ubuntu20.04更换阿里源
Ubuntu20.04更新阿里源 一.更新阿里源 在安装Ubuntu系统后,在默认的源文件下是官方的镜像,是在外国的服务器.所有的软件的下载速度会很慢,慢一点还可以忍受,但是有一些还会报"无 ...
- Ubuntu 下类似 Xshell 工具、更换阿里源
1. 工具 https://github.com/asbru-cm/asbru-cm 2. 安装 如果安装失败时,请更换源列表在 /etc/apt/sources.list 文件前面添加如下条目 2. ...
- 树莓派系统最新系统镜像Bullseye更换镜像源
我们在因为墙内的原因,往往有时无法快速地更新我们的系统镜像库源,这里我简述一下最新的树莓派Bullseye系统如何更换镜像源的方法. 最新树莓派4B开发板的架构是armhf体系,如果想看你的开发板的体 ...
最新文章
- l-lsblk查看设备可用块设备
- 树形dp ---- gym101655 D - Delta Quadrant 树上连通块思维换根 + 树形dp
- 带你重走 TiDB TPS 提升 1000 倍的性能优化之旅
- P3482 [POI2009]SLO-Elephants
- MXNet设计和实现简介
- Android开发之拍照后图片旋转的问题
- [CTSC2017]吉夫特(思维+巧妙)
- 施一公:如何提高英文的科研写作能力
- php 冒泡排序数组,php一维二维数组键之冒泡排序
- pandas合并groupby_Pandas中级技巧-数据的灵活运算
- python3 beautifulsoup_Python3中BeautifulSoup的使用方法
- myeclipse中配置maven
- 初识C语言———C语言基础入门
- mac java 配置环境变量配置_Mac 配置环境变量的方法
- 新浪cn邮箱服务器,新浪CN免费邮箱outlook 设置详解
- printf如何按二进制格式打印
- 深入理解JS的delete
- 图片处理工具类 - ImageUtils.java
- 【转】电阻屏和电容屏之 二
- 从甲方转变为乙方,工作心态的转变
热门文章
- 送书《R语言数据分析和可视化》 | 这个为生信学习和生信作图打造的开源R教程真香!!!...
- 高级转录组分析和R语言数据可视化课程全部转为视频课
- Record of circos usage
- python数据结构之链表_Python数据结构之翻转链表
- java断言错误_java-获取断言错误,即使期望值和实际值相同
- c++向量和数组的区别_Spark机器学习-Java版(一)-向量和矩阵
- C++笔记-断言、静态断言、R转义符
- C++设计模式-代理模式
- Spring Boot通过@RequestParam接收前端表单传来的数据
- Qt工作笔记-使用Qt中QProcess与iostream中system调用外部进程