Quickly configure Yum Test Update library for CentOS

Source: Internet
Author: User
Tags gpg install php testlink

We know CentOS by Yum/etc/yum.repos.d/ Centos-base.repo in the configuration of the mirror server to find updates, the customer recently installed a mantis and Testlink build test platform, found that CentOS with PHP is 5.1 version, does not support the latest phpMyAdmin and Testlink, the latest version of both applications are Requires a 5.2 or later version of the PHP environment.

Check the relevant information on the Internet found that in fact, CentOS team also maintains a test update library, there are many "test" version of the application (temporarily only so called, my understanding is due to a variety of reasons not officially released), after a simple modification can get the following configuration file:

# Centos-base.repo
#
# The Mirror system uses the connecting IP address of the client and the
# Update status of each mirror to pick mirrors, are updated to and
# Geographically close to the client. You are should use this for CentOS updates
# Unless you are manually picking the other mirrors.
#
# If The mirrorlist= does not work for your, as a fall back you can try the
# remarked out Baseurl= line instead.
#
#

[Base]
name=centos-$releasever-base
mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=os
#baseurl =http://mirror.centos.org/centos/$releasever/os/$basearch/
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5

#released Updates
[Updates]
name=centos-$releasever-updates
mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=updates
#baseurl =http://mirror.centos.org/centos/$releasever/updates/$basearch/
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5

#packages used/produced in the builds but not released
[Addons]
name=centos-$releasever-addons
mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=addons
#baseurl =http://mirror.centos.org/centos/$releasever/addons/$basearch/
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5

#additional packages that useful
[Extras]
name=centos-$releasever-extras
mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=extras
#baseurl =http://mirror.centos.org/centos/$releasever/extras/$basearch/
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5

#additional packages that extend functionality of existing packages
[Centosplus]
name=centos-$releasever-plus
mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=centosplus
#baseurl =http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
Gpgcheck=1
enabled=0
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5

#contrib-packages by Centos Users
[Contrib]
name=centos-$releasever-contrib
mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=contrib
#baseurl =http://mirror.centos.org/centos/$releasever/contrib/$basearch/
Gpgcheck=1
enabled=0
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5

[Testing]
name=centos-$releasever-testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=0
Gpgcheck=1
Gpgkey=http://dev.centos.org/centos/rpm-gpg-key-centos-testing

You can add a [testing] section at the end of the configuration file, noting that the configuration section and the two configuration sections on the system that it has set up parameters enabled=0 , usually we perform Yum upgrade without being checked, only through appropriate modifications , we are likely to find or update more applications through these libraries (since the CentOS team is not officially released, it is recommended to be used only "in case of necessity"), for example, I want to install the latest PHP, execute the following command on the console, Yum will discover and prompt if you want to install version 5.2.9-2 php:

Yum Install PHP--disablerepo=/*--enablerepo=testing

Note that the use of the latter two parameters, shielding the use of other updates, open the test update library, this way to find the 5.2 version of PHP, exactly what I need; in fact, in this way can also find a higher version of MySQL and Apache Http server, etc. But it's up to you to decide whether to update it or not. :)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.