`
chinacode
  • 浏览: 28270 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

red hat centos 安装 yum

阅读更多

      最近配置了服务器需要安装软件方法有几种。

  1. 下载软件包 ,编译安装 (./configure,make,make install)这样安装配置性更高。相信高手都是这样安装的。
  2. yum安装。这样安装起来比较简单。(yum install  软件包名称 ) 主要适用于(centos,red hat)等.
    卸载:yum remove  软件包名称.
  3. apt-get 安装 这个和yum安装差不多。(sudo apt-get install  软件包名称   ) 主要适用于(ubuntu ,debian).
    卸载 : sudo apt-get autoremove 卸载所有相关包。
  4. 采用 package 方式安装 : 用 package 安装,只要抓取该程序 package 档案。
    安装 (pkg_add package_name)  移除 (pkg_delete package_name)  就可以完成安装 / 移除。
    注意 :文件名称 .tgz 结尾的是 package 文件名称 .tar.gz 结尾的是 source 。
    注 : 目前已经安装的 package 数据库放在 /var/db/pkg/ 这个数据夹之中。
  5. 另外还有 port tree 方式安装 (freebsd).

下面是red hat 安装yum的方法

  1. 下载包 :wget  http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm   .
    当然也可以选择别的版本:http://yum.baseurl.org/download/2.0/
  2. 进入目录进行安装 :
    rpmbuild --rebuild yum-2.0.8-1.src.rpm
    cd  /usr/src/redhat/RPMS/noarch/
    rpm -ivh yum-2.0.8-1.noarch.rpm
  3. 配置yum更新地址
    [base]

    #name=Red Hat Linux $releasever - $basearch - Base

    #baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/

    name=Red Hat Linux $releasever - $basearch - Base

    baseurl= http://centos.ustc.edu.cn/centos/4/os/i386/

    #[updates]

    #name=Red Hat Linux $releasever - Updates

    #baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/

    name=Red Hat Linux $releasever - Updates

    baseurl= http://mirror.centos.org/centos/4/updates/i386/

    [base]
    #name=Red Hat Linux $releasever - $basearch - Base

    #baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/

    name=Red Hat Linux $releasever - $basearch - Base

    baseurl= http://centos.ustc.edu.cn/centos/4/os/i386/
  4. 更新yum: yum update 等待更新完成就可以使用yum了。
  5. 下面是yum 基本命令介绍
    install
    is used to install the latest version of a package or group of packages while ensuring that all dependencies are satisfied.
    If no package matches the given package name(s), they are assumed to be a shell glob and any matches are then installed.

    update If run without any packages, update will update every currently installed package. If one or more packages are specified,
    Yum will only update the listed packages. While updating packages, yum will ensure that all dependencies are satisfied.
    If no package matches the given package name(s), they are assumed to be a shell glob and any matches are then installed.

    check-update
    Implemented so you could know if your machine had any updates that needed to be applied without running it interactively.
    Returns exit value of 100 if there are packages available for an update. Also returns a list of the pkgs to be updated in
    list format. Returns 0 and no packages are available for update.

    upgrade
    Can take packages as arguments, upgrade is just like update except that it includes package obsoletes in its calculations -
    this makes it better for distro-version changes, for example: upgrading from somelinux 8.0 to somelinux 9. *deprecated* -
    this command may be removed in the future.

    remove is used to remove the specified packages from the system as well as removing any packages which depend on the package being
    removed.

    list can be used to list various information about available packages; more complete details are available in the List Options
    section below.

    provides
    can be used to find out which package provides some feature or file. Just use a specific name or a file-glob-syntax wild-
    cards to list the packages available or installed that provide that feature or file.

    search can be used to find any packages matching a string in the description, summary, packager and package name fields of an rpm.
    Useful for finding a package you do not know by name but know by some word related to it. Takes the same file glob wild-
    cards as provides.

    info can be used to list a description and summary information about available packages; takes the same arguments as in the List
    Options section below.

    clean is used to clean up various things which accumulate in the yup cache directory over time. More complete details can be
    found in the Clean Options section below.

    原创文章,转载请注明:   转载自Martin

    本文链接地址:   red hat centos 安装 yum


分享到:
评论

相关推荐

    修改red hat yum 源为centos

    将red hat 7.3或7.4的yum源改为 Centos 的yum源。文件放一起。要root

    RedHat6.4收费yum改CentOS免费yum.zip

    RedHat Enterprise Linux 6.4使用yum安装出现This system is not registered to Red Hat Subscription Management问题,但是发现激活Redhat的yum功能需要收费,所以就更改为CentOS的yum包了。 综合多份文档,本人...

    yum源,系统版本:Red Hat Enterprise Linux Server release 6.8 (Santiago)

    Red Hat 系统使用 CentOS的yum源配置文件,CentOS-Base.repo,Red Hat Enterprise Linux Server release 6.8 (Santiago)测试可用, release 6.5, release 6.9应该也可以

    redhat7配置成centos yum安装包和yum源

    Red Hat Enterprise Linux7的更新包只对注册的用户生效,所以需要自己手动改成Centos的更新包,Centos几乎和和Redhat是一样的,所以无需担心软件包的兼容问题。

    Redhat7 安装 yum 亲测 图解 这是安装全量包 包括 CentOS-Base.repo配置文件_Redhat7_YUM.rar

    linux安装yum后,使用yum下载gcc异常,This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.解决办法

    red hat或centos7下安装gcc6.4.0

    在centos7或Linux下安装gcc-6.4.0.red hat下安装可能失败,如果失败修改yum源(我上传了,下载即可)。以root运行脚本。(我已经试过了,成功。但后来又修改了一下,没试过修改后的,可能失败,你看着办)

    CentOS-6.5-x86_64xunlei种子文件.zip

     3.CentOS独有的yum命令支持在线升级,可以即时更新系统,不像RED HAT那样需要花钱购买支持服务!  4.CentOS修正了许多RHEL的BUG!  5.CentOS版本说明:CentOS3.1 等同于 RED HAT AS3 Update1 CentOS3.4 ...

    yum for centos7

    centos7下的yum安装包,用于在redhat系统中执行yum命令时提示"This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register

    Centos部署Yum、JDK、Nginx、Tomcat、MySQL、Emqx、FTP及配置(超详细)

    本说明文档针对centos最小安装操作系统部署Yum、JDK、Nginx、Tomcat、MySQL、Emqx、FTP及配置整理,建议指定一个统一目录进行安装配置,便于后续管理。 CentOS Linux发行版是一个稳定的,可预测的,可管理的和可复现...

    RedHat 6.4 重新安装yum

    RedHat 6.4 为解决This system is not registered to Red Hat Subscription Management问题,删除默认yum,重新安装的四个RPM包 python-iniparse-0.3.1-2.1.el6.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64...

    解决redhat 8.2 yum报错 This system is

    解决redhat 8.2 yum报错 This system is not registered to Red Hat Subscription Management 解决redhat8安装centos8的rpm出错的问题

    硬盘安装CentOS7

    如果是做服务器、工作站、开发等,个人比较推崇Red Hat系列的,其中,CentOS是RHEL的重编译社区版,安全、稳定、高效,并且可以通过yum服务在线升级,我想是个不二的选择。 安装Windows和Linux双系统的方式很多,...

    CentOS 安装redis和MySQL

    1|0MySQL(MariaDB) 1|1一,说明 MariaDB数据库管理系统是MySQL的一个...Red Hat Enterprise Linux/CentOS 7.0 发行版已将默认的数据库从 MySQL 切换到 MariaDB。 1|2二,添加 MariaDB yum 仓库 当前环境:阿里云的y

    VMware 安装centos6.5图文教程

    1. 主流: 目前的Linux操作系统主要应用于生产环境,主流企业级Linux系统仍旧是RedHat或者CentOS ...3. 更新方便:CentOS独有的yum命令支持在线升级,可以即时更新系统,不像RED HAT那样需要花钱购买支持服务!

    redhat7.5下载文件.zip

    红帽7.5更换yum源为centos源 操作步骤:参考以下链接。...标题:RedHat Enterprise Linux 6.4使用yum安装出现This system is not registered to Red Hat Subscription Management_天行健,君子以自强不息-CSDN博客 ...

    yum-3.4.3-158.el7.centos.noarch.rpm

    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

    CentOS8安装SQLServer2019的过程

    1.下载 Microsoft SQL Server 2019 Red Hat 存储库配置文件: #curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo 2.运行以下命令以安装 SQL ...

    CentOS7 64位安装全过程

    基于 Red Hat Enterprise Linux (RHEL) 源代码构建,因此具有稳定性和可靠性。 支持广泛的硬件架构,适用于服务器和桌面环境。 使用 YUM 软件包管理器,方便安装、更新和删除软件包。 提供强大的安全性功能,如 ...

    red hat Linux安装myaql

    但是MySQL数据库软件从默认的程序列表中移除,用mariadb代替了,Linux配置教程上,大多都是安装mariadb,因为centos7默认将mariadb视作mysql,所有要按照mysql需要下载 安装前先检查链接库文件有没有安装使用 命令...

Global site tag (gtag.js) - Google Analytics