[Translated] Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL

This commit is contained in:
zhengsihua 2014-11-01 10:35:44 +08:00
parent 5daacff93c
commit 172e156f5f
2 changed files with 52 additions and 54 deletions

View File

@ -1,54 +0,0 @@
Translating--------geekpi
Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL
================================================================================
> **Question**: How can I configure the REMI repository on CentOS or RHEL, and install packages from the REMI repository?
The [REMI repository][1] offers updated versions of core CentOS and RHEL packages, notably the latest PHP/MySQL stack.
One thing to remember before installing the REMI repository is that it is not recommended to run yum update with the REMI repository. Since the package names of the REMI repository are the same as those used in the official RHEL/CentOS repositories, running yum update may trigger accidental upgrades of core packages. It is a good idea to keep the REMI repository disabled, and enable it only when you need to install packages that are only available in REMI.
### Prerequisite ###
Before installing REMI repository, you first need to enable the EPEL repository because some packages in REMI depend on EPEL. Follow [this guide][2] to set up EPEL repository on CentOS or RHEL.
### Install REMI Repository ###
Now go ahead and install REMI repository as follows.
On CentOS 7:
$ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
$ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
On CentOS 6:
$ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
$ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
By default, the REMI repository is set disabled. To check whether the REMI repository is successfully installed, use this command. You will see several REMI repositories such as remi, remi-php55 and remi-php56.
$ yum repolist disabled | grep remi
![](https://farm4.staticflickr.com/3956/15443851690_a1abe9eb40_z.jpg)
### Install a Package from REMI Repository ###
As clarified, it is a good idea to keep the REMI repository disabled, and use it only when necessary.
To search or install a package in the REMI repository, use these commands:
$ sudo yum --enablerepo=remi search <keyword>
$ sudo yum --enablerepo=remi install <package-name>
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/install-remi-repository-centos-rhel.html
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://rpms.famillecollet.com/
[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html

View File

@ -0,0 +1,52 @@
Linux 有问必答 -- 如何在CentOS或者RHEL上安装REMI仓库
================================================================================
> **Question**我该如何在CentOS或者RHEL中配置REMI仓库并在其中安装包
[REMI 仓库][1] 提供了核心CentOS和RHEL包的更新版本尤其是最新的PHP/MySQL系列。
安装REMI仓库要记住的一件事是不要在REMI仓库中运行yum update。因为REMI仓库的包名RHEL/CentOS中的相同运行yum update可能会触发意外的更新。一个好办法是禁用REMI仓库在你需要安装RMEI仓库中独有的包时再启用。
### 预备工作 ###
安装REMI仓库之前你首先需要启用EPEL仓库因为REMI中的一些包依赖与EPEL。按照[这份指南][2]在CentOS或者RHEL中设置EPEL仓库。
### 安装REMI仓库 ###
现在按照下面的步骤安装REMI仓库。
在CentOS 7上:
$ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
$ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
在CentOS 6上:
$ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
$ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
默认上REMI是禁用的。要检查REMI是否已经成功安装使用这个命令。你会看到几个REMI仓库比如remi、remi-php55和remi-php56。
$ yum repolist disabled | grep remi
![](https://farm4.staticflickr.com/3956/15443851690_a1abe9eb40_z.jpg)
### 从REMI仓库中安装一个包 ###
如上所述最好保持禁用REMI仓库只有在需要的时候再启用。
要搜索或安装REMI仓库中的包使用这些命令:
$ sudo yum --enablerepo=remi search <keyword>
$ sudo yum --enablerepo=remi install <package-name>
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/install-remi-repository-centos-rhel.html
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://rpms.famillecollet.com/
[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html