Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

CentOS yum configuration installation software and configuration file modification method

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "CentOS yum configuration installation software and configuration file modification method". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Very fastidious CentOS yum configuration has this powerful system function, I am mainly to let the people understand the CentOS yum configuration, and the related system yum configuration introduction, CentOS community Linux distribution is called CentOS Linux, due to the use of RHEL source code recompiled to generate a new release version, CentOS Linux has very good compatibility with RHEL products, and inherently has many excellent features of RHEL.

Install software and other aspects of Linux Enterprise 5 CentOS yum configuration used to use CentOS yum configuration is very convenient, but it is not so easy to come to RHLE, if you do not do the following settings, often can not install software through CentOS yum configuration, the following is the detailed configuration.

First of all, the rhel5 system is already configured with CentOS yum when it is installed, just because if you update it with an official website, unless you bought rhel5 with money. Otherwise, it will prompt you to register or something. So just change the update address of yum to open source. The file that defines the address of the CentOS yum configuration update is in / etc/yum.repos.d/. First change them to backup files, that is, add .bak at the end.

[root@killgoogle ~] # mv / etc/yum.repos.d/rhel-debuginfo.repo / etc/yum.repos.d/rhel-debuginfo.repo.bak

[root@killgoogle ~] # mv / etc/yum.repos.d/rpmforge.repo.rpmnew / etc/yum.repos.d/rpmforge.repo.rpmnew.bak

Create a new profile:

[root@killgoogle ~] # cd / etc/yum.repos.d

[root@killgoogle ~] # touch rhel-debuginfo.repo

[root@killgoogle ~] # touch mirrors-rpmforge

[root@killgoogle ~] # touch rpmforge.repo

Write to the new configuration file:

[root@killgoogle ~] # vi rhel-debuginfo.repo [base] name=CentOS-5-Base # mirrorlist= http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&repo=os # baseurl= http://mirror.centos.org/centos/$releasever/os/$basearch/baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/gpgcheck=1 gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5#released updates

[update] name=CentOS-5-Updates # mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updatesbaseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/gpgcheck=1 gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5#packages used/produced in the build but not released

[addons] name=CentOS-***ddons # mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addonsbaseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/gpgcheck=1 gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5#additional packages that may be useful

[extras] name=CentOS-5-Extras # mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extrasbaseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/

Gpgcheck=1 gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5#additional packages that extend functionality of existing packages [centosplus] name=CentOS-5-Plus # mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplusbaseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/gpgcheck=1 enabled=0 gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5#contrib-packages by Centos Users

[contrib] name=CentOS-5-Contrib # mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contribbaseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/gpgcheck=1enabled=0 gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5# vi dag.repo [dag] name=Dag RPM Repository for RHEL5 baseurl= http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/enabled=1 gpgcheck=1 gpgkey= http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

Modify the second configuration file:

[root@killgoogle ~] vi mirrors-rpmforge

Http://apt.sw.be/redhat/el5/en/$ARCH/dag

Http://archive.cs.uu.nl/mirror/dag.wieers/redhat/el5/en/$ARCH/dag

Http://ftp2.lcpe.uni-sofia.bg/freshrpms/pub/dag/redhat/el5/en/$ARCH/dag

# http://ftp.heanet.ie/pub/freshrpms/pub/dag/redhat/el5/en/$ARCH/dag

Http://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/$ARCH/dag

Http://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el5/en/$ARCH/dag

Http://mirrors.ircam.fr/pub/dag/redhat/el5/en/$ARCH/dag

Http://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/$ARCH/dag

Http://rpmfind.net/linux/dag/redhat/el5/en/$ARCH/dag

Http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el5/en/$ARCH/dag

Http://www.mirrorservice.org/sites/apt.sw.be/redhat/el5/en/$ARCH/dag

Modify the third configuration file:

[root@killgoogle ~] # vi rpmforge.repo

# Name: RPMforge RPM Repository for Red Hat Enterprise 5-dag

# URL: http://rpmforge.net/

[rpmforge] name = Red Hat Enterprise $releasever-RPMforge.net-dag

# baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag

Mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge

# mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge

Enabled = 1 protect = 0 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag gpgcheck = 1

If the wind speed is slow, you can increase the timeout of the CentOS yum configuration so that you don't always exit because of the timeout. [root@killgoogle ~] vi / etc/yum.conf adds this sentence: timeout=120 is almost done here. There is one more package to install: if rpmforge-release-0.3.6-1.el5.rf.i386.rpm is not installed, the following error may occur: GPG key retrieval failed: [Errno 5] OSError: [Errno 2] does not have that file or directory:'/ etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag' to http://rpmfind.net/linux/RPM/ to find this package Then [root@killgoogle ~] rpm-ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm is followed by typing KEY. [root@killgoogle ~] rpm-- import http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-5 so that the basic CentOS yum configuration can be used. However, if you feel uncomfortable, you can also optimize: speed up the CentOS yum configuration [root@killgoogle ~] yum install yum-fastestmirror yum-presto or remove the mirror of the software source: you can remove the slow mirror from the baseurl to remove the speed test record file of your CentOS yum configuration image:

/ solution to var/cache/yum/timedhosts.txt yum Existing lock error

If the system starts up, the CentOS yum configuration appears Existing lock / var/run/yum.pid: another copy is running as pid 3380. Aborting. You can use the following methods: [root@killgoogle ~] / etc/init.d/yum-updatesd stop can also use the following methods: [root@killgoogle ~] rm-f / var/run/yum.pid the main reason is that CentOS yum is configured to update automatically as long as you turn it off. Now you can test whether it can be used or not: [root@killgoogle ~] yum install mplayer this is the installation of mplayer. If you want to delete it, it is [root@killgoogle ~] yum remove mplayer.

This is the end of the introduction of "CentOS yum configuration installation software and configuration file modification method". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report