網頁

2015年1月17日 星期六

CentOS 7.x --- Install Clamav from ATrpms Repository

ATrpms is a 3rd party rpm repository for Red Hat/CentOS/Fedora and this repository has included many non-scientific software titles, like system tools(as Clamav) or multimedia packages.
In the moment, we will demo How to install package from ATrpms repository.

At first, we have to import ATrpms’ signing key by using rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms command.
ScreenHunter_474
Then there is some method to install this repository as follows:
Install binary package manually
We can explore the ATrpms Packageing Site and download it by choosing the right platform.擷取選取區域_002.jpg
After download finished, we can install this configuration file for package managers by using the rpm -ivh atrpms-repo-7-7.el7.x86_64.rpm command擷取選取區域_005.jpg

Or
To install this configuration file for package managers by using the using rpm -Uvh http://dl.atrpms.net/el7-x86_64/atrpms/stable/atrpms-repo-7-7.el7.x86_64.rpm commandScreenHunter_475

Add a new repository
To add the following content into the /etc/yum.repos.d/atrpms.repo file
[atrpms]
name=CentOS Linux $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el7-$basearch/atrpms/stable
gpgkey=http://atrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1

If the above method depend on which one is choose has already been finished, we need to firstly clean up the cached information by using the yum clean all command擷取選取區域_010.jpg

To verify that the ATrpms repository is enabled by using the yum repolist or yum repolist all command.
擷取選取區域_012.jpg

To update the repositories by using the yum check-update command擷取選取區域_013.jpg

To search the clamav package(A GPL virus scanner) is available from ATrpms repository by using the yum --enablerepo=”atrpms” info clamav command
ScreenHunter_479

If it is ready, we will install the clamav package by using the yum --enablerepo=”atrpms” install clamav command
ScreenHunter_480

Reference :
(# 1).
   Using yum priorities plugin, we can avoid package conflicts as a result of having multiple repositories enabled.
To install Yum priorities by using the yum install yum-priorities command. 擷取選取區域_009.jpg
After the plugin is installed, make sure that it is enabled on /etc/yum/pluginconf.d/priorities.conf file as follows:
[main]
enabled = 1

When the plugin is enabled, we have to edit each repository file under the /etc/yum.repos.d/ directory to add priorities.
for example:  CentOS Base repository
         1.Add priority=1 to the end of the following sections [base] - [updates] - [extras]
         2.Add priority=11 to the end of the following sections [centosplus] - [contrib]

In general,
          [base], [addons], [updates], [extras] ... priority=1
          [centosplus] priority=1 (same priority as base and updates) but should be left disabled
          [contrib] ... priority=2
          Third Party Repos ... priority=N  (where N is > 10 and based on your preference)

(# 2).   How to know where is the required packages? Maybe the answer is from Linux Packages Search
Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.