Get 25 USD Free To USE VPSSIM

Thêm EPEL và Remi repo trên Centos và Red Hat 5, 6, 7

Posted on: 29/10/2014 Last Updated: 29/10/2014 No comments

EPEL ( Fedora Extra Packages for Enterprise Linux ) repo cung cấp rất nhiều gói cài đặt chúng ta thường sử dụng nhưng lai không có sẵn trong repo của Centos.

huong dan cai dat epel remi repo tren centos 5 centos 6 centos 7

Sau đây là cách cài đặt EPEL và REMI REPO trên CENTOS và RED HAT 5, 6, 7 bản 32 và 64 bít

Cài đặt EPEL repo

CentOS 5 và Red Hat 5

CentOS/RHEL 5, 32 Bit (i386):
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

 

CentOS 6 và  Red Hat 6

CentOS/RHEL 6, 32 Bit (i386):
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

CentOS/RHEL 6, 64 Bit x86_64):
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

 

CentOS 7 và  Red Hat 7

## RHEL/CentOS 7 64-Bit ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm

 

Cài đặt Remi  repo

CentOS 5.x và  Red Hat 5.x

## RHEL/CentOS 5 64-Bit ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

## RHEL/CentOS 5 32-Bit ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

 

CentOS 6.x và  Red Hat 6.x

CentOS/RHEL 6, 64 Bit (x86_64):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 

CentOS/RHEL 6, 32 Bit (i386):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

CentOS 7.x và  Red Hat 7.x

CentOS/RHEL 7, 64 Bit (x86_64):
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm 

 

Các sử dụng Remi Repo

Remi Repo tắt theo mặc định. Mỗi khi muốn sử dụng chúng ta thường thêm –enablerepo=remi  vào trong lệnh để cài đặt phần mềm có trong repo này.

Ví dụ:

sudo yum --enablerepo=remi install php-soap

Nếu bạn muốn enable remi repo thành mặc định, bạn có thể edit file config của remi (dùng nano hay trình edit txt cũng được. )

sudo nano /etc/yum.repos.d/remi.repo

thay đổi giá trị enable=0 thành enable=1 ta được

name=Les RPM de remi pour Enterprise Linux 6 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Kiểm tra các Repo đang được enable

Ta sử dụng lệnh sau để check:

yum repolist

kết quả được tương tự:

repo id           repo name                                               status
base              CentOS-6 - Base                                          6,518
epel              Extra Packages for Enterprise Linux 6 - x86_64          11,146
extras            CentOS-6 - Extras                                           15
mariadb           MariaDB                                                     14
rpmforge          RHEL 6 - RPMforge.net - dag                              4,718
updates           CentOS-6 - Updates                                         172
repolist: 22,583

Kiểm tra các repo đang được diabale bằng lệnh:

yum repolist disabled

No Related Post



Tạm thời mình đóng comment, bạn vui lòng sử dụng diễn đàn để được trả lời nhanh nhất.
Diễn đàn: https://community.vpssim.vn

Không bỏ lỡ tin tức, bài viết mới trên
HostingAZ.VN