CentOS 7 系统安装初始化之yum,linux系统使用起步

本文详细描述了如何在CentOS7系统上安装基础Python和yum组件,配置阿里云、清华大学的YUM源,以及安装NTFS支持。教程包括备份原有配置、下载并安装必要的包、设置RPM-GPG-KEY,旨在帮助用户优化系统包管理。
摘要由CSDN通过智能技术生成

CentOS 7 系统安装初始化之yum,linux系统使用起步

一、下载如下python-[]及yum-[ ],五个安装包,并用如下命令安装

http://mirrors.163.com/centos/7/os/x86_64/Packages/

rpm -ivh --force --nodeps python-iniparse*

rpm -ivh --force --nodeps yum-metadata-parse*

rpm -ivh --force --nodeps yum-3.4.3-168.el7.*

rpm -ivh --force --nodeps yum-plugin-fastestmirror-*

rpm -ivh --force --nodeps yum-cron-3.4.3*

二、配置阿里巴巴YUM源

1、备份本机yum配置文件:CentOS-Base.repo

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、下载阿里巴巴YUM源

进入yum源目录:cd /etc/yum.repos.d

下载yum源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、升级、清除、生成yum缓存(本地缓存必须的yum仓库源里的包资源,本机使用)

进入yum源目录:cd /etc/yum.repos.d

yum upgrade # 升级yum

yum clean all # 清除系统所有的yum缓存

yum makecache # 生成yum缓存

三、配置阿里巴巴epel-7.repo的YUM源

进入yum源目录:cd /etc/yum.repos.d

下载alibaba epel的yum源:

wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo

升级、清除、生成yum缓存(本地缓存必须的yum仓库源里的包资源,本机使用)

yum upgrade # update the yum

yum clean all # 清除系统所有的yum缓存

yum makecache # 生成yum缓存

四、配置清华大学的repo的YUM源:复制CentOS-Base.repo:下所有内容,替换原CentOS-Base.repo里全部内容,按步骤操作,记得备份此文件

清华repo:

1、备份 CentOS-Base.repo

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

2、更新CentOS-Base.repo全部

vim /etc/yum.repos.d/CentOS-Base.repo

CentOS-Base.repo:

# CentOS-Base.repo

#

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client. You should use this for CentOS updates

# unless you are manually picking other mirrors.

#

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

#

#

[base]

name=CentOS-$releasever - Base

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates

[updates]

name=CentOS-$releasever - Updates

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

3、更新yum、清除yum缓存、生成yum缓存

进入yum源目录:cd /etc/yum.repos.d

升级、清除、生成yum缓存(本地缓存必须的yum仓库源里的包资源,本机使用)

yum upgrade # update the yum

yum clean all # 清除系统所有的yum缓存

yum makecache # 生成yum缓存

五、配置RPM-GPG-KEY-EPEL-7文件

cd /etc/pki/rpm-gpg

wget https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7

六、安装如下支持软件包

yum install -y htop

yum install -y epel-release

七、安装NTFS硬盘格式支持:即windows下的硬盘,加载显示在linux的CentOS 7系统里

yum install ntfs-3g

备注:打开NTFS格式的磁盘时,如果是用户账户,则需要输入root账户密码。此为CentOS 7的安全管理。

特别提醒:早起,感觉此在此次软件正版化努力中,犹为有效。但,人事纷纭,再次重新配置安装本机CentOS 7操作系统,在自己电脑验证整个过程。因事起苍促,急于公布给急需解决问题的网友,因此,不尽完善,略有疏漏。再次编辑、校对后,再次在网络公开。

1、本人身在道门,因此,同时邮件付于八仙庵,希望通过八仙庵,协助到可以协助的老百姓。也许,老百姓有在公司工作而需要的。

2、因身处陕西省会城市,这里,有借机会,故意纷扰而致社会治安事件者,因此,linux的CentOS 7相关文章,因个人原创,同时付陕西日报。希望可以帮助这里不懂电脑的普通老百姓。

橘颂 于 古都长安 甲辰年,正月十七,午

  • 15
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

minimonkey850122

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值