关于CentOS8停止维护后,新安装CentOS无法使用yum、wget等命令的问题解决

今天在虚拟机安装centos8,安装完成后,突然发现yum无法使用,原来是官方数据源停止维护了,需要切换yum数据源,搜索后发现切换数据源命令

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

但是,这并不好用,因为是新环境,没有wget命令,于是安装wget

yum install wget

但是,yum源还没配置,所以无法使用,这样就陷入了死循环,根本没办法进行下去。。。

于是想了一下解决方案:

方法一:(不推荐)

从wget入手,先使用rpm安装wget,再配置yum源就能继续下去了

于是,先下载rpm安装包,上次到服务器,执行安装命令

rpm -ivh wget-1.14-18.el7_6.1.x86_64.rpm

然后,果然没有那么简单,别人都是直接成功了,到我这又报错了,缺少相关依赖,太麻烦了,

直接强制安装

rpm -ivh wget-1.14-18.el7_6.1.x86_64.rpm --nodeps --force

加上 --nodeps 属性,不考虑依赖关系

加上 --force 属性,强制进行安装

安装成功!

但是,又报错,使用wget命令报 找不到ssl。。。。。。

算了,重装

方法二:(推荐)

从yum入手,直接换种方式配置数据源;

手动配置

vi /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
[BaseOS]
name=CentOS-$releasever - BaseOS
baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

vim CentOS-Linux-AppStream.repo
[AppStream]
name=CentOS-$releasever - AppStream
baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
yum clean all && yum makecache

修改数据源配置文件,清除、重新构建yum缓存

再执行yum安装weget,一气呵成,终于成功!!!

参考:

最新centos8 yum安装mysql8-优快云博客(配置腾讯云,仍然无法成功,换为阿里云后成功)

CentOS8 更改YUM源_centos8更换yum源-优快云博客

### Ubuntu 20.04 LTS Live Server Installation Guide and Features #### Overview of Ubuntu 20.04 LTS Live Server Ubuntu 20.04 LTS (Long Term Support), also known as Focal Fossa, offers a stable environment for servers with support until April 2025. The live server edition allows users to try out or install the operating system without making changes to their hard drive initially. #### System Requirements To ensure smooth operation during installation and usage, minimum hardware requirements include at least 1GHz processor, 1GB RAM (for minimal installation; 2GB recommended), and around 25GB disk space depending on what services will be installed later[^2]. #### Downloading ISO Image The first step involves downloading an official ISO image file specifically designed for the live server variant from Canonical's website. This ISO contains all necessary packages required for setting up various types of servers including web hosting, database management systems etc.[^1] #### Boot Process Once downloaded, create bootable media using tools like Rufus on Windows or Etcher on Linux/MacOS. After preparing this USB stick/DVD-ROM, insert it into your target machine and reboot while selecting said device as primary bootloader through BIOS/UEFI settings menu options available upon startup. #### Initial Setup Steps During Installation After successfully entering the installer interface via selected medium: - Choose language preferences. - Select keyboard layout according to regional standards. - Configure network interfaces by providing static IP addresses if needed or opting DHCP configuration automatically provided by router/modem devices connected within local area networks(LANs). #### Post-installation Configuration Tasks Following completion of base OS setup process: - Update existing software repositories list cache immediately after gaining internet connectivity post-reboot following initial installation phase. - Install additional drivers/firmware components that may not have been included originally due to licensing restrictions but are essential for optimal performance especially concerning wireless adapters, graphics cards among others. - Secure newly established environments against unauthorized access attempts early-on utilizing built-in firewall utilities alongside configuring SSH service properly restricting root login remotely along other best practices advised widely across community forums dedicated towards enhancing security posture effectively. ```bash sudo apt update && sudo apt upgrade -y sudo ufw enable sudo ufw default deny incoming ``` #### Key Features Introduced in Version 20.04 Some notable enhancements introduced since previous releases encompass improved stability thanks largely owing much effort put forth stabilizing kernel versions used throughout development cycles leading up till final release date besides introducing new functionalities such as ZFS filesystem integration natively supported directly inside GRUB bootloader menus allowing easier deployment scenarios involving complex storage configurations requiring advanced snapshot capabilities offered only previously found outside mainstream distributions' offerings elsewhere before now becoming readily accessible here too!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值