How to Install EPEL Yum Repository on Linux CentOS 7 / RHEL 7

Epel yum repository is an open source centos yum repository or rpm repository for developers and system administrators to perform the installation of RPM packages via yum on their virtual private server (VPS) or dedicated server.

EPEL yum repository is redhat yum repository for CentOS and additional yum repository for the existing CentOS repository.

It provides 100 % high quality software packages for Linux distributions, including RHEL (Red Hat Enterprise Linux), CentOS and Debian, and all packages maintained by Fedora repo team.

1. Prepare EPEL repository for RHEL 7/CentOS 7 64 bit (epel centos 7/epel rhel 7) :

# sudo rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
# # sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm

Example :

# sudo rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
# sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:epel-release-7-9                 ################################# [100%]

In CentOS 7, an alternative way to install the EPEL repo is by using the command yum :

# sudo yum install epel-release -y

2. Command to verify that the EPEL repository is enabled.

# sudo yum repolist

Sample output :

# sudo yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.linode.com
 * epel: ftp.osuosl.org
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com
repo id                                                       repo name                                                                                 status
base/7/x86_64                                                 CentOS-7 - Base                                                                            9,363
epel/x86_64                                                   Extra Packages for Enterprise Linux 7 - x86_64                                            11,046
extras/7/x86_64                                               CentOS-7 - Extras                                                                            200
nginx/x86_64                                                  nginx repo                                                                                    41
updates/7/x86_64                                              CentOS-7 - Updates                                                                           438
varnish-4.1/x86_64                                            Varnish Cache 4.1 for Enterprise Linux                                                        31
repolist: 21,119

3. Install httpd package using epel repo option –enablerepo=epel :

# sudo yum --enablerepo=epel install httpd

EPEL Yum Repository

How to Prepare Local Yum Repository from CD-ROM/DVD-ROM image on RHEL 7

If you have installed Red Hat Enterprise Linux 7 (RHEL 7) but do not have access to the redhat official repo, you will encounter problems installing and updating software. To solve the above problems, I have prepared a short step to update and install the RPM package from the CD-ROM/DVD-ROM image for RHEL 7. This step can also be used in RHEL 6 or older versions such as RHEL 5. For linux servers that do not have access to the internet or no access to the RHEL official repository, the steps below will help.

1. Mount the ISO from the DVD-ROM into /mnt directory :

[root@rhel7 ~]# mount /dev/cdrom /mnt

2. Take note the media ID :

[root@rhel7 ~]# cat /mnt/media.repo
[InstallMedia]
name=RHEL-7.0 Server.x86_64
mediaid=1294067623.154321
metadata_expire=-1
gpgcheck=0
cost=500

3. Create rhel7.repo text file in /etc/yum.repos.d/ with the following content. Make sure you include the correct media ID as above. Save the file :

[root@rhel7 ~]# vi /etc/yum.repos.d/rhel7.repo
[Local-DVD-RHEL7-Repository]
mediaid=1294067623.154321
name=DVD-RHEL7 repository
baseurl=file:///mnt
enabled=1
gpgcheck=0

4. Install, remove and update using yum command.

[root@rhel7 ~]# yum install perl -y

Example :

[root@rhel7 ~]# yum install perl -y
..
..
====================================================================================================
 Package                    Arch       Version                 Repository                      Size
====================================================================================================
Installing:
 perl                       x86_64     4:5.16.3-283.el7        Local-DVD-RHEL7-Repository     8.0 M
Installing for dependencies:
 perl-Carp                  noarch     1.26-244.el7            Local-DVD-RHEL7-Repository      19 k
 perl-Encode                x86_64     2.51-7.el7              Local-DVD-RHEL7-Repository     1.5 M
 perl-Exporter              noarch     5.68-3.el7              Local-DVD-RHEL7-Repository      28 k
 perl-File-Path             noarch     2.09-2.el7              Local-DVD-RHEL7-Repository      27 k
 perl-File-Temp             noarch     0.23.01-3.el7           Local-DVD-RHEL7-Repository      56 k
 perl-Filter                x86_64     1.49-3.el7              Local-DVD-RHEL7-Repository      76 k
 perl-Getopt-Long           noarch     2.40-2.el7              Local-DVD-RHEL7-Repository      56 k
 perl-HTTP-Tiny             noarch     0.033-3.el7             Local-DVD-RHEL7-Repository      38 k
 perl-PathTools             x86_64     3.40-5.el7              Local-DVD-RHEL7-Repository      83 k
 perl-Pod-Escapes           noarch     1:1.04-283.el7          Local-DVD-RHEL7-Repository      50 k
 perl-Pod-Perldoc           noarch     3.20-4.el7              Local-DVD-RHEL7-Repository      87 k
 perl-Pod-Simple            noarch     1:3.28-4.el7            Local-DVD-RHEL7-Repository     216 k
 perl-Pod-Usage             noarch     1.63-3.el7              Local-DVD-RHEL7-Repository      27 k
 perl-Scalar-List-Utils     x86_64     1.27-248.el7            Local-DVD-RHEL7-Repository      36 k
 perl-Socket                x86_64     2.010-3.el7             Local-DVD-RHEL7-Repository      49 k
 perl-Storable              x86_64     2.45-3.el7              Local-DVD-RHEL7-Repository      77 k
 perl-Text-ParseWords       noarch     3.29-4.el7              Local-DVD-RHEL7-Repository      14 k
 perl-Time-Local            noarch     1.2300-2.el7            Local-DVD-RHEL7-Repository      24 k
 perl-constant              noarch     1.27-2.el7              Local-DVD-RHEL7-Repository      19 k
 perl-libs                  x86_64     4:5.16.3-283.el7        Local-DVD-RHEL7-Repository     686 k
 perl-macros                x86_64     4:5.16.3-283.el7        Local-DVD-RHEL7-Repository      42 k
 perl-parent                noarch     1:0.225-244.el7         Local-DVD-RHEL7-Repository      12 k
 perl-podlators             noarch     2.5.1-3.el7             Local-DVD-RHEL7-Repository     112 k
 perl-threads               x86_64     1.87-4.el7              Local-DVD-RHEL7-Repository      49 k
 perl-threads-shared        x86_64     1.43-6.el7              Local-DVD-RHEL7-Repository      39 k

..
..

How to Enable EPEL and Remi Repository into CentOS 6

EPEL stand for Extra Packages for Enterprise Linux. EPEL repository is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Enterprise Linux(OEL). Remi repository is a yum repository maintained by a French dude – Remi Collet. This post describe the basic steps to prepare and install the additional CentOS packages with EPEL and Remi Repository into CentOS 6.

EPEL Repository

rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Remi Repository

rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Example :

[root@centos6 ~]# rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
[root@centos6 ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]
[root@centos6 ~]# rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
[root@centos6 ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Preparing...                ########################################### [100%]
   1:remi-release           ########################################### [100%]

Example of EPEl and Remi repo usage :

[root@centos6 ~]# yum --enablerepo=epel install httpd -y
[root@centos6 ~]# yum --enablerepo=remi install httpd -y

How to Install and Configure 389 LDAP Directory Server on CentOS 6.5

Install and Configure 389 LDAPA directory server provides a centralized directory service for your organization. It is alternative to windows active directory. This post will describes how to install and configure 389 LDAP Directory Server with a basic Lightweight Directory Access Protocol (LDAP) directory implementation. 389 Directory Server was formerly known as the Fedora Directory Server and it is an enterprise-class open source LDAP. 389 Directory server has been developed by Red Hat, as part of Red Hat’s community-supported Fedora Project.

Steps to Install and Configure 389 LDAP Directory Server

TCP and Files system Tuning :
a) Decrease the time default value for tcp_keepalive_time connection. Edit the /etc/sysctl.conf file and add the following lines to the bottom of sysctl.conf ”

[root@ldap ~]# echo "net.ipv4.tcp_keepalive_time = 300" >> /etc/sysctl.conf
b) Increase number of local system ports available by editing this parameter in the /etc/sysctl.conf file :
[root@ldap ~]# echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf

c) Increase the file descriptors by running these commands:

[root@ldap ~]# echo "64000" > /proc/sys/fs/file-max
[root@ldap-05 ~]# echo "fs.file-max = 64000" >> /etc/sysctl.conf

d) Increase ulimit in /etc/profile :

[root@ldap ~]# echo "ulimit -n 8192" >> /etc/profile

389 Installation :

1. Prepare EPEL Repository on CentOS 6 :
How to Prepare EPEL Repository on CentOS 6

What packages and versions are available in EPEL?
You can take a look on any of the available EPEL mirrors from our mirror list

Alternately, you can browse the package set using repoview:

2. Configure hostname, FQDN and host file has been configured correctly :

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.0.5     ldap.ehowstuff.local

3. Make sure selinux is disabled :
Disable SELinux on CentOS 6.5

4. Install the 389 Directory Server packages :

[root@ldap ~]# yum install 389-ds -y

5. Fix Error: command ‘getsebool httpd_can_connect_ldap’ failed – output [getsebool: SELinux is disabled :

[root@ldap ~]# mkdir ~/bin
[root@ldap ~]# vi ~/bin/getsebool
#!/bin/sh
echo on
exit 0
[root@ldap ~]# vi ~/bin/setsebool
#!/bin/sh
exit 0
[root@ldap ~]# chmod +x ~/bin/*sebool

6. Run setup script to start configure the ldap service :

[root@ldap ~]# PATH=~/bin:$PATH setup-ds-admin.pl

==============================================================================
This program will set up the 389 Directory and Administration Servers.

It is recommended that you have "root" privilege to set up the software.
Tips for using this program:
  - Press "Enter" to choose the default and go to the next screen
  - Type "Control-B" then "Enter" to go back to the previous screen
  - Type "Control-C" to cancel the setup program

Would you like to continue with set up? [yes]:

==============================================================================
Your system has been scanned for potential problems, missing patches,
etc.  The following output is a report of the items found that need to
be addressed before running this software in a production
environment.

389 Directory Server system tuning analysis version 23-FEBRUARY-2012.

NOTICE : System is x86_64-unknown-linux2.6.32-431.el6.x86_64 (1 processor).

Would you like to continue? [yes]:

==============================================================================
Choose a setup type:

   1. Express
       Allows you to quickly set up the servers using the most
       common options and pre-defined defaults. Useful for quick
       evaluation of the products.

   2. Typical
       Allows you to specify common defaults and options.

   3. Custom
       Allows you to specify more advanced options. This is
       recommended for experienced server administrators only.

To accept the default shown in brackets, press the Enter key.

Choose a setup type [2]:

==============================================================================
Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
.
Example: eros.example.com.

To accept the default shown in brackets, press the Enter key.

Warning: This step may take a few minutes if your DNS servers
can not be reached or if DNS is not configured correctly.  If
you would rather not wait, hit Ctrl-C and run this program again
with the following command line option to specify the hostname:

    General.FullMachineName=your.hostname.domain.name

Computer name [ldap.ehowstuff.local]:

WARNING: There are problems with the hostname.
Hostname 'ldap.ehowstuff.local' is valid, but none of the IP addresses
resolve back to ldap.ehowstuff.local
- address 192.168.0.5 resolves to host centos6.5.ehowstuff.local

Please check the spelling of the hostname and/or your network configuration.
If you proceed with this hostname, you may encounter problems.

Do you want to proceed with hostname 'ldap.ehowstuff.local'? [no]: yes

==============================================================================
The servers must run as a specific user in a specific group.
It is strongly recommended that this user should have no privileges
on the computer (i.e. a non-root user).  The setup procedure
will give this user/group some permissions in specific paths/files
to perform server-specific operations.

If you have not yet created a user and group for the servers,
create this user and group using your native operating
system utilities.

System User [nobody]:
System Group [nobody]:

==============================================================================
Server information is stored in the configuration directory server.
This information is used by the console and administration server to
configure and manage your servers.  If you have already set up a
configuration directory server, you should register any servers you
set up or create with the configuration server.  To do so, the
following information about the configuration server is required: the
fully qualified host name of the form
.(e.g. hostname.example.com), the port number
(default 389), the suffix, the DN and password of a user having
permission to write the configuration information, usually the
configuration directory administrator, and if you are using security
(TLS/SSL).  If you are using TLS/SSL, specify the TLS/SSL (LDAPS) port
number (default 636) instead of the regular LDAP port number, and
provide the CA certificate (in PEM/ASCII format).

If you do not yet have a configuration directory server, enter 'No' to
be prompted to set up one.

Do you want to register this software with an existing
configuration directory server? [no]:

==============================================================================
Please enter the administrator ID for the configuration directory
server.  This is the ID typically used to log in to the console.  You
will also be prompted for the password.

Configuration directory server
administrator ID [admin]:
Password:
Password (confirm):

==============================================================================
The information stored in the configuration directory server can be
separated into different Administration Domains.  If you are managing
multiple software releases at the same time, or managing information
about multiple domains, you may use the Administration Domain to keep
them separate.

If you are not using administrative domains, press Enter to select the
default.  Otherwise, enter some descriptive, unique name for the
administration domain, such as the name of the organization
responsible for managing the domain.

Administration Domain [ehowstuff.local]:

==============================================================================
The standard directory server network port number is 389.  However, if
you are not logged as the superuser, or port 389 is in use, the
default value will be a random unused port number greater than 1024.
If you want to use port 389, make sure that you are logged in as the
superuser, that port 389 is not in use.

Directory server network port [389]:

==============================================================================
Each instance of a directory server requires a unique identifier.
This identifier is used to name the various
instance specific files and directories in the file system,
as well as for other uses as a server instance identifier.

Directory server identifier [ldap]:

==============================================================================
The suffix is the root of your directory tree.  The suffix must be a valid DN.
It is recommended that you use the dc=domaincomponent suffix convention.
For example, if your domain is example.com,
you should use dc=example,dc=com for your suffix.
Setup will create this initial suffix for you,
but you may have more than one suffix.
Use the directory server utilities to create additional suffixes.

Suffix [dc=ehowstuff, dc=local]:

==============================================================================
Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and typically has a
bind Distinguished Name (DN) of cn=Directory Manager.
You will also be prompted for the password for this user.  The password must
be at least 8 characters long, and contain no spaces.
Press Control-B or type the word "back", then Enter to back up and start over.

Directory Manager DN [cn=Directory Manager]:
Password:
Password (confirm):

==============================================================================
The Administration Server is separate from any of your web or application
servers since it listens to a different port and access to it is
restricted.

Pick a port number between 1024 and 65535 to run your Administration
Server on. You should NOT use a port number which you plan to
run a web or application server on, rather, select a number which you
will remember and which will not be used for anything else.

Administration port [9830]:

==============================================================================
The interactive phase is complete.  The script will now set up your
servers.  Enter No or go Back if you want to change something.

Are you ready to set up your servers? [yes]:
Creating directory server . . .
Warning: Hostname ldap.ehowstuff.local is valid, but none of the IP addresses
resolve back to ldap.ehowstuff.local
        address 192.168.0.5 resolves to host centos6.5.ehowstuff.local
Your new DS instance 'ldap' was successfully created.
Creating the configuration directory server . . .
Beginning Admin Server reconfiguration . . .
Creating Admin Server files and directories . . .
Updating adm.conf . . .
Updating admpw . . .
Registering admin server with the configuration directory server . . .
Updating adm.conf with information from configuration directory server . . .
Updating the configuration for the httpd engine . . .
Starting admin server . . .
output: Starting dirsrv-admin:
output:                                                    [  OK  ]
The admin server was successfully started.
Admin server was successfully reconfigured and started.
Exiting . . .
Log file is '/tmp/setupGwS8hs.log'

7. Start dirsrv and dirsrv-admin service :

[root@ldap ~]# /etc/init.d/dirsrv start
[root@ldap ~]# /etc/init.d/dirsrv-admin start

8. Make dirsrv and dirsrv-admin service auto start at boot :

[root@ldap ~]# chkconfig dirsrv on
[root@ldap ~]# chkconfig dirsrv-admin on

9. Configure Iptables to allow server listen on port 22, 389 and 9830 :

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 389 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 9830 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Restart iptables to take effect the changes :

[root@ldap ~]# service iptables restart
iptables: Applying firewall rules: [ OK ]

10. Verify port listen by the server using netstat :

[root@ldap ~]# netstat -plunt | grep LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1083/rpcbind
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 1125/perl
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1116/sshd
tcp 0 0 0.0.0.0:9830 0.0.0.0:* LISTEN 1508/httpd.worker
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1126/php-fpm
tcp 0 0 :::8140 :::* LISTEN 1161/httpd
tcp 0 0 :::111 :::* LISTEN 1083/rpcbind
tcp 0 0 :::80 :::* LISTEN 1161/httpd
tcp 0 0 :::22 :::* LISTEN 1116/sshd
tcp 0 0 :::443 :::* LISTEN 1161/httpd
tcp 0 0 :::8443 :::* LISTEN 1161/httpd
tcp 0 0 :::389 :::* LISTEN 1391/./ns-slapd

11. Verify port listen by the server and opened by iptables firewall :

[root@ldap ~]# iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:389
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:9830
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

How to Install and Configure 389 LDAP Directory Server on CentOS 6.4

389389 Directory Server is an enterprise-class open source Lightweight Directory Access Protocol (LDAP) server for Linux and based on Fedora Directory Server. 389 Directory server has been developed by Red Hat, as part of Red Hat’s community-supported Fedora Project. This steps has been tested on CentOS 6.4 x86_64 and may work on other version of CentOS as well.

1. Prepare EPEL repository.

2. Install 389-ds file :

[root@centos64 ~]# yum install 389-ds -y

3. Enable SELINUX :

[root@centos64 ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted

4. Configure hostname, FQDN and host file has been configured correctly :

[root@centos64 ~]# hostname
centos64.ehowstuff.local
[root@centos64 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.2.64    centos64.ehowstuff.local centos64

5. To install 389 LDAP, run the configuration script :

[root@centos64 ~]# /usr/sbin/setup-ds-admin.pl

==============================================================================
This program will set up the 389 Directory and Administration Servers.

It is recommended that you have "root" privilege to set up the software.
Tips for using this program:
  - Press "Enter" to choose the default and go to the next screen
  - Type "Control-B" then "Enter" to go back to the previous screen
  - Type "Control-C" to cancel the setup program

Would you like to continue with set up? [yes]:

==============================================================================
Your system has been scanned for potential problems, missing patches,
etc.  The following output is a report of the items found that need to
be addressed before running this software in a production
environment.

389 Directory Server system tuning analysis version 23-FEBRUARY-2012.

NOTICE : System is x86_64-unknown-linux2.6.32-358.2.1.el6.x86_64 (2 processors).

NOTICE : The net.ipv4.tcp_keepalive_time is set to 7200000 milliseconds
(120 minutes).  This may cause temporary server congestion from lost
client connections.

WARNING: There are only 1024 file descriptors (soft limit) available, which
limit the number of simultaneous connections.

WARNING  : The warning messages above should be reviewed before proceeding.

Would you like to continue? [no]: yes

==============================================================================
Choose a setup type:

   1. Express
       Allows you to quickly set up the servers using the most
       common options and pre-defined defaults. Useful for quick
       evaluation of the products.

   2. Typical
       Allows you to specify common defaults and options.

   3. Custom
       Allows you to specify more advanced options. This is
       recommended for experienced server administrators only.

To accept the default shown in brackets, press the Enter key.

Choose a setup type [2]:

==============================================================================
Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
.
Example: eros.example.com.

To accept the default shown in brackets, press the Enter key.

Warning: This step may take a few minutes if your DNS servers
can not be reached or if DNS is not configured correctly.  If
you would rather not wait, hit Ctrl-C and run this program again
with the following command line option to specify the hostname:

    General.FullMachineName=your.hostname.domain.name

Computer name [centos64.ehowstuff.local]:

==============================================================================
The servers must run as a specific user in a specific group.
It is strongly recommended that this user should have no privileges
on the computer (i.e. a non-root user).  The setup procedure
will give this user/group some permissions in specific paths/files
to perform server-specific operations.

If you have not yet created a user and group for the servers,
create this user and group using your native operating
system utilities.

System User [nobody]:
System Group [nobody]:

==============================================================================
Server information is stored in the configuration directory server.
This information is used by the console and administration server to
configure and manage your servers.  If you have already set up a
configuration directory server, you should register any servers you
set up or create with the configuration server.  To do so, the
following information about the configuration server is required: the
fully qualified host name of the form
.(e.g. hostname.example.com), the port number
(default 389), the suffix, the DN and password of a user having
permission to write the configuration information, usually the
configuration directory administrator, and if you are using security
(TLS/SSL).  If you are using TLS/SSL, specify the TLS/SSL (LDAPS) port
number (default 636) instead of the regular LDAP port number, and
provide the CA certificate (in PEM/ASCII format).

If you do not yet have a configuration directory server, enter 'No' to
be prompted to set up one.

Do you want to register this software with an existing
configuration directory server? [no]:

==============================================================================
Please enter the administrator ID for the configuration directory
server.  This is the ID typically used to log in to the console.  You
will also be prompted for the password.

Configuration directory server
administrator ID [admin]:
Password:
Password (confirm):

==============================================================================
The information stored in the configuration directory server can be
separated into different Administration Domains.  If you are managing
multiple software releases at the same time, or managing information
about multiple domains, you may use the Administration Domain to keep
them separate.

If you are not using administrative domains, press Enter to select the
default.  Otherwise, enter some descriptive, unique name for the
administration domain, such as the name of the organization
responsible for managing the domain.

Administration Domain [ehowstuff.local]:

==============================================================================
The standard directory server network port number is 389.  However, if
you are not logged as the superuser, or port 389 is in use, the
default value will be a random unused port number greater than 1024.
If you want to use port 389, make sure that you are logged in as the
superuser, that port 389 is not in use.

Directory server network port [389]:

==============================================================================
Each instance of a directory server requires a unique identifier.
This identifier is used to name the various
instance specific files and directories in the file system,
as well as for other uses as a server instance identifier.

Directory server identifier [centos64]:

==============================================================================
The suffix is the root of your directory tree.  The suffix must be a valid DN.
It is recommended that you use the dc=domaincomponent suffix convention.
For example, if your domain is example.com,
you should use dc=example,dc=com for your suffix.
Setup will create this initial suffix for you,
but you may have more than one suffix.
Use the directory server utilities to create additional suffixes.

Suffix [dc=ehowstuff, dc=local]:

==============================================================================
Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and typically has a
bind Distinguished Name (DN) of cn=Directory Manager.
You will also be prompted for the password for this user.  The password must
be at least 8 characters long, and contain no spaces.
Press Control-B or type the word "back", then Enter to back up and start over.

Directory Manager DN [cn=Directory Manager]:
Password:
Password (confirm):

==============================================================================
The Administration Server is separate from any of your web or application
servers since it listens to a different port and access to it is
restricted.

Pick a port number between 1024 and 65535 to run your Administration
Server on. You should NOT use a port number which you plan to
run a web or application server on, rather, select a number which you
will remember and which will not be used for anything else.

Administration port [9830]:

==============================================================================
The interactive phase is complete.  The script will now set up your
servers.  Enter No or go Back if you want to change something.

Are you ready to set up your servers? [yes]:
Creating directory server . . .
Your new DS instance 'centos64' was successfully created.
Creating the configuration directory server . . .
Beginning Admin Server creation . . .
Creating Admin Server files and directories . . .
Updating adm.conf . . .
Updating admpw . . .
Registering admin server with the configuration directory server . . .
Updating adm.conf with information from configuration directory server . . .
Updating the configuration for the httpd engine . . .
Starting admin server . . .
output: Starting dirsrv-admin:
output:                                                    [  OK  ]
The admin server was successfully started.
Admin server was successfully created, configured, and started.
Exiting . . .
Log file is '/tmp/setupDJucbG.log'

6. Start dirsrv and dirsrv-admin service :

[root@centos64 ~]# /etc/init.d/dirsrv start
Starting dirsrv:
    centos64...                                            [  OK  ]
[root@centos64 ~]# /etc/init.d/dirsrv-admin start
Starting dirsrv-admin:
                                                           [  OK  ]

7. Make dirsrv and dirsrv-admin service auto start at boot :

[root@centos64 ~]# chkconfig dirsrv on
[root@centos64 ~]# chkconfig dirsrv-admin on

8. Check dirsrv and dirsrv-admin service status :

[root@centos64 ~]# /etc/init.d/dirsrv-admin status
dirsrv-admin (pid 1409) is running...
[root@centos64 ~]# /etc/init.d/dirsrv status
dirsrv centos64 (pid 1317) is running...

How to Configure EPEL Repository on CentOS 6.4 x86_64

epelEPEL repository is another extra repository that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL) and CentOS server. By using EPEL repository you can install some other third party software such as nagios, or bugzilla, phpmyadmin, or any other standard open source software just using yum command. These repositories are not officially supported by CentOS, but this repository provide much more current versions of popular PHP or MySQL applications. This post describe how you can prepare EPEL Repository on CentOS 6.4 x86_64.

1. Download and import the GPG keys for EPEL software packages:

[root@centos64 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
[root@centos64 ~]# rpm --import RPM-GPG-KEY-EPEL-6
[root@centos64 ~]# rm -f RPM-GPG-KEY-EPEL-6

2. Download and install EPEL repository for 64-bit CentOS :

[root@centos64 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@centos64 ~]# rpm -ivh epel-release-6-8.noarch.rpm
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]

Alternately, you can browse other version of EPEL package set using repoview:

How to Install yum-priorities on CentOS 6.3

centos6The priorities plugin can be used to enforce ordered protection of repositories, by associating priorities to repositories. Theoretically, the repositories with the lowest numerical priority number have the highest priority. This is one of the method to prevents mistakes such as accidentally running yum upgrade with everything. This post cover the quick step to install yum-priorities on CentOS 6.3.

[root@centos63 ~]# yum install yum-priorities -y

Examples :

[root@centos63 ~]# yum install yum-priorities -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * extras: centos.ipserverone.com
 * updates: centos.ipserverone.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package yum-plugin-priorities.noarch 0:1.1.30-14.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                          Arch              Version                   Repository       Size
====================================================================================================
Installing:
 yum-plugin-priorities            noarch            1.1.30-14.el6             base             22 k

Transaction Summary
====================================================================================================
Install       1 Package(s)

Total download size: 22 k
Installed size: 28 k
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 22 k
yum-plugin-priorities-1.1.30-14.el6.noarch.rpm                               |  22 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : yum-plugin-priorities-1.1.30-14.el6.noarch                                       1/1
  Verifying  : yum-plugin-priorities-1.1.30-14.el6.noarch                                       1/1

Installed:
  yum-plugin-priorities.noarch 0:1.1.30-14.el6

Complete!

How to Add Webtatic Repository on CentOS 6.3

This post covers the steps on how to setup additional yum repository using Webtatic. Webtatic yum repository is a repository containing updated web-related packages for CentOS and Redhat Enterprise Linux (RHEL). Webtatic goals are to provide CentOS/RHEL administrators with the latest stable minor releases of web development/hosting software, which are not provided in CentOS/RHEL distribution minor releases. It’s also serve as an additional installation option for some of Webtatic’s projects.

RHEL 6/ CentOS 6 for i386
RHEL 6/ CentOS 6 for x86_64

1.Download the webtatic-release package :

[root@centos63 ~]# wget http://repo.webtatic.com/yum/el6/i386/webtatic-release-6-2.noarch.rpm

Example :

[root@centos63 ~]# wget http://repo.webtatic.com/yum/el6/i386/webtatic-release-6-2.noarch.rpm
--2012-08-13 23:42:08--  http://repo.webtatic.com/yum/el6/i386/webtatic-release-6-2.noarch.rpm
Resolving repo.webtatic.com... 184.22.117.192
Connecting to repo.webtatic.com|184.22.117.192|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11576 (11K) [application/x-redhat-package-manager]
Saving to: âwebtatic-release-6-2.noarch.rpmâ

100%[==========================================================>] 11,576      15.7K/s   in 0.7s

2012-08-13 23:42:10 (15.7 KB/s) - âwebtatic-release-6-2.noarch.rpmâ

2. Download or directly import webtatic-andy GPG key :

[root@centos63 ~]# rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy

3. Do verification on the webtatic-release package that you have downloaded :

[root@centos63 ~]# rpm -K webtatic-release-6-2.noarch.rpm
webtatic-release-6-2.noarch.rpm: (sha1) dsa sha1 md5 gpg OK

4. Install Webtatic Repository :

[root@centos63 ~]# rpm -Uvh webtatic-release-6-2.noarch.rpm
Preparing...                ########################################### [100%]
   1:webtatic-release       ########################################### [100%]

5. How you can use Webtatic repository to install, update the packages :

[root@centos63 ~]# yum --enablerepo=webtatic install [rpm package]

Examples :

[root@centos63 ~]# yum --enablerepo=webtatic install postfix -y

How to Add Remi Yum Repository on CentOS 6.3

This post cover the steps to install remi repository on linux CentOS 6.3 server. There are several 3rd party repositories for CentOS 6 server. One of the popular one is remi repository. The Remi repository is a repository containing updated PHP and MySQL packages and is maintained by Remi.

1. Import the RPM-GPG-KEY key and

[root@centos63 ~]# rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi

2. Download remi rpm package :

[root@centos63 ~]# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Examples :

[root@centos63 ~]# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
--2012-08-10 00:04:32--  http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Resolving rpms.famillecollet.com... 88.191.74.232, 2a01:e0b:1:74:2e0:f4ff:fe1b:b827
Connecting to rpms.famillecollet.com|88.191.74.232|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5292 (5.2K) [application/x-rpm]
Saving to: âremi-release-6.rpmâ

100%[==========================================================>] 5,292       --.-K/s   in 0.02s

2012-08-10 00:04:33 (280 KB/s) - âremi-release-6.rpmâ

3. Install remi rpm package :

[root@centos63 ~]# rpm -ivh remi-release-6.rpm
Preparing...                ########################################### [100%]
   1:remi-release           ########################################### [100%]

4. Start install using Yum :

[root@centos63 ~]# yum install --enablerepo=remi httpd

How to Setup phpMyAdmin on CentOS 6.3 using EPEL Repository

phpmyadminThis post will covers the steps to install phpMyAdmin to operate MySQL from Web browser. phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can manage a whole MySQL server (needs a super-user) as well as a single database. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement.

Prerequisites :

How to Configure EPEL Repository on CentOS 6.3
How to Install Httpd on CentOS 6.3
How to Install and Securing MySQL Database Server on CentOS 6.3

1. Install phpmyadmin :

[root@centos63 ~]# yum --enablerepo=epel install phpMyAdmin php-mysql php-mcrypt -y

Examples :

[root@centos63 ~]# yum --enablerepo=epel install phpMyAdmin php-mysql php-mcrypt -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirror.issp.co.th
 * epel: mirror.nus.edu.sg
 * extras: mirror.issp.co.th
 * updates: mirror.issp.co.th
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.i686 0:5.3.3-1.el6 will be installed
--> Processing Dependency: php-api = 20090626 for package: php-mcrypt-5.3.3-1.el6.i686
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt-5.3.3-1.el6.i686
---> Package php-mysql.i686 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: php-pdo for package: php-mysql-5.3.3-14.el6_3.i686
---> Package phpMyAdmin.noarch 0:3.5.1-1.el6 will be installed
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.noarch
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.noarch
--> Processing Dependency: php >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.5.1-1.el6.noarch
--> Running transaction check
---> Package libmcrypt.i686 0:2.5.8-9.el6 will be installed
---> Package php.i686 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: php-cli = 5.3.3-14.el6_3 for package: php-5.3.3-14.el6_3.i686
---> Package php-common.i686 0:5.3.3-14.el6_3 will be installed
---> Package php-gd.i686 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: libpng12.so.0(PNG12_0) for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libpng12.so.0 for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libjpeg.so.62 for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libfreetype.so.6 for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libXpm.so.4 for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libX11.so.6 for package: php-gd-5.3.3-14.el6_3.i686
---> Package php-mbstring.i686 0:5.3.3-14.el6_3 will be installed
---> Package php-pdo.i686 0:5.3.3-14.el6_3 will be installed
---> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
--> Running transaction check
---> Package freetype.i686 0:2.3.11-6.el6_2.9 will be installed
---> Package libX11.i686 0:1.3-2.el6 will be installed
--> Processing Dependency: libX11-common = 1.3-2.el6 for package: libX11-1.3-2.el6.i686
--> Processing Dependency: libxcb.so.1 for package: libX11-1.3-2.el6.i686
---> Package libXpm.i686 0:3.5.8-2.el6 will be installed
---> Package libjpeg.i686 0:6b-46.el6 will be installed
---> Package libpng.i686 2:1.2.49-1.el6_2 will be installed
---> Package php-cli.i686 0:5.3.3-14.el6_3 will be installed
--> Running transaction check
---> Package libX11-common.noarch 0:1.3-2.el6 will be installed
---> Package libxcb.i686 0:1.5-1.el6 will be installed
--> Processing Dependency: libXau.so.6 for package: libxcb-1.5-1.el6.i686
--> Running transaction check
---> Package libXau.i686 0:1.0.5-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                 Arch           Version                  Repository                    Size
====================================================================================================
Installing:
 php-mcrypt              i686           5.3.3-1.el6              epel                          18 k
 php-mysql               i686           5.3.3-14.el6_3           updates                       77 k
 phpMyAdmin              noarch         3.5.1-1.el6              epel                         4.2 M
Installing for dependencies:
 freetype                i686           2.3.11-6.el6_2.9         CentOS6.3-Repository         363 k
 libX11                  i686           1.3-2.el6                CentOS6.3-Repository         585 k
 libX11-common           noarch         1.3-2.el6                CentOS6.3-Repository         188 k
 libXau                  i686           1.0.5-1.el6              CentOS6.3-Repository          22 k
 libXpm                  i686           3.5.8-2.el6              CentOS6.3-Repository          58 k
 libjpeg                 i686           6b-46.el6                CentOS6.3-Repository         133 k
 libmcrypt               i686           2.5.8-9.el6              epel                          94 k
 libpng                  i686           2:1.2.49-1.el6_2         CentOS6.3-Repository         184 k
 libxcb                  i686           1.5-1.el6                CentOS6.3-Repository         104 k
 php                     i686           5.3.3-14.el6_3           updates                      1.1 M
 php-cli                 i686           5.3.3-14.el6_3           updates                      2.2 M
 php-common              i686           5.3.3-14.el6_3           updates                      523 k
 php-gd                  i686           5.3.3-14.el6_3           updates                      103 k
 php-mbstring            i686           5.3.3-14.el6_3           updates                      453 k
 php-pdo                 i686           5.3.3-14.el6_3           updates                       72 k
 php-php-gettext         noarch         1.0.11-3.el6             epel                          21 k

Transaction Summary
====================================================================================================
Install      19 Package(s)

Total download size: 10 M
Installed size: 38 M
Downloading Packages:
Setting up and reading Presto delta metadata
updates/prestodelta                                                          |  72 kB     00:00
Processing delta metadata
Package(s) data still to download: 10 M
(1/19): libmcrypt-2.5.8-9.el6.i686.rpm                                       |  94 kB     00:00
(2/19): php-5.3.3-14.el6_3.i686.rpm                                          | 1.1 MB     00:09
(3/19): php-cli-5.3.3-14.el6_3.i686.rpm                                      | 2.2 MB     00:19
(4/19): php-common-5.3.3-14.el6_3.i686.rpm                                   | 523 kB     00:04
(5/19): php-gd-5.3.3-14.el6_3.i686.rpm                                       | 103 kB     00:00
(6/19): php-mbstring-5.3.3-14.el6_3.i686.rpm                                 | 453 kB     00:04
(7/19): php-mcrypt-5.3.3-1.el6.i686.rpm                                      |  18 kB     00:00
(8/19): php-mysql-5.3.3-14.el6_3.i686.rpm                                    |  77 kB     00:00
(9/19): php-pdo-5.3.3-14.el6_3.i686.rpm                                      |  72 kB     00:00
(10/19): php-php-gettext-1.0.11-3.el6.noarch.rpm                             |  21 kB     00:00
(11/19): phpMyAdmin-3.5.1-1.el6.noarch.rpm                                   | 4.2 MB     00:36
----------------------------------------------------------------------------------------------------
Total                                                               135 kB/s |  10 MB     01:19
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-common-5.3.3-14.el6_3.i686                                                  1/19
  Installing : libX11-common-1.3-2.el6.noarch                                                  2/19
  Installing : php-mbstring-5.3.3-14.el6_3.i686                                                3/19
  Installing : php-php-gettext-1.0.11-3.el6.noarch                                             4/19
  Installing : php-cli-5.3.3-14.el6_3.i686                                                     5/19
  Installing : php-5.3.3-14.el6_3.i686                                                         6/19
  Installing : php-pdo-5.3.3-14.el6_3.i686                                                     7/19
  Installing : php-mysql-5.3.3-14.el6_3.i686                                                   8/19
  Installing : libmcrypt-2.5.8-9.el6.i686                                                      9/19
  Installing : php-mcrypt-5.3.3-1.el6.i686                                                    10/19
  Installing : libjpeg-6b-46.el6.i686                                                         11/19
  Installing : 2:libpng-1.2.49-1.el6_2.i686                                                   12/19
  Installing : libXau-1.0.5-1.el6.i686                                                        13/19
  Installing : libxcb-1.5-1.el6.i686                                                          14/19
  Installing : libX11-1.3-2.el6.i686                                                          15/19
  Installing : libXpm-3.5.8-2.el6.i686                                                        16/19
  Installing : freetype-2.3.11-6.el6_2.9.i686                                                 17/19
  Installing : php-gd-5.3.3-14.el6_3.i686                                                     18/19
  Installing : phpMyAdmin-3.5.1-1.el6.noarch                                                  19/19
  Verifying  : freetype-2.3.11-6.el6_2.9.i686                                                  1/19
  Verifying  : php-5.3.3-14.el6_3.i686                                                         2/19
  Verifying  : php-cli-5.3.3-14.el6_3.i686                                                     3/19
  Verifying  : libXau-1.0.5-1.el6.i686                                                         4/19
  Verifying  : php-common-5.3.3-14.el6_3.i686                                                  5/19
  Verifying  : php-mbstring-5.3.3-14.el6_3.i686                                                6/19
  Verifying  : libXpm-3.5.8-2.el6.i686                                                         7/19
  Verifying  : 2:libpng-1.2.49-1.el6_2.i686                                                    8/19
  Verifying  : libxcb-1.5-1.el6.i686                                                           9/19
  Verifying  : phpMyAdmin-3.5.1-1.el6.noarch                                                  10/19
  Verifying  : libX11-1.3-2.el6.i686                                                          11/19
  Verifying  : php-php-gettext-1.0.11-3.el6.noarch                                            12/19
  Verifying  : php-gd-5.3.3-14.el6_3.i686                                                     13/19
  Verifying  : libjpeg-6b-46.el6.i686                                                         14/19
  Verifying  : libX11-common-1.3-2.el6.noarch                                                 15/19
  Verifying  : php-mysql-5.3.3-14.el6_3.i686                                                  16/19
  Verifying  : php-pdo-5.3.3-14.el6_3.i686                                                    17/19
  Verifying  : php-mcrypt-5.3.3-1.el6.i686                                                    18/19
  Verifying  : libmcrypt-2.5.8-9.el6.i686                                                     19/19

Installed:
  php-mcrypt.i686 0:5.3.3-1.el6  php-mysql.i686 0:5.3.3-14.el6_3  phpMyAdmin.noarch 0:3.5.1-1.el6

Dependency Installed:
  freetype.i686 0:2.3.11-6.el6_2.9               libX11.i686 0:1.3-2.el6
  libX11-common.noarch 0:1.3-2.el6               libXau.i686 0:1.0.5-1.el6
  libXpm.i686 0:3.5.8-2.el6                      libjpeg.i686 0:6b-46.el6
  libmcrypt.i686 0:2.5.8-9.el6                   libpng.i686 2:1.2.49-1.el6_2
  libxcb.i686 0:1.5-1.el6                        php.i686 0:5.3.3-14.el6_3
  php-cli.i686 0:5.3.3-14.el6_3                  php-common.i686 0:5.3.3-14.el6_3
  php-gd.i686 0:5.3.3-14.el6_3                   php-mbstring.i686 0:5.3.3-14.el6_3
  php-pdo.i686 0:5.3.3-14.el6_3                  php-php-gettext.noarch 0:1.0.11-3.el6

Complete!

2. on Line 14 or 15, add IP address you permit. In this case i have added 192.168.1.0/24 and i’m using apache 2.2 :

[root@centos63 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf
<Directory /usr/share/phpMyAdmin/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1 192.168.1.0/24
     Allow from ::1
   </IfModule>
</Directory>

3. Reload or restart apache httpd :

[root@centos63 ~]# /etc/rc.d/init.d/httpd reload
Reloading httpd:

How to Configure EPEL Repository on CentOS 6.3

This post will covers on how to install and configure the Extra Packages for Enterprise Linux (EPEL) repository on CentOS 6.3. EPEL repository is another extra repository that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL) and CentOS server. To install the repository, you can follow this steps :

1. First, we download and import the GPG keys for EPEL software packages:

[root@centos63 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
[root@centos63 ~]# rpm --import RPM-GPG-KEY-EPEL-6
[root@centos63 ~]# rm -f RPM-GPG-KEY-EPEL-6

2. Download EPEL repository for 32-bit CentOS :

[root@centos63 ~]# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

3. Install EPEL repository on 32-bit CentOS :

[root@centos63 ~]# rpm -ivh epel-release-6-7.noarch.rpm
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

4. You can start install and use epel the repository to install the software packages, input yum command like follows :

[root@centos63 ~]# yum --enablerepo=epel install phpmyadmin -y

How to Configure RPMforge Repository on CentOS 6.3

centos6RPMforge repository is a collaboration of Dag, Dries, and other packagers. The default RPMforge repository does not replace any CentOS base packages. This post covers the steps to configure RPMforge repository on linux CentOS 6.3. This steps has been tested on CentOS 6.3 and should be working on Redhat linux Enterprise 6.

1. Download the rpmforge-release package and DAG’s GPG key :

[root@centos63 ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
[root@centos63 ~]# wget wget http://apt.sw.be/RPM-GPG-KEY.dag.txt

2. Install DAG’s GPG key :

[root@centos63 ~]# rpm --import RPM-GPG-KEY.dag.txt

3. Verify the rpmforge-release package that you have downloaded :

[root@centos63 ~]# rpm -K rpmforge-release-0.5.2-2.el6.rf.i686.rpm
rpmforge-release-0.5.2-2.el6.rf.i686.rpm: (sha1) dsa sha1 md5 gpg OK

4. If ok, proceed to install the rpmforge-release package using this command :

[root@centos63 ~]# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm
Preparing...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]

5. Proceed to configure RPMforge repository. Open the RPMforge configuration file and insert “priority=3” after “enabled = 1” in the [rpmforge] section as below :

[root@centos63 ~]# vi /etc/yum.repos.d/rpmforge.repo
### Name: RPMforge RPM Repository for RHEL 6 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
priority = 3
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

6. Check the updated repository list in /etc/yum.repos.d using the following command :

[root@centos63 ~]# yum repolist
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * rpmforge: mirror.oscc.org.my
 * updates: mirrors.hostemo.com
repo id                                    repo name                                          status
CentOS6.3-Repository                       DVD-CentOS6.3 repository                           4,776
base                                       CentOS-6 - Base                                    4,776
extras                                     CentOS-6 - Extras                                      4
rpmforge                                   RHEL 6 - RPMforge.net - dag                        4,448
updates                                    CentOS-6 - Updates                                   202
repolist: 14,206

7. You can start using RPMforge Repository on your RHEL 6 or CentOS 6 linux server :

[root@centos63 ~]# yum install clamd -y