How to Install wget on Fedora 16

In this post, i will show the quick steps to install wget on linux Fedora 16 server. wget command does not exist on your Fedora 16 with minimum installation. Wget is a free network utility for linux to download files from the Web. Therefore, there is simple step to install the wget command utility into your RHEL 6 server. This post assumed that you have set up local yum repository using your DVDROM.

If you haven’t set up the local yum repository, please proceed to this steps :
How to Setup Local Yum Repository from CD-ROM/DVD-ROM image on Fedora 16

Without wget command installed, you will get this error :

[root@fedora16 ~]# wget
-bash: wget: command not found

Simply run the following command to install wget command :

[root@fedora16 ~]# yum install wget -y
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package wget.i686 0:1.12-4.fc16 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package          Arch             Version                    Repository                       Size
====================================================================================================
Installing:
 wget             i686             1.12-4.fc16                Fedora16-Repository             478 k

Transaction Summary
====================================================================================================
Install       1 Package

Total download size: 478 k
Installed size: 1.8 M
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : wget-1.12-4.fc16.i686                                                            1/1

Installed:
  wget.i686 0:1.12-4.fc16

Complete!

How to Install php-mcrypt on Fedora 16

php-mcrypt is a standard of PHP module that provides mcrypt library support. In linux systems,mcrypt is necessary for installing CMSes like majento. Before you start to install any software such as CMSes like majento, you need to install the mcrypt library. In this post, i will show the quick step on how to install php-mcrypt on linux Fedora 16 server.

Simply run the following command to install php-mcrypt on Fedora 16 :

[root@fedora16 ~]# yum install php-mcrypt -y
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.i686 0:5.3.10-1.fc16 will be installed
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt-5.3.10-1.fc16.i686
--> Processing Dependency: libltdl.so.7 for package: php-mcrypt-5.3.10-1.fc16.i686
--> Running transaction check
---> Package libmcrypt.i686 0:2.5.8-10.fc15 will be installed
---> Package libtool-ltdl.i686 0:2.4-9.fc16 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                   Arch              Version                     Repository            Size
====================================================================================================
Installing:
 php-mcrypt                i686              5.3.10-1.fc16               updates               32 k
Installing for dependencies:
 libmcrypt                 i686              2.5.8-10.fc15               fedora                93 k
 libtool-ltdl              i686              2.4-9.fc16                  updates               45 k

Transaction Summary
====================================================================================================
Install       3 Packages

Total download size: 170 k
Installed size: 192 k
Downloading Packages:
(1/3): libmcrypt-2.5.8-10.fc15.i686.rpm                                      |  93 kB     00:02
(2/3): libtool-ltdl-2.4-9.fc16.i686.rpm                                      |  45 kB     00:00
(3/3): php-mcrypt-5.3.10-1.fc16.i686.rpm                                     |  32 kB     00:00
----------------------------------------------------------------------------------------------------
Total                                                                31 kB/s | 170 kB     00:05
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libmcrypt-2.5.8-10.fc15.i686                                                     1/3
  Installing : libtool-ltdl-2.4-9.fc16.i686                                                     2/3
  Installing : php-mcrypt-5.3.10-1.fc16.i686                                                    3/3

Installed:
  php-mcrypt.i686 0:5.3.10-1.fc16

Dependency Installed:
  libmcrypt.i686 0:2.5.8-10.fc15                   libtool-ltdl.i686 0:2.4-9.fc16

Complete!

How to Install “setup” Command on Fedora 16

Question :
When i try to use setup command on linux Fedora 16, i will get the following error :

[root@fedora16 ~]# setup
-bash: setup: command not found

Answer :
“Setup”command is a set of system configuration and setup files. The setup package contains a set of important system configuration and setup files, such as passwd, group, and profile. “Setup” command does not installed automatically on linux Fedora 16 with minimum type of server installation. In order to use setup command utility, you have to rum the following command :

[root@fedora16 ~]# yum install setup -y

Example :

[root@fedora16 ~]# yum install setup -y
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package setup.noarch 0:2.8.36-2.fc16 will be updated
---> Package setup.noarch 0:2.8.36-3.fc16 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package             Arch                 Version                       Repository             Size
====================================================================================================
Updating:
 setup               noarch               2.8.36-3.fc16                 updates               155 k

Transaction Summary
====================================================================================================
Upgrade       1 Package

Total download size: 155 k
Downloading Packages:
setup-2.8.36-3.fc16.noarch.rpm                                               | 155 kB     00:03
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : setup-2.8.36-3.fc16.noarch                                                       1/2
warning: /etc/shadow created as /etc/shadow.rpmnew
  Cleanup    : setup-2.8.36-2.fc16.noarch                                                       2/2

Updated:
  setup.noarch 0:2.8.36-3.fc16

Complete!

Run the following command to get more information about “setup” :

[root@fedora16 ~]# yum info setup
Installed Packages
Name        : setup
Arch        : noarch
Version     : 2.8.36
Release     : 2.fc16
Size        : 665 k
Repo        : installed
From repo   : anaconda-0
Summary     : A set of system configuration and setup files
URL         : https://fedorahosted.org/setup/
License     : Public Domain
Description : The setup package contains a set of important system configuration and
            : setup files, such as passwd, group, and profile.

Available Packages
Name        : setup
Arch        : noarch
Version     : 2.8.36
Release     : 3.fc16
Size        : 155 k
Repo        : updates
Summary     : A set of system configuration and setup files
URL         : https://fedorahosted.org/setup/
License     : Public Domain
Description : The setup package contains a set of important system configuration and
            : setup files, such as passwd, group, and profile.

How to Install phpPgAdmin for Managing PostgreSQL Databases on CentOS 6.2

phpPgAdmin is a web application, written in PHP and web-based administration utility for managing PostgreSQL databases. It handles all the basic functionality as well as some advanced features such as triggers, views and functions. It can create databases, create tables, alter tables and query the data. In this post, i will show how to install phpPgAdmin for PostgreSQL Databases on linux CentOS 6.2 server. Assumed that you have already configured EPEL repository.

[root@centos62 ~]# yum install phpPgAdmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.averse.net
 * epel: ftp.riken.jp
 * extras: mirror.averse.net
 * updates: mirror.issp.co.th
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpPgAdmin.noarch 0:5.0.3-1.el6 will be installed
--> Processing Dependency: php-pgsql >= 4.2 for package: phpPgAdmin-5.0.3-1.el6.noarch
--> Running transaction check
---> Package php-pgsql.i686 0:5.3.3-3.el6_2.6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch               Version                        Repository           Size
====================================================================================================
Installing:
 phpPgAdmin             noarch             5.0.3-1.el6                    epel                909 k
Installing for dependencies:
 php-pgsql              i686               5.3.3-3.el6_2.6                updates              67 k

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

Total download size: 976 k
Installed size: 4.9 M
Downloading Packages:
(1/2): php-pgsql-5.3.3-3.el6_2.6.i686.rpm                                    |  67 kB     00:00
(2/2): phpPgAdmin-5.0.3-1.el6.noarch.rpm                                     | 909 kB     00:10
----------------------------------------------------------------------------------------------------
Total                                                                83 kB/s | 976 kB     00:11
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-pgsql-5.3.3-3.el6_2.6.i686                                                   1/2
  Installing : phpPgAdmin-5.0.3-1.el6.noarch                                                    2/2
Non-fatal POSTIN scriptlet failure in rpm package phpPgAdmin-5.0.3-1.el6.noarch
warning: %post(phpPgAdmin-5.0.3-1.el6.noarch) scriptlet failed, exit status 7

Installed:
  phpPgAdmin.noarch 0:5.0.3-1.el6

Dependency Installed:
  php-pgsql.i686 0:5.3.3-3.el6_2.6

Complete!

How to Setup and Configure 389 Directory Server on CentOS 6.2

On previous post(Install 389 Directory Server) shows you on how to install 389 Directory Server on linux CentOS 6.2 server using EPEL repository. 389 Directory Server is an enterprise-class open source LDAP server for Linux. It is based on Fedora Directory Server. Before proceed to setup and configure 389 Directory Server on linux CentOS 6.2 server, please make sure that the hostname and FQDN also has been configured correctly.

Run the configuration script :

[root@centos62 ~]# setup-ds-admin.pl

Examples complete setup and 389 directory configuration :

[root@centos62 ~]# 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]: 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 10-AUGUST-2007.

NOTICE : System is i686-unknown-linux2.6.32-220.4.1.el6.i686 (1 processor).

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 [centos62.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 [centos62]:

==============================================================================
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 'centos62' 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/setup1EmS4N.log'

How to Install phpMyAdmin on CentOS 6.2 using EPEL Repository

phpmyadmin

PhpMyAdmin

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. In this post, i will show on how to install phpMyAdmin on CentOS 6.2 using EPEL repository. This post assumed that MySQL and Apache Httpd server has been installed and configured as per documented guidelines below :
How to Install Httpd on CentOS 6.2
How to Install MySQL Database Server on CentOS 6.2
How to Secure MySQL Database Server

1. How to Install and Configure EPEL Repository :
Follow this steps to install and configure the Extra Packages for Enterprise Linux (EPEL) repository on CentOS 6.2. 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.

2. Simply run yum command to install phpmyadmin :

[root@centos62 ~]# yum install phpmyadmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * epel: ftp.riken.jp
 * extras: mirrors.hostemo.com
 * updates: ossm.utm.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.4.9-1.el6 will be installed
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.4.9-1.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.4.9-1.el6.noarch
--> Running transaction check
---> Package php-gd.i686 0:5.3.3-3.el6_2.6 will be installed
---> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                    Arch              Version                      Repository          Size
====================================================================================================
Installing:
 phpMyAdmin                 noarch            3.4.9-1.el6                  epel               4.1 M
Installing for dependencies:
 php-gd                     i686              5.3.3-3.el6_2.6              updates            102 k
 php-php-gettext            noarch            1.0.11-3.el6                 epel                21 k

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

Total download size: 4.2 M
Installed size: 15 M
Downloading Packages:
(1/3): php-gd-5.3.3-3.el6_2.6.i686.rpm                                       | 102 kB     00:00
(2/3): php-php-gettext-1.0.11-3.el6.noarch.rpm                               |  21 kB     00:00
(3/3): phpMyAdmin-3.4.9-1.el6.noarch.rpm                                     | 4.1 MB     00:46
----------------------------------------------------------------------------------------------------
Total                                                                89 kB/s | 4.2 MB     00:48
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-php-gettext-1.0.11-3.el6.noarch                                              1/3
  Installing : php-gd-5.3.3-3.el6_2.6.i686                                                      2/3
  Installing : phpMyAdmin-3.4.9-1.el6.noarch                                                    3/3

Installed:
  phpMyAdmin.noarch 0:3.4.9-1.el6

Dependency Installed:
  php-gd.i686 0:5.3.3-3.el6_2.6                php-php-gettext.noarch 0:1.0.11-3.el6

Complete!

3. Open the phpMyAdmin.conf configuration file as below :

[root@centos62 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf

Original phpMyAdmin.conf configuration file :

<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</Directory>

Change as below. Default setting only allows only localhost. Changes below will allow access to any ip address but very dangerous unless properly secured by SSL :

<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from All
Allow from ::1
</Directory>

4. Restart apache httpd service to take effect :

[root@centos62 ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

5. Open PhpMyAdmin from myour browser using the following URL :

http://ipaddress/phpmyadmin/

How to Install and Configure EPEL Repository on CentOS 6.2

In this post, i will show you on how to install and configure the Extra Packages for Enterprise Linux (EPEL) repository on CentOS 6.2. 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 import the GPG keys for EPEL software packages:

[root@centos62 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
[root@centos62 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
--2012-03-07 22:08:39--  http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
Resolving ftp.riken.jp... 134.160.38.1
Connecting to ftp.riken.jp|134.160.38.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1649 (1.6K) [text/plain]
Saving to: âRPM-GPG-KEY-EPEL-6â

100%[==========================================================>] 1,649       --.-K/s   in 0.002s

2012-03-07 22:08:40 (929 KB/s) - âRPM-GPG-KEY-EPEL-6â

2. Then we enable the EPEL repositories using the following command :

[root@centos62 ~]# rpm --import RPM-GPG-KEY-EPEL-6

3. Download EPEL repository for 32-bit CentOS :

[root@centos62 ~]# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
[root@centos62 ~]# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
--2012-03-07 22:06:10--  http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
Resolving dl.fedoraproject.org... 209.132.181.27, 209.132.181.23, 209.132.181.24, ...
Connecting to dl.fedoraproject.org|209.132.181.27|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14064 (14K) [application/x-rpm]
Saving to: âepel-release-6-5.noarch.rpmâ

100%[==========================================================>] 14,064      36.7K/s   in 0.4s

2012-03-07 22:06:14 (36.7 KB/s) - âepel-release-6-5.noarch.rpmâ

4. Install EPEL repository on 32-bit CentOS :

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

5. Edit the the EPEL repository file and Set priority for the EPEL repository as below :

[root@centos62 ~]# vi /etc/yum.repos.d/epel.repo

6. Add priority=3 to the [epel] section, under enabled=1 :

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
priority=3
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

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:

How to Install and Configure yum-priorities on RHEL 6/CentOS 6

In this post, i will show on how to install and configure yum-priorities on CentOS 6 or RHEL 6 Linux server. 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 steps has been tested on CentOS 6.2, but it may working on CentOS 6.0, CentOS 6.1 and RHEL 6 server.

1. To Install the yum-priorities, simply run this command :

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

Example :

[root@centos62 ~]# yum install yum-priorities -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * epel: ftp.jaist.ac.jp
 * extras: centos.ipserverone.com
 * remi: iut-info.univ-reims.fr
 * remi-test: iut-info.univ-reims.fr
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: centos.ipserverone.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package yum-plugin-priorities.noarch 0:1.1.30-10.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

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

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

Total download size: 22 k
Installed size: 28 k
Downloading Packages:
yum-plugin-priorities-1.1.30-10.el6.noarch.rpm                               |  22 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : yum-plugin-priorities-1.1.30-10.el6.noarch                                       1/1

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

Complete!

2. After the plugin is installed, make sure that it is enabled on /etc/yum/pluginconf.d/priorities.conf file.

[root@centos62 ~]# more /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1

If “enabled” value = 0, you can enable it using vi editor and set it to 1.

3. With the plugin enabled, you may add priorities to the target repositories by adding the following line :

priority=N

Where N is an integer from 1 to 99. The lower the number the more important it is, so CentOS-Base.repo must always the lowest.

[root@centos62 ~]# vi /etc/yum.repos.d/CentOS-Base.repo

Add this line on base repo :

priority = 1

Example :

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, 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-6
priority = 1

#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-6

#additional packages that may be 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-6

#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=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#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-6
-- INSERT --

4. As an example, another 3rd party repository is Remi. Follow this steps to Add the Remi Repository on CentOS 6/RHEL 6 Linux Server :
Open the Remi configuration file and insert “priority = 5” after “enabled = 1” in the [remi] section :

[root@centos62 ~]# vi /etc/yum.repos.d/remi.repo

Example :

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

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

How to Monitor Bandwidth Usage with vnStat on Linux CentOS 6.2 Server

vnStat is a open source monitoring tool that can be use to monitor the bandwidth usage of the network traffic for Linux and BSD. vnStat actually will not be sniffing any traffic and use less of the system resources. However, at least a linux kernel 2.2 series is required. Some of the vnStat features are as below :

  • quick and simple to install and get running
  • gathered statistics persists through system reboots
  • can monitor multiple interfaces at the same time
  • several output options
    • summary, hourly, daily, monthly, weekly, top 10 days
    • optional png image output (using libgd)
  • months can be configured to follow billing period
  • light, minimal resource usage
  • same low cpu usage regardless of traffic
  • can be used without root permissions
  • online color configuration editor

In this post, i will guide through the steps on how to install and configure vnStat on CentOS 6.2. These steps was tested using the Local Yum Repository from CD-ROM/DVD-ROM image and EPEL repository. Therefore it is recommended to install Local Yum Repository from CD-ROM/DVD-ROM and EPEl repository as documented in the following post.
1. Install and configure Local Yum Repository from CD-ROM/DVD-ROM image and EPEL Repository as per below posts :

How to Install and Configure EPEL Repository on CentOS 6.2
How to Setup Local Yum Repository from CD-ROM/DVD-ROM image on CentOS 6.2

2. Install vnStat using yum command :

[root@centos62 ~]# yum install vnstat -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * epel: ftp.riken.jp
 * extras: mirrors.hostemo.com
 * updates: ossm.utm.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vnstat.i686 0:1.11-1.el6 will be installed
--> Processing Dependency: libgd.so.2 for package: vnstat-1.11-1.el6.i686
--> Running transaction check
---> Package gd.i686 0:2.0.35-10.el6 will be installed
--> Processing Dependency: libXpm.so.4 for package: gd-2.0.35-10.el6.i686
--> Running transaction check
---> Package libXpm.i686 0:3.5.8-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package           Arch            Version                    Repository                       Size
====================================================================================================
Installing:
 vnstat            i686            1.11-1.el6                 epel                            104 k
Installing for dependencies:
 gd                i686            2.0.35-10.el6              CentOS6.2-Repository            141 k
 libXpm            i686            3.5.8-2.el6                CentOS6.2-Repository             58 k

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

Total download size: 304 k
Installed size: 944 k
Downloading Packages:
(1/3): vnstat-1.11-1.el6.i686.rpm                                            | 104 kB     00:00
----------------------------------------------------------------------------------------------------
Total                                                               227 kB/s | 304 kB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libXpm-3.5.8-2.el6.i686                                                          1/3
  Installing : gd-2.0.35-10.el6.i686                                                            2/3
  Installing : vnstat-1.11-1.el6.i686                                                           3/3

Installed:
  vnstat.i686 0:1.11-1.el6

Dependency Installed:
  gd.i686 0:2.0.35-10.el6                         libXpm.i686 0:3.5.8-2.el6

Complete!

3. Start the vnStat service :

[root@centos62 ~]# service vnstat start
Starting vnstatd:                                          [  OK  ]

4. To ensure that vnStat is started at boot time, you can execute a chkconfig command as below :

[root@centos62 ~]# chkconfig vnstat on

5. Execute command “vnstat –iflist” to display the available network interface :

[root@centos62 ~]# vnstat --iflist
Available interfaces: lo eth0

6. Before vnStat can begin logging the bandwidth usage, it is necessary to setup the database for your network interface. Kindly replace the “eth0” with the correct interface if you running multiple interface :

[root@centos62 ~]# vnstat -u -i eth0

7. View the first vnStat data :

[root@centos62 ~]# vnstat
Database updated: Thu Mar 8 20:41:00 2012

eth0 since 03/08/12

rx: 75 KiB tx: 73 KiB total: 148 KiB

monthly
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
Mar '12 75 KiB | 73 KiB | 148 KiB | 0.00 kbit/s
------------------------+-------------+-------------+---------------
estimated -- | -- | -- |

daily
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
today 75 KiB | 73 KiB | 148 KiB | 0.02 kbit/s
------------------------+-------------+-------------+---------------
estimated -- | -- | -- |

8. View vnStat bandwidth statistic by day :

[root@centos62 ~]# vnstat -d

 eth0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
      03/08/12        75 KiB |      73 KiB |     148 KiB |    0.02 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |

9. View vnStat bandwidth statistic by hour :

[root@centos62 ~]# vnstat -h
 eth0                                                                     20:41
  ^                                                                       r
  |                                                                       rt
  |                                                                       rt
  |                                                                       rt
  |                                                                       rt
  |                                                                       rt
  |                                                                       rt
  |                                                                       rt
  |                                                                       rt
  |                                                                       rt
 -+--------------------------------------------------------------------------->
  |  21 22 23 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20

 h  rx (KiB)   tx (KiB)      h  rx (KiB)   tx (KiB)      h  rx (KiB)   tx (KiB)
21          0          0    05          0          0    13          0          0
22          0          0    06          0          0    14          0          0
23          0          0    07          0          0    15          0          0
00          0          0    08          0          0    16          0          0
01          0          0    09          0          0    17          0          0
02          0          0    10          0          0    18          0          0
03          0          0    11          0          0    19          0          0
04          0          0    12          0          0    20         75         73

10. Update the vnStat database :

[root@centos62 ~]# vnstat -u

11. View vnStat help and other available command :

[root@centos62 ~]# vnstat --help
 vnStat 1.11 by Teemu Toivola 

         -q,  --query          query database
         -h,  --hours          show hours
         -d,  --days           show days
         -m,  --months         show months
         -w,  --weeks          show weeks
         -t,  --top10          show top10
         -s,  --short          use short output
         -u,  --update         update database
         -i,  --iface          select interface (default: eth0)
         -?,  --help           short help
         -v,  --version        show version
         -tr, --traffic        calculate traffic
         -ru, --rateunit       swap configured rate unit
         -l,  --live           show transfer rate in real time

See also "--longhelp" for complete options list and "man vnstat".

How to Install phpMyAdmin on CentOS 5.8 using EPEL Repository

In this post, i will show on how to install phpMyAdmin on CentOS 5.8 using EPEL repository. phpMyAdmin is a opensource tool written in PHP intended to handle the MySQL administration using web interface over the internet. It can manage a whole MySQL server as well as a single database. This post assumed that MySQL and Apache Httpd server has been installed and configured properly.

1. How to Install and Configure EPEL Repository :
Follow this steps to install and configure the Extra Packages for Enterprise Linux (EPEL) repository on CentOS 5.8. 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.

2. Simply run the following command to install phpmyadmin :

[root@centos58 ~]# yum install phpmyadmin -y

Example :

[root@centos58 ~]# yum install phpmyadmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * epel: mirror.nus.edu.sg
 * extras: centos.ipserverone.com
 * updates: mirrors.hostemo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:2.11.11.3-2.el5 set to be updated
--> Processing Dependency: php-mcrypt >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php-gd >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php-mysql >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php-mbstring >= 4.1.0 for package: phpMyAdmin
--> Running transaction check
---> Package php.i386 0:5.1.6-34.el5_8 set to be updated
--> Processing Dependency: php-common = 5.1.6-34.el5_8 for package: php
--> Processing Dependency: php-cli = 5.1.6-34.el5_8 for package: php
--> Processing Dependency: libcurl.so.3 for package: php
--> Processing Dependency: libgmp.so.3 for package: php
--> Processing Dependency: libidn.so.11 for package: php
--> Processing Dependency: libaspell.so.15 for package: php
--> Processing Dependency: libpspell.so.15 for package: php
---> Package php-gd.i386 0:5.1.6-34.el5_8 set to be updated
---> Package php-mbstring.i386 0:5.1.6-34.el5_8 set to be updated
---> Package php-mcrypt.i386 0:5.1.6-15.el5.centos.1 set to be updated
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt
---> Package php-mysql.i386 0:5.1.6-34.el5_8 set to be updated
--> Processing Dependency: php-pdo for package: php-mysql
--> Running transaction check
---> Package aspell.i386 12:0.60.3-12 set to be updated
--> Processing Dependency: aspell-en for package: aspell
---> Package curl.i386 0:7.15.5-15.el5 set to be updated
---> Package gmp.i386 0:4.1.4-10.el5 set to be updated
---> Package libidn.i386 0:0.6.5-1.1 set to be updated
---> Package libmcrypt.i386 0:2.5.8-4.el5.centos set to be updated
---> Package php-cli.i386 0:5.1.6-34.el5_8 set to be updated
---> Package php-common.i386 0:5.1.6-34.el5_8 set to be updated
---> Package php-pdo.i386 0:5.1.6-34.el5_8 set to be updated
--> Running transaction check
---> Package aspell-en.i386 50:6.0-2.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch             Version                            Repository         Size
====================================================================================================
Installing:
 phpMyAdmin             noarch           2.11.11.3-2.el5                    epel              4.2 M
Installing for dependencies:
 aspell                 i386             12:0.60.3-12                       base              946 k
 aspell-en              i386             50:6.0-2.1                         base              1.6 M
 curl                   i386             7.15.5-15.el5                      base              235 k
 gmp                    i386             4.1.4-10.el5                       base              664 k
 libidn                 i386             0.6.5-1.1                          base              194 k
 libmcrypt              i386             2.5.8-4.el5.centos                 extras            116 k
 php                    i386             5.1.6-34.el5_8                     updates           2.3 M
 php-cli                i386             5.1.6-34.el5_8                     updates           2.1 M
 php-common             i386             5.1.6-34.el5_8                     updates           154 k
 php-gd                 i386             5.1.6-34.el5_8                     updates           118 k
 php-mbstring           i386             5.1.6-34.el5_8                     updates           996 k
 php-mcrypt             i386             5.1.6-15.el5.centos.1              extras             16 k
 php-mysql              i386             5.1.6-34.el5_8                     updates            87 k
 php-pdo                i386             5.1.6-34.el5_8                     updates            66 k

Transaction Summary
====================================================================================================
Install      15 Package(s)
Upgrade       0 Package(s)

Total download size: 14 M
Downloading Packages:
(1/15): php-mcrypt-5.1.6-15.el5.centos.1.i386.rpm                            |  16 kB     00:00
(2/15): php-pdo-5.1.6-34.el5_8.i386.rpm                                      |  66 kB     00:00
(3/15): php-mysql-5.1.6-34.el5_8.i386.rpm                                    |  87 kB     00:00
(4/15): libmcrypt-2.5.8-4.el5.centos.i386.rpm                                | 116 kB     00:00
(5/15): php-gd-5.1.6-34.el5_8.i386.rpm                                       | 118 kB     00:00
(6/15): php-common-5.1.6-34.el5_8.i386.rpm                                   | 154 kB     00:01
(7/15): libidn-0.6.5-1.1.i386.rpm                                            | 194 kB     00:01
(8/15): curl-7.15.5-15.el5.i386.rpm                                          | 235 kB     00:01
(9/15): gmp-4.1.4-10.el5.i386.rpm                                            | 664 kB     00:05
(10/15): aspell-0.60.3-12.i386.rpm                                           | 946 kB     00:08
(11/15): php-mbstring-5.1.6-34.el5_8.i386.rpm                                | 996 kB     00:08
(12/15): aspell-en-6.0-2.1.i386.rpm                                          | 1.6 MB     00:13
(13/15): php-cli-5.1.6-34.el5_8.i386.rpm                                     | 2.1 MB     00:18
(14/15): php-5.1.6-34.el5_8.i386.rpm                                         | 2.3 MB     00:26
(15/15): phpMyAdmin-2.11.11.3-2.el5.noarch.rpm                               | 4.2 MB     00:37
----------------------------------------------------------------------------------------------------
Total                                                               108 kB/s |  14 MB     02:09
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php-common                                                                  1/15
  Installing     : libidn                                                                      2/15
  Installing     : curl                                                                        3/15
  Installing     : gmp                                                                         4/15
  Installing     : php-gd                                                                      5/15
  Installing     : php-mbstring                                                                6/15
  Installing     : php-pdo                                                                     7/15
  Installing     : php-mysql                                                                   8/15
  Installing     : libmcrypt                                                                   9/15
  Installing     : aspell-en                                                                  10/15
  Installing     : aspell                                                                     11/15
  Installing     : php-cli                                                                    12/15
  Installing     : php                                                                        13/15
  Installing     : php-mcrypt                                                                 14/15
  Installing     : phpMyAdmin                                                                 15/15

Installed:
  phpMyAdmin.noarch 0:2.11.11.3-2.el5

Dependency Installed:
  aspell.i386 12:0.60.3-12                       aspell-en.i386 50:6.0-2.1
  curl.i386 0:7.15.5-15.el5                      gmp.i386 0:4.1.4-10.el5
  libidn.i386 0:0.6.5-1.1                        libmcrypt.i386 0:2.5.8-4.el5.centos
  php.i386 0:5.1.6-34.el5_8                      php-cli.i386 0:5.1.6-34.el5_8
  php-common.i386 0:5.1.6-34.el5_8               php-gd.i386 0:5.1.6-34.el5_8
  php-mbstring.i386 0:5.1.6-34.el5_8             php-mcrypt.i386 0:5.1.6-15.el5.centos.1
  php-mysql.i386 0:5.1.6-34.el5_8                php-pdo.i386 0:5.1.6-34.el5_8

Complete!

3. Open the phpMyAdmin.conf configuration file as below :

[root@centos58 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf

Original phpMyAdmin.conf configuration file :

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from 127.0.0.1
   Allow from ::1
</Directory>

Change as below. Default setting only allows only localhost. Changes below will allow access to any ip address but very dangerous unless properly secured by SSL :

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from All
   Allow from ::1
</Directory>

4. Restart apache httpd service :

[root@centos58 ~]# /etc/init.d/httpd restart

5. Open PhpMyAdmin from myour browser using the following URL :

http://CentOS5.8_Ipaddress/phpmyadmin/

This will install phpMyAdmin – 2.11.11.3 on your CentOS 5.8

How to Start, Stop and Restart 389 Directory Server on CentOS 6.2

This post will guide you on how to start, stop, restart and check dirsrv status for 389 Directory Server on linux CentOS 6.2 server using EPEL repository. 389 Directory Server is an enterprise-class open source LDAP server for Linux. It is based on Fedora Directory Server. This post assumed that you have already installed and properly configured the 389 Directory Server on CentOS 6.2.

Some of the dirsrv usage for 389 Directory Server :

Usage: /etc/init.d/dirsrv {start|stop|status|restart|condrestart} [instance-name]

How to start 389 Directory Server :

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

How to stop 389 Directory Server :

[root@centos62 ~]# /etc/init.d/dirsrv stop
Shutting down dirsrv:
    centos62...                                            [  OK  ]

How to restart 389 Directory Server :

[root@centos62 ~]# /etc/init.d/dirsrv restart
Shutting down dirsrv:
    centos62...                                            [  OK  ]

How to check the status 389 Directory Server :

[root@centos62 ~]# /etc/init.d/dirsrv status
dirsrv centos62 (pid 1296) is running...

How to Tuning 389 Directory Server on CentOS 6.2

This post will share with you on how to perform system tuning analysis for 389 Directory Server on linux CentOS 6.2 server. 389 Directory Server is an enterprise-class open source LDAP server for Linux. It is based on Fedora Directory Server. This post assumed that your CentOS server has been completely installed 389 Directory Server using EPEL repository. Before start to configure the 389 Directory Server, it is better to adjust some performance and security settings. Follow the following steps to tuning the 389 Directory Server on CentOS 6.2.

1. Perform TCP 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@centos62 ~]# vi /etc/sysctl.conf
#Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time = 300

b) Increase number of local system ports available by editing this parameter in the /etc/sysctl.conf file :

[root@centos62 ~]# echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf

Show changes :

[root@centos62 ~]# cat /etc/sysctl.conf | grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 1024 65000

2. Perform File Tuning :

a) Increase the file descriptors by running these commands:

[root@centos62 ~]# echo "64000" > /proc/sys/fs/file-max

Show changes :

[root@centos62 ~]# cat /proc/sys/fs/file-max
64000

or
Simply run this command :

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

Show changes :

[root@centos62 ~]# cat /etc/sysctl.conf | grep fs.file-max
fs.file-max = 64000

b) Edit /etc/profile as below :

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

Show changes :

[root@centos62 ~]# cat /etc/profile | grep ulimit
ulimit -n 8192

c) Edit the file descriptors in /etc/security/limits.conf. Add two parameter at the bottom of the configuration file :

[root@centos62 ~]# vi /etc/security/limits.conf
# End of file
* soft nofile 524288
* hard nofile 524288

3. Directory Server Tuning :

a) Edit /etc/sysconfig/dirsrv and uncomment “ulimit -n 8192”

[root@centos62 ~]# cat /etc/sysconfig/dirsrv | grep ulimit
# hard limits are raised, then use ulimit - uncomment
# ulimit -n 8192

Edit as below :

[root@centos62 ~]# vi /etc/sysconfig/dirsrv
# In order to make more file descriptors available
# to the directory server, first make sure the system
# hard limits are raised, then use ulimit - uncomment
# out the following line and change the value to the
# desired value
ulimit -n 8192

4. Sufficient Memory Assigned :

Make sure you have assign or upgrade the physical memory to at least 1024MB.