天天看点

RedHat8安装epel扩展软件仓库

RedHat8安装epel扩展软件仓库

      • 显示当前系统主机名
      • Linux目录当中的特殊符号意义
      • RHEL8安装epel扩展软件仓库

显示当前系统主机名

hostname
# 默认主机名 
localhost.localdomain

# 临时修改主机名
    hostname www.qq.com

# 永久修改主机名
    hostnamectl set-hostname 主机名
    hostnamectl set-hostname master
           

Linux目录当中的特殊符号意义

~  波浪线  表示home目录
    home目录 主要存放用户的个性化信息
.. 两个点  表示父目录
.  一个点  表示当前目录
           

RHEL8安装epel扩展软件仓库

# 安装epel扩展软件仓库
yum install epel-release -y
# 还需要配置国内源
# 安装 epel 配置包
yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
# 安装完epel包后,在`/etc/yum.repos.d`目录下会多出epel开头的文件

# 将 repo 配置中的地址替换为阿里云镜像站地址
# 替换原来的https链接为为阿里云地址
sed -i 's|^#baseurl=https://download.fedoraproject.org/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
# 替换原来的http链接为为阿里云地址
sed -i 's|^#baseurl=http://download.fedoraproject.org/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*

# 替换其他字段
sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
           
RedHat8安装epel扩展软件仓库

继续阅读