How to Change Date and Time Linux on RHEL 6/7 and CentOS 6/7

Change Date and Time

This post assumed that your Red Hat Enterprise Linux 6 (RHEL 6) does not have Date/Time Properties installed. In order to change the date and

In order to change date and time you will have to perform the changes from the command line. Note that in order to perform actions described in this post, you have to be logged in as a root:

1. Change the current date with the following form :

# date +%D -s YYYY-MM-DD

Linux Date Format : YYYY with a four-digit year, MM with a two-digit month, and DD with a two-digit day of the month.
Example :

# date +%D -s 2012-05-30
05/30/12

2. Change the current time with the following form :

# date +%T -s HH:MM:SS

If your system clock is set to use UTC (Coordinated Universal Time), add the following option :

# date +%T -s HH:MM:SS -u

Note : HH stands for an hour, MM is a minute, and SS is a second

Example :

# date +%T -s 22:30:00
22:30:00

or

[root@rhel6 ~]# date +%T -s 22:30:00 -u
22:30:00

3. How to Display current date and time :

[root@rhel6 ~]# date
Wed May 30 22:30:04 MYT 2012

Reference

How to Change Timezone Linux on RHEL 6/7 and CentOS 6/7

change timezone linux

This post assumed that we will change the System Timezone from the command line without using redhat-config-date.

There are several files and directories that are used for time zones. In RHEL 6 and RHEL 6, there is one directory that very useful to select the appropriate time zone which is /usr/share/zoneinfo directory.

Sometimes we forget to set the correct time zone for the new linux system. This quick steps show how to change timezone on RHEL 6/7 and CentOS 6/7.

/usr/share/zoneinfo – this directory contains the System Timezone files that were compiled by zic. These are binary files and cannot be viewed with a text viewer. The files contain information such as rules about DST. They allow the kernel to convert UTC UNIX time into appropriate local dates and times.

In order to change the System Timezone of your system you will need to access the file or configuration using root.

How to Change Timezone Linux on RHEL / CentOS

1) How to list all available time zone on RHEL 6 / CentOS 6:

#ls /usr/share/zoneinfo

2) How to list all available time zone on RHEL 7 / CentOS 7:

# timedatectl list-timezones | grep Asia
Asia/Aden
Asia/Almaty
Asia/Amman
..
..
Asia/Kuala_Lumpur

3) How to check timezone in linux RHEL 6 / CentOS 6 :

# cat /etc/sysconfig/clock

4) How to check timezone in linux RHEL 7 / CentOS 7 :

# timedatectl status
      Local time: Thu 2017-01-05 20:00:22 MYT
  Universal time: Thu 2017-01-05 12:00:22 UTC
        RTC time: n/a
       Time zone: Asia/Kuala_Lumpur (MYT, +0800)
     NTP enabled: n/a
NTP synchronized: no
 RTC in local TZ: no
      DST active: n/a

5) How to Change Timezone Linux RHEL 6 / CentOS 6 :

Edit ZONE= to the following:

# cat /etc/sysconfig/clock
ZONE="Asia/Kuala_Lumpur"

Create a new soft link to your time zone :

# mv /etc/localtime /root/localtime.old
# ln -sf /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime

6) How to Change Timezone Linux RHEL 7 / CentOS 7 :

timedatectl set-timezone Asia/Kuala_Lumpur

7) How to Display current date and time and timezone :

# date
Thu Jan  5 19:54:38 MYT 2017

Reference :

How to Enable LDAP Authentication for Subversion on CentOS 6.2

This post will show the quick steps to enable LDAP authentication for existing subversion on linux CentOS 6.2. This guideline assumed that your existing subversion server has been configured properly and working with htpasswd user. This guideline also assumed that 389 LDAP has been installed but not yet configure in your subversion configuration file.

Prerequisites :
How to Install Httpd on CentOS 6.2
How to Install and Configure Subversion 1.6 on CentOS 6.2
How to Install 389 Directory Server on CentOS 6.2

Steps:

1. Append /etc/hosts for ldap server fqdn. If your ldap server has been registered on DNS server, you can skip this step.

[root@svn ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.1.44 svn.ehowstuff.local svn
192.168.1.48 ldap.ehowstuff.local ldap

2. Locate and open subversion.conf using vi editor

[root@svn ~]# vi /etc/httpd/conf.d/subversion.conf

3. Modify the existing subversion.conf to below :

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

<Location /svn/repos>
        DAV svn
        SVNParentPath /svn/repos
        AuthBasicProvider ldap
        AuthType Basic
        AuthzLDAPAuthoritative on
        AuthName "My Subversion server"
        AuthLDAPURL "ldap://ldap.ehowstuff.local:389/DC=ehowstuff,DC=local?uid?sub?(objectClass=*)" NONE
        AuthzSVNAccessFile /svn/permissions/svnaccess
        Require valid-user
</Location>

4. Restart httpd service :

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

How to Tuning, Install and Configure 389 Directory Server on CentOS 6.2

389

389 Directory Server

1.0 Tuning 389 Directory Server on CentOS 6.2

This post will share with you on how to perform system tuning analysis, install and configure 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 setup 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.1 Perform TCP Tuning on 389 Directory :

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

1.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

1.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

1.4 Sufficient Memory Assigned :

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

2.0 Install 389 Directory Server on CentOS 6.2

This post will show you the quick steps to install 389 Directory Server on linux CentOS 6.2 server using EPEL repository. This post assumed that your CentOS server has been completely installed with minimum packages and the hostname and FQDN also has been configured correctly. Please make sure that you have configured EPEL repository on your CentOS 6.2 server.

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

2.1 Simply run this command to install 389 Directory Server on linux CentOS 6.2 server

[root@centos62 ~]# yum install 389-ds openldap-clients -y

Examples :

[root@centos62 ~]# yum install 389-ds openldap-clients -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * epel: ftp.cuhk.edu.hk
 * extras: centos.ipserverone.com
 * updates: centos.ipserverone.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package 389-ds.noarch 0:1.2.2-1.el6 will be installed
--> Processing Dependency: 389-ds-console for package: 389-ds-1.2.2-1.el6.noarch
--> Processing Dependency: 389-ds-console-doc for package: 389-ds-1.2.2-1.el6.noarch
--> Processing Dependency: 389-admin-console-doc for package: 389-ds-1.2.2-1.el6.noarch
--> Processing Dependency: 389-ds-base for package: 389-ds-1.2.2-1.el6.noarch
--> Processing Dependency: 389-admin-console for package: 389-ds-1.2.2-1.el6.noarch
--> Processing Dependency: 389-admin for package: 389-ds-1.2.2-1.el6.noarch
--> Processing Dependency: idm-console-framework for package: 389-ds-1.2.2-1.el6.noarch
--> Processing Dependency: 389-dsgw for package: 389-ds-1.2.2-1.el6.noarch
--> Processing Dependency: 389-console for package: 389-ds-1.2.2-1.el6.noarch
---> Package openldap-clients.i686 0:2.4.23-20.el6 will be installed
--> Running transaction check
---> Package 389-admin.i686 0:1.1.25-1.el6 will be installed
--> Processing Dependency: perl-Mozilla-LDAP for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: nss-tools for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: policycoreutils-python for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: libicudata.so.42 for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: perl(Mozilla::LDAP::API) for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: perl(CGI) for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: libadminutil.so.0 for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: libadmsslutil.so.0 for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: perl(Mozilla::LDAP::Conn) for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: perl(Mozilla::LDAP::Utils) for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: libicui18n.so.42 for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: mod_nss for package: 389-admin-1.1.25-1.el6.i686
--> Processing Dependency: libicuuc.so.42 for package: 389-admin-1.1.25-1.el6.i686
---> Package 389-admin-console.noarch 0:1.1.8-1.el6 will be installed
---> Package 389-admin-console-doc.noarch 0:1.1.8-1.el6 will be installed
---> Package 389-console.noarch 0:1.1.7-1.el6 will be installed
--> Processing Dependency: java >= 1:1.6.0 for package: 389-console-1.1.7-1.el6.noarch
--> Processing Dependency: jpackage-utils for package: 389-console-1.1.7-1.el6.noarch
---> Package 389-ds-base.i686 0:1.2.9.14-1.el6_2.2 will be installed
--> Processing Dependency: 389-ds-base-libs = 1.2.9.14-1.el6_2.2 for package: 389-ds-base-1.2.9.14-1.el6_2.2.i686
--> Processing Dependency: cyrus-sasl-md5 for package: 389-ds-base-1.2.9.14-1.el6_2.2.i686
--> Processing Dependency: libnetsnmpmibs.so.20 for package: 389-ds-base-1.2.9.14-1.el6_2.2.i686
--> Processing Dependency: cyrus-sasl-gssapi for package: 389-ds-base-1.2.9.14-1.el6_2.2.i686
--> Processing Dependency: libnetsnmphelpers.so.20 for package: 389-ds-base-1.2.9.14-1.el6_2.2.i686
--> Processing Dependency: libnetsnmpagent.so.20 for package: 389-ds-base-1.2.9.14-1.el6_2.2.i686
--> Processing Dependency: libnetsnmp.so.20 for package: 389-ds-base-1.2.9.14-1.el6_2.2.i686
--> Processing Dependency: libslapd.so.0 for package: 389-ds-base-1.2.9.14-1.el6_2.2.i686
--> Processing Dependency: libsvrcore.so.0 for package: 389-ds-base-1.2.9.14-1.el6_2.2.i686
---> Package 389-ds-console.noarch 0:1.2.6-1.el6 will be installed
---> Package 389-ds-console-doc.noarch 0:1.2.6-1.el6 will be installed
---> Package 389-dsgw.i686 0:1.1.7-2.el6 will be installed
---> Package idm-console-framework.noarch 0:1.1.7-2.el6 will be installed
--> Processing Dependency: jss >= 4.2 for package: idm-console-framework-1.1.7-2.el6.noarch
--> Processing Dependency: ldapjdk for package: idm-console-framework-1.1.7-2.el6.noarch
--> Running transaction check
---> Package 389-adminutil.i686 0:1.1.14-2.el6 will be installed
---> Package 389-ds-base-libs.i686 0:1.2.9.14-1.el6_2.2 will be installed
---> Package cyrus-sasl-gssapi.i686 0:2.1.23-13.el6 will be installed
---> Package cyrus-sasl-md5.i686 0:2.1.23-13.el6 will be installed
---> Package java-1.6.0-openjdk.i686 1:1.6.0.0-1.43.1.10.6.el6_2 will be installed
--> Processing Dependency: tzdata-java for package: 1:java-1.6.0-openjdk-1.6.0.0-1.43.1.10.6.el6_2.i686
--> Processing Dependency: rhino for package: 1:java-1.6.0-openjdk-1.6.0.0-1.43.1.10.6.el6_2.i686
--> Processing Dependency: libgif.so.4 for package: 1:java-1.6.0-openjdk-1.6.0.0-1.43.1.10.6.el6_2.i686
---> Package jpackage-utils.noarch 0:1.7.5-3.12.el6 will be installed
---> Package jss.i686 0:4.2.6-20.el6 will be installed
---> Package ldapjdk.i686 0:4.18-6.el6 will be installed
--> Processing Dependency: libgcj_bc.so.1 for package: ldapjdk-4.18-6.el6.i686
--> Processing Dependency: java-gcj-compat for package: ldapjdk-4.18-6.el6.i686
--> Processing Dependency: java-gcj-compat for package: ldapjdk-4.18-6.el6.i686
---> Package libicu.i686 0:4.2.1-9.1.el6_2 will be installed
---> Package mod_nss.i686 0:1.0.8-13.el6 will be installed
---> Package net-snmp-libs.i686 1:5.5-37.el6_2.1 will be installed
--> Processing Dependency: libsensors.so.4 for package: 1:net-snmp-libs-5.5-37.el6_2.1.i686
---> Package nss-tools.i686 0:3.13.1-7.el6_2 will be installed
--> Processing Dependency: nss = 3.13.1-7.el6_2 for package: nss-tools-3.13.1-7.el6_2.i686
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.13) for package: nss-tools-3.13.1-7.el6_2.i686
--> Processing Dependency: libnss3.so(NSS_3.13) for package: nss-tools-3.13.1-7.el6_2.i686
---> Package perl-CGI.i686 0:3.51-119.el6_1.1 will be installed
---> Package perl-Mozilla-LDAP.i686 0:1.5.3-4.el6 will be installed
---> Package policycoreutils-python.i686 0:2.0.83-19.21.el6_2 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.21.el6_2 for package: policycoreutils-python-2.0.83-19.21.el6_2.i686
--> Processing Dependency: audit-libs-python >= 1.4.2-1 for package: policycoreutils-python-2.0.83-19.21.el6_2.i686
--> Processing Dependency: libsemanage-python >= 2.0.43-4 for package: policycoreutils-python-2.0.83-19.21.el6_2.i686
--> Processing Dependency: setools-libs-python for package: policycoreutils-python-2.0.83-19.21.el6_2.i686
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.0.83-19.21.el6_2.i686
---> Package svrcore.i686 0:4.0.4-5.1.el6 will be installed
--> Running transaction check
---> Package audit-libs-python.i686 0:2.1.3-3.el6 will be installed
---> Package giflib.i686 0:4.1.6-3.1.el6 will be installed
---> Package java-1.5.0-gcj.i686 0:1.5.0.0-29.1.el6 will be installed
--> Processing Dependency: sinjdoc for package: java-1.5.0-gcj-1.5.0.0-29.1.el6.i686
---> Package libcgroup.i686 0:0.37-3.el6 will be installed
---> Package libgcj.i686 0:4.4.6-3.el6 will be installed
--> Processing Dependency: zip >= 2.1 for package: libgcj-4.4.6-3.el6.i686
---> Package libsemanage-python.i686 0:2.0.43-4.1.el6 will be installed
---> Package lm_sensors-libs.i686 0:3.1.1-10.el6 will be installed
---> Package nss.i686 0:3.12.10-17.el6_2 will be updated
--> Processing Dependency: nss = 3.12.10-17.el6_2 for package: nss-sysinit-3.12.10-17.el6_2.i686
---> Package nss.i686 0:3.13.1-7.el6_2 will be an update
--> Processing Dependency: nspr >= 4.8.9 for package: nss-3.13.1-7.el6_2.i686
---> Package nss-util.i686 0:3.12.10-2.el6 will be updated
---> Package nss-util.i686 0:3.13.1-3.el6_2 will be an update
---> Package policycoreutils.i686 0:2.0.83-19.18.el6 will be updated
---> Package policycoreutils.i686 0:2.0.83-19.21.el6_2 will be an update
---> Package rhino.noarch 0:1.7-0.7.r2.2.el6 will be installed
--> Processing Dependency: jline for package: rhino-1.7-0.7.r2.2.el6.noarch
---> Package setools-libs-python.i686 0:3.3.7-4.el6 will be installed
--> Processing Dependency: setools-libs = 3.3.7-4.el6 for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libapol.so.4 for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libsefs.so.4 for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libpoldiff.so.1 for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libseaudit.so.4(VERS_4.2) for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libseaudit.so.4 for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libapol.so.4(VERS_4.0) for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libqpol.so.1(VERS_1.3) for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libqpol.so.1 for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libsefs.so.4(VERS_4.0) for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libpoldiff.so.1(VERS_1.3) for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libapol.so.4(VERS_4.1) for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libqpol.so.1(VERS_1.4) for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libseaudit.so.4(VERS_4.1) for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libpoldiff.so.1(VERS_1.2) for package: setools-libs-python-3.3.7-4.el6.i686
--> Processing Dependency: libqpol.so.1(VERS_1.2) for package: setools-libs-python-3.3.7-4.el6.i686
---> Package tzdata-java.noarch 0:2011n-2.el6 will be installed
--> Running transaction check
---> Package jline.noarch 0:0.9.94-0.8.el6 will be installed
---> Package nspr.i686 0:4.8.8-3.el6 will be updated
---> Package nspr.i686 0:4.8.9-3.el6_2 will be an update
---> Package nss-sysinit.i686 0:3.12.10-17.el6_2 will be updated
---> Package nss-sysinit.i686 0:3.13.1-7.el6_2 will be an update
---> Package setools-libs.i686 0:3.3.7-4.el6 will be installed
---> Package sinjdoc.i686 0:0.5-9.1.el6 will be installed
--> Processing Dependency: java_cup >= 0.10 for package: sinjdoc-0.5-9.1.el6.i686
---> Package zip.i686 0:3.0-1.el6 will be installed
--> Running transaction check
---> Package java_cup.i686 1:0.10k-5.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                   Arch      Version                          Repository               Size
====================================================================================================
Installing:
 389-ds                    noarch    1.2.2-1.el6                      epel                    9.9 k
 openldap-clients          i686      2.4.23-20.el6                    CentOS6.2-Repository    155 k
Installing for dependencies:
 389-admin                 i686      1.1.25-1.el6                     epel                    341 k
 389-admin-console         noarch    1.1.8-1.el6                      epel                    202 k
 389-admin-console-doc     noarch    1.1.8-1.el6                      epel                     43 k
 389-adminutil             i686      1.1.14-2.el6                     epel                     64 k
 389-console               noarch    1.1.7-1.el6                      epel                     72 k
 389-ds-base               i686      1.2.9.14-1.el6_2.2               updates                 1.4 M
 389-ds-base-libs          i686      1.2.9.14-1.el6_2.2               updates                 369 k
 389-ds-console            noarch    1.2.6-1.el6                      epel                    1.4 M
 389-ds-console-doc        noarch    1.2.6-1.el6                      epel                     55 k
 389-dsgw                  i686      1.1.7-2.el6                      epel                    460 k
 audit-libs-python         i686      2.1.3-3.el6                      CentOS6.2-Repository     56 k
 cyrus-sasl-gssapi         i686      2.1.23-13.el6                    CentOS6.2-Repository     33 k
 cyrus-sasl-md5            i686      2.1.23-13.el6                    CentOS6.2-Repository     46 k
 giflib                    i686      4.1.6-3.1.el6                    CentOS6.2-Repository     37 k
 idm-console-framework     noarch    1.1.7-2.el6                      epel                    1.1 M
 java-1.5.0-gcj            i686      1.5.0.0-29.1.el6                 CentOS6.2-Repository    138 k
 java-1.6.0-openjdk        i686      1:1.6.0.0-1.43.1.10.6.el6_2      updates                  26 M
 java_cup                  i686      1:0.10k-5.el6                    CentOS6.2-Repository    178 k
 jline                     noarch    0.9.94-0.8.el6                   CentOS6.2-Repository     86 k
 jpackage-utils            noarch    1.7.5-3.12.el6                   CentOS6.2-Repository     59 k
 jss                       i686      4.2.6-20.el6                     CentOS6.2-Repository    745 k
 ldapjdk                   i686      4.18-6.el6                       CentOS6.2-Repository    749 k
 libcgroup                 i686      0.37-3.el6                       CentOS6.2-Repository    102 k
 libgcj                    i686      4.4.6-3.el6                      CentOS6.2-Repository     17 M
 libicu                    i686      4.2.1-9.1.el6_2                  updates                 5.0 M
 libsemanage-python        i686      2.0.43-4.1.el6                   CentOS6.2-Repository     80 k
 lm_sensors-libs           i686      3.1.1-10.el6                     CentOS6.2-Repository     36 k
 mod_nss                   i686      1.0.8-13.el6                     CentOS6.2-Repository     82 k
 net-snmp-libs             i686      1:5.5-37.el6_2.1                 updates                 1.5 M
 nss-tools                 i686      3.13.1-7.el6_2                   updates                 741 k
 perl-CGI                  i686      3.51-119.el6_1.1                 CentOS6.2-Repository    206 k
 perl-Mozilla-LDAP         i686      1.5.3-4.el6                      CentOS6.2-Repository    161 k
 policycoreutils-python    i686      2.0.83-19.21.el6_2               updates                 338 k
 rhino                     noarch    1.7-0.7.r2.2.el6                 CentOS6.2-Repository    778 k
 setools-libs              i686      3.3.7-4.el6                      CentOS6.2-Repository    400 k
 setools-libs-python       i686      3.3.7-4.el6                      CentOS6.2-Repository    210 k
 sinjdoc                   i686      0.5-9.1.el6                      CentOS6.2-Repository    646 k
 svrcore                   i686      4.0.4-5.1.el6                    CentOS6.2-Repository     15 k
 tzdata-java               noarch    2011n-2.el6                      updates                 153 k
 zip                       i686      3.0-1.el6                        CentOS6.2-Repository    252 k
Updating for dependencies:
 nspr                      i686      4.8.9-3.el6_2                    updates                 113 k
 nss                       i686      3.13.1-7.el6_2                   updates                 763 k
 nss-sysinit               i686      3.13.1-7.el6_2                   updates                  30 k
 nss-util                  i686      3.13.1-3.el6_2                   updates                  52 k
 policycoreutils           i686      2.0.83-19.21.el6_2               updates                 640 k

Transaction Summary
====================================================================================================
Install      42 Package(s)
Upgrade       5 Package(s)

Total download size: 63 M
Downloading Packages:
(1/47): 389-admin-1.1.25-1.el6.i686.rpm                                      | 341 kB     00:03
(2/47): 389-admin-console-1.1.8-1.el6.noarch.rpm                             | 202 kB     00:01
(3/47): 389-admin-console-doc-1.1.8-1.el6.noarch.rpm                         |  43 kB     00:00
(4/47): 389-adminutil-1.1.14-2.el6.i686.rpm                                  |  64 kB     00:00
(5/47): 389-console-1.1.7-1.el6.noarch.rpm                                   |  72 kB     00:00
(6/47): 389-ds-1.2.2-1.el6.noarch.rpm                                        | 9.9 kB     00:00
(7/47): 389-ds-base-1.2.9.14-1.el6_2.2.i686.rpm                              | 1.4 MB     00:11
(8/47): 389-ds-base-libs-1.2.9.14-1.el6_2.2.i686.rpm                         | 369 kB     00:03
(9/47): 389-ds-console-1.2.6-1.el6.noarch.rpm                                | 1.4 MB     00:13
(10/47): 389-ds-console-doc-1.2.6-1.el6.noarch.rpm                           |  55 kB     00:00
(11/47): 389-dsgw-1.1.7-2.el6.i686.rpm                                       | 460 kB     00:03
(12/47): idm-console-framework-1.1.7-2.el6.noarch.rpm                        | 1.1 MB     00:08
(13/47): java-1.6.0-openjdk-1.6.0.0-1.43.1.10.6.el6_2.i686.rpm               |  26 MB     03:56
(14/47): libicu-4.2.1-9.1.el6_2.i686.rpm                                     | 5.0 MB     00:44
(15/47): net-snmp-libs-5.5-37.el6_2.1.i686.rpm                               | 1.5 MB     00:13
(16/47): nspr-4.8.9-3.el6_2.i686.rpm                                         | 113 kB     00:00
(17/47): nss-3.13.1-7.el6_2.i686.rpm                                         | 763 kB     00:06
(18/47): nss-sysinit-3.13.1-7.el6_2.i686.rpm                                 |  30 kB     00:00
(19/47): nss-tools-3.13.1-7.el6_2.i686.rpm                                   | 741 kB     00:06
(20/47): nss-util-3.13.1-3.el6_2.i686.rpm                                    |  52 kB     00:00
(21/47): policycoreutils-2.0.83-19.21.el6_2.i686.rpm                         | 640 kB     00:05
(22/47): policycoreutils-python-2.0.83-19.21.el6_2.i686.rpm                  | 338 kB     00:03
(23/47): tzdata-java-2011n-2.el6.noarch.rpm                                  | 153 kB     00:01
----------------------------------------------------------------------------------------------------
Total                                                               174 kB/s |  63 MB     06:11
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : jpackage-utils-1.7.5-3.12.el6.noarch                                            1/52
  Installing : perl-CGI-3.51-119.el6_1.1.i686                                                  2/52
  Installing : jline-0.9.94-0.8.el6.noarch                                                     3/52
  Installing : rhino-1.7-0.7.r2.2.el6.noarch                                                   4/52
  Installing : tzdata-java-2011n-2.el6.noarch                                                  5/52
  Updating   : nspr-4.8.9-3.el6_2.i686                                                         6/52
  Updating   : nss-util-3.13.1-3.el6_2.i686                                                    7/52
  Updating   : nss-sysinit-3.13.1-7.el6_2.i686                                                 8/52
  Updating   : nss-3.13.1-7.el6_2.i686                                                         9/52
  Installing : libicu-4.2.1-9.1.el6_2.i686                                                    10/52
  Installing : perl-Mozilla-LDAP-1.5.3-4.el6.i686                                             11/52
  Installing : nss-tools-3.13.1-7.el6_2.i686                                                  12/52
  Installing : 389-adminutil-1.1.14-2.el6.i686                                                13/52
  Installing : svrcore-4.0.4-5.1.el6.i686                                                     14/52
  Updating   : policycoreutils-2.0.83-19.21.el6_2.i686                                        15/52
  Installing : 389-ds-base-libs-1.2.9.14-1.el6_2.2.i686                                       16/52
  Installing : mod_nss-1.0.8-13.el6.i686                                                      17/52
  Installing : openldap-clients-2.4.23-20.el6.i686                                            18/52
  Installing : lm_sensors-libs-3.1.1-10.el6.i686                                              19/52
  Installing : 1:net-snmp-libs-5.5-37.el6_2.1.i686                                            20/52
  Installing : giflib-4.1.6-3.1.el6.i686                                                      21/52
  Installing : zip-3.0-1.el6.i686                                                             22/52
  Installing : libgcj-4.4.6-3.el6.i686                                                        23/52
  Installing : 1:java-1.6.0-openjdk-1.6.0.0-1.43.1.10.6.el6_2.i686                            24/52
  Installing : java-1.5.0-gcj-1.5.0.0-29.1.el6.i686                                           25/52
  Installing : 1:java_cup-0.10k-5.el6.i686                                                    26/52
  Installing : sinjdoc-0.5-9.1.el6.i686                                                       27/52
  Installing : jss-4.2.6-20.el6.i686                                                          28/52
  Installing : ldapjdk-4.18-6.el6.i686                                                        29/52
  Installing : idm-console-framework-1.1.7-2.el6.noarch                                       30/52
  Installing : 389-console-1.1.7-1.el6.noarch                                                 31/52
  Installing : cyrus-sasl-gssapi-2.1.23-13.el6.i686                                           32/52
  Installing : setools-libs-3.3.7-4.el6.i686                                                  33/52
  Installing : setools-libs-python-3.3.7-4.el6.i686                                           34/52
  Installing : cyrus-sasl-md5-2.1.23-13.el6.i686                                              35/52
  Installing : libcgroup-0.37-3.el6.i686                                                      36/52
  Installing : audit-libs-python-2.1.3-3.el6.i686                                             37/52
  Installing : libsemanage-python-2.0.43-4.1.el6.i686                                         38/52
  Installing : policycoreutils-python-2.0.83-19.21.el6_2.i686                                 39/52
  Installing : 389-ds-base-1.2.9.14-1.el6_2.2.i686                                            40/52
  Installing : 389-admin-1.1.25-1.el6.i686                                                    41/52
  Installing : 389-admin-console-1.1.8-1.el6.noarch                                           42/52
  Installing : 389-ds-console-1.2.6-1.el6.noarch                                              43/52
  Installing : 389-ds-console-doc-1.2.6-1.el6.noarch                                          44/52
  Installing : 389-admin-console-doc-1.1.8-1.el6.noarch                                       45/52
  Installing : 389-dsgw-1.1.7-2.el6.i686                                                      46/52
  Installing : 389-ds-1.2.2-1.el6.noarch                                                      47/52
  Cleanup    : nss-sysinit-3.12.10-17.el6_2.i686                                              48/52
  Cleanup    : nss-3.12.10-17.el6_2.i686                                                      49/52
  Cleanup    : nss-util-3.12.10-2.el6.i686                                                    50/52
  Cleanup    : nspr-4.8.8-3.el6.i686                                                          51/52
  Cleanup    : policycoreutils-2.0.83-19.18.el6.i686                                          52/52

Installed:
  389-ds.noarch 0:1.2.2-1.el6                 openldap-clients.i686 0:2.4.23-20.el6

Dependency Installed:
  389-admin.i686 0:1.1.25-1.el6                          389-admin-console.noarch 0:1.1.8-1.el6
  389-admin-console-doc.noarch 0:1.1.8-1.el6             389-adminutil.i686 0:1.1.14-2.el6
  389-console.noarch 0:1.1.7-1.el6                       389-ds-base.i686 0:1.2.9.14-1.el6_2.2
  389-ds-base-libs.i686 0:1.2.9.14-1.el6_2.2             389-ds-console.noarch 0:1.2.6-1.el6
  389-ds-console-doc.noarch 0:1.2.6-1.el6                389-dsgw.i686 0:1.1.7-2.el6
  audit-libs-python.i686 0:2.1.3-3.el6                   cyrus-sasl-gssapi.i686 0:2.1.23-13.el6
  cyrus-sasl-md5.i686 0:2.1.23-13.el6                    giflib.i686 0:4.1.6-3.1.el6
  idm-console-framework.noarch 0:1.1.7-2.el6             java-1.5.0-gcj.i686 0:1.5.0.0-29.1.el6
  java-1.6.0-openjdk.i686 1:1.6.0.0-1.43.1.10.6.el6_2    java_cup.i686 1:0.10k-5.el6
  jline.noarch 0:0.9.94-0.8.el6                          jpackage-utils.noarch 0:1.7.5-3.12.el6
  jss.i686 0:4.2.6-20.el6                                ldapjdk.i686 0:4.18-6.el6
  libcgroup.i686 0:0.37-3.el6                            libgcj.i686 0:4.4.6-3.el6
  libicu.i686 0:4.2.1-9.1.el6_2                          libsemanage-python.i686 0:2.0.43-4.1.el6
  lm_sensors-libs.i686 0:3.1.1-10.el6                    mod_nss.i686 0:1.0.8-13.el6
  net-snmp-libs.i686 1:5.5-37.el6_2.1                    nss-tools.i686 0:3.13.1-7.el6_2
  perl-CGI.i686 0:3.51-119.el6_1.1                       perl-Mozilla-LDAP.i686 0:1.5.3-4.el6
  policycoreutils-python.i686 0:2.0.83-19.21.el6_2       rhino.noarch 0:1.7-0.7.r2.2.el6
  setools-libs.i686 0:3.3.7-4.el6                        setools-libs-python.i686 0:3.3.7-4.el6
  sinjdoc.i686 0:0.5-9.1.el6                             svrcore.i686 0:4.0.4-5.1.el6
  tzdata-java.noarch 0:2011n-2.el6                       zip.i686 0:3.0-1.el6

Dependency Updated:
  nspr.i686 0:4.8.9-3.el6_2                              nss.i686 0:3.13.1-7.el6_2
  nss-sysinit.i686 0:3.13.1-7.el6_2                      nss-util.i686 0:3.13.1-3.el6_2
  policycoreutils.i686 0:2.0.83-19.21.el6_2

Complete!

3.0 Setup and Configure 389 Directory Server on CentOS 6.2

On previous post, i already shows you on how to tuning and install 389 Directory Server on linux CentOS 6.2 server using EPEL repository. Again, 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.

3.1 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'

4.0 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. This post assumed that you have already installed and properly configured the 389 Directory Server on CentOS 6.2.

4.1 Some of the dirsrv usage for 389 Directory Server :

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

4.2 How to start 389 Directory Server :

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

4.3 How to stop 389 Directory Server :

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

4.4 How to restart 389 Directory Server :

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

4.5 How to check the status 389 Directory Server :

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

5.0 Configure Iptables Firewall for 389 Directory Server on CentOS 6.2

I will show the ports that need to be by passed in iptables firewall in order to make 389 Directory server accessible and working perfectly. Before the Windows Console (installed 389 Console.msi) from client’ PC connecting to 389 administration server, there are 3 important ports has to opened from iptables firewall. This will allow linux administrator or LDAP administrator to perform LDAP server search query or linux administration’s task. There are three(3) ports that are normally should be opened on 389 Directory Server.

a) Port 389 (ldap)
b) Port 636 (ldaps – only if using TLS/SSL)
c) Admin server port (9830 by default)

5.1 Run netstat command to see opened port :

[root@centos62 ~]# netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1105/sshd
tcp        0      0 127.0.0.1:5432              0.0.0.0:*                   LISTEN      1140/postmaster
tcp        0      0 0.0.0.0:9830                0.0.0.0:*                   LISTEN      1415/httpd.worker
tcp        0      0 :::22                       :::*                        LISTEN      1105/sshd
tcp        0      0 ::1:5432                    :::*                        LISTEN      1140/postmaster
tcp        0      0 :::389                      :::*                        LISTEN      1792/ns-slapd

5.2 Open the iptables firewall configuration file then enable port 389, 636 and 9830 go through iptables firewall :

[root@centos62 ~]# vi /etc/sysconfig/iptables

5.3 Add these three(3) lines:

 
-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 636 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 9830 -j ACCEPT

5.4 Then restart the iptables firewall :

[root@centos62 ~]# service iptables restart

Hope this complete steps may help you to prepare, tuning, install and configure 389 directory on your linux server.

How to Setup Local Yum Repository from CD-ROM/DVD-ROM image on CentOS 5.8

In this post, i will share on how to setup local yum repository from CD-ROM/DVD-ROM image on CentOS 5.8. This quick setup will very useful for those who do not have internet connection and does not have yum repository server on their organization. Using local yum repository, you will able to perform yum installation using the available packages on your CD-ROM/DVD-ROM. This steps may be also working on other version of CentOS server.

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

[root@centos58 ~]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only

3. Create centos58.repo text file in /etc/yum.repos.d/ with the following content. Please create something as follow:

[root@centos58 ~]# vi /etc/yum.repos.d/centos58.repo
[CentOS5.8-Repository]
name=DVD-CentOS5.8 repository
baseurl=file:///mnt
enabled=1
gpgcheck=0

4. Finish. You can start install, remove and update using yum command :
Example :

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

How to Fix “MISSING: /usr/lib/libstdc++.so.6” Zimbra Installation on CentOS 6.2 x86_64

Questions :
When i try to install Zimbra 7.1.4 on linux CentOS 6.2 server, i got the following error message and cannot proceed the zimbra installation. How can i fix this ?

MISSING: /usr/lib/libstdc++.so.6
[root@mail zcs-7.1.4_GA_2555.RHEL6_64.20120105094542]# ./install.sh --platform-override

Operations logged to /tmp/install.log.2145
Checking for existing installation...
    zimbra-ldap...NOT FOUND
    zimbra-logger...NOT FOUND
    zimbra-mta...NOT FOUND
    zimbra-snmp...NOT FOUND
    zimbra-store...NOT FOUND
    zimbra-apache...NOT FOUND
    zimbra-spell...NOT FOUND
    zimbra-convertd...NOT FOUND
    zimbra-memcached...NOT FOUND
    zimbra-proxy...NOT FOUND
    zimbra-archiving...NOT FOUND
    zimbra-cluster...NOT FOUND
    zimbra-core...NOT FOUND

PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZIMBRA, INC. ("ZIMBRA") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.

License Terms for the Zimbra Collaboration Suite:
  http://www.zimbra.com/license/zimbra_public_eula_2.1.html

Do you agree with the terms of the software license agreement? [N] y

Checking for prerequisites...
     FOUND: NPTL
     FOUND: sudo-1.7.4p5-7
     FOUND: libidn-1.18-2
     FOUND: gmp-4.3.1-7
     MISSING: /usr/lib/libstdc++.so.6
Checking for suggested prerequisites...
     FOUND: sysstat
     FOUND: sqlite

###ERROR###

One or more prerequisite packages are missing.
Please install them before running this installer.

Installation cancelled.

Tested Workarounds :
I think this is bug that need to be fix.
/usr/lib/ = Library for CentOS 32 Bit
/usr/lib64/ = Library for CentOS 64 Bit

I have two workarounds for this issue. If you have any suggestions and recommendations and corrections, please do let me know. By the way, i have tested both workaround, it workings perfectly on my zimbra lab server.

Workaround 1 :
Create symbolic link to the following file :

[root@mail ~]# ln -s /usr/lib64/libstdc++.so.6 /usr/lib/libstdc++.so.6

Verify the created symbolic link :

[root@mail ~]# ls -l /usr/lib/libstdc++.so.6
lrwxrwxrwx. 1 root root 25 Mar 31 20:30 /usr/lib/libstdc++.so.6 -> /usr/lib64/libstdc++.so.6

Workaround 2 :

Download libstdc++ 32 bit installer :

[root@mail ~]# wget http://centos.ipserverone.com/centos/6.2/os/i386/Packages/compat-libstdc++-33-3.2.3-69.el6.i686.rpm
[root@mail ~]# wget http://centos.ipserverone.com/centos/6.2/os/i386/Packages/compat-libstdc++-296-2.96-144.el6.i686.rpm
[root@mail ~]# wget http://centos.ipserverone.com/centos/6.2/os/i386/Packages/libstdc++-4.4.6-3.el6.i686.rpm
[root@mail ~]# wget http://centos.ipserverone.com/centos/6.2/os/i386/Packages/libstdc++-devel-4.4.6-3.el6.i686.rpm
[root@mail ~]# wget http://centos.ipserverone.com/centos/6.2/os/i386/Packages/libstdc++-docs-4.4.6-3.el6.i686.rpm

Install the rpm packages :

[root@mail ~]# rpm -ivh compat-libstdc* libstdc++* --nodeps
Preparing...                ########################################### [100%]
   1:libstdc++              ########################################### [ 20%]
   2:libstdc++-devel        ########################################### [ 40%]
   3:libstdc++-docs         ########################################### [ 60%]
   4:compat-libstdc++-33    ########################################### [ 80%]
   5:compat-libstdc++-296   ########################################### [100%]

Verify the libstdc installed packages exist in /usr/lib :

[root@mail lib]# pwd
/usr/lib
[root@mail lib]# ls | grep libstdc
libstdc++-3-libc6.2-2-2.10.0.so
libstdc++-libc6.2-2.so.3
libstdc++.so.5
libstdc++.so.5.0.7
libstdc++.so.6
libstdc++.so.6.0.13

How to Check Routing Tables on Fedora 16

In Linux operating system, routing table is used by the computer networks or servers to stores the routes of the destinations that responsible for forwarding. Routing tables contain a list of IP addresses and each of IP addresses identifies a network gateway. In this post, i will show you three ways to check and display the linux Routing Table on Fedora 16 server.

By using Route Command :
Route manipulates the kernel’s IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface after it has been configured.

By using netstat command :
Netstat prints information about the Linux networking subsystem such as network connections, routing tables and interface statistics.

1. Display routing table using “route -n” :

[root@fedora16 ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 p3p1
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 p3p1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 p3p1

2. Display routing table using “netstat -rn” :

[root@fedora16 ~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 p3p1
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 p3p1
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 p3p1

3. Display routing table using “ip route show” :

[root@fedora16 ~]# ip route show
default via 192.168.1.1 dev p3p1
169.254.0.0/16 dev p3p1  scope link  metric 1002
192.168.1.0/24 dev p3p1  proto kernel  scope link  src 192.168.1.47

How to Install Vim on Fedora 16

Vim is a text editor that is upwards compatible to Vi. Vim can be used to edit all kinds of plain text. It is especially useful for editing programs. In this post, i will show how to install vim on linux Fedora 16 server. This steps has been tested on Fedora 16, it may working on other linux distribution as well.

If your Fedora 16 does not have vim installed, you’ill get the following error :

[root@fedora16 ~]# vim /etc/httpd/conf/httpd.conf
-bash: vim: command not found

To install vim on your Fedora 16, simply run the following command :

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

or

[root@fedora16 ~]# yum install vim-enhanced -y
[root@fedora16 ~]# yum install vim -y
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.i686 2:7.3.315-1.fc16 will be installed
--> Processing Dependency: vim-common = 2:7.3.315-1.fc16 for package: 2:vim-enhanced-7.3.315-1.fc16.i686
--> Processing Dependency: libgpm.so.2 for package: 2:vim-enhanced-7.3.315-1.fc16.i686
--> Processing Dependency: libruby.so.1.8 for package: 2:vim-enhanced-7.3.315-1.fc16.i686
--> Running transaction check
---> Package gpm-libs.i686 0:1.20.6-21.fc16 will be installed
---> Package ruby-libs.i686 0:1.8.7.357-1.fc16 will be installed
--> Processing Dependency: libreadline.so.5 for package: ruby-libs-1.8.7.357-1.fc16.i686
---> Package vim-common.i686 2:7.3.315-1.fc16 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.3.315-1.fc16.i686
--> Running transaction check
---> Package compat-readline5.i686 0:5.2-18.fc15 will be installed
---> Package vim-filesystem.i686 2:7.3.315-1.fc16 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                  Arch         Version                    Repository                   Size
====================================================================================================
Installing:
 vim-enhanced             i686         2:7.3.315-1.fc16           Fedora16-Repository         889 k
Installing for dependencies:
 compat-readline5         i686         5.2-18.fc15                Fedora16-Repository         126 k
 gpm-libs                 i686         1.20.6-21.fc16             updates                      29 k
 ruby-libs                i686         1.8.7.357-1.fc16           updates                     1.8 M
 vim-common               i686         2:7.3.315-1.fc16           Fedora16-Repository         5.4 M
 vim-filesystem           i686         2:7.3.315-1.fc16           Fedora16-Repository          14 k

Transaction Summary
====================================================================================================
Install       6 Packages

Total download size: 8.3 M
Installed size: 27 M
Downloading Packages:
(2/6): gpm-libs-1.20.6-21.fc16.i686.rpm                                      |  29 kB     00:00
(3/6): ruby-libs-1.8.7.357-1.fc16.i686.rpm                                   | 1.8 MB     00:22
----------------------------------------------------------------------------------------------------
Total                                                               349 kB/s | 8.3 MB     00:24
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 2:vim-filesystem-7.3.315-1.fc16.i686                                             1/6
  Installing : 2:vim-common-7.3.315-1.fc16.i686                                                 2/6
  Installing : gpm-libs-1.20.6-21.fc16.i686                                                     3/6
  Installing : compat-readline5-5.2-18.fc15.i686                                                4/6
  Installing : ruby-libs-1.8.7.357-1.fc16.i686                                                  5/6
  Installing : 2:vim-enhanced-7.3.315-1.fc16.i686                                               6/6

Installed:
  vim-enhanced.i686 2:7.3.315-1.fc16

Dependency Installed:
  compat-readline5.i686 0:5.2-18.fc15                gpm-libs.i686 0:1.20.6-21.fc16
  ruby-libs.i686 0:1.8.7.357-1.fc16                  vim-common.i686 2:7.3.315-1.fc16
  vim-filesystem.i686 2:7.3.315-1.fc16

Complete!

To start using vim editor instead of vi as below :

[root@fedora16 ~]# vim /etc/httpd/conf/httpd.conf

How to Grep Multiples Lines and using Specific Keyword on Linux

grep is a command line text search utility originally written for Unix or linux. In linux you can grep multiple lines before or after matching the keywords. This examples has been tested on linux CentOS 6.2, but it may workings on other linux version such as Redhat Enterprise Linux 5 (RHEL5) or (RHEL6).

Get grep command help :

[root@centos62 ~]# grep --help

Example :

Context control:
  -B, --before-context=NUM  print NUM lines of leading context
  -A, --after-context=NUM   print NUM lines of trailing context
  -C, --context=NUM         print NUM lines of output context
  -NUM                      same as --context=NUM

Assumed that you have exported all log for 29 March 2012 from /var/log/messages into 29032012.txt as below :

[root@centos62 ~]# more /var/log/messages | grep "Mar 29" > 29032012.txt

1. How to Grep Multiples Lines

Please grep “cubic” with -B1 and -A4 :

[root@centos62 ~]# grep -B1 -A4 "cubic" 29032012.txt

The output will return like this :

Mar 29 21:04:16 centos62 kernel: usbhid: v2.6:USB HID core driver
Mar 29 21:04:16 centos62 kernel: TCP cubic registered
Mar 29 21:04:16 centos62 kernel: Initializing XFRM netlink socket
Mar 29 21:04:16 centos62 kernel: NET: Registered protocol family 17
Mar 29 21:04:16 centos62 kernel: Using IPI No-Shortcut mode
Mar 29 21:04:16 centos62 kernel: registered taskstats version 1

2. How to Grep using Specific Keyword :
Grep only keyword “BIOS-e820” from 29032012.txt file as below :

[root@centos62 ~]# more 29032012.txt | grep "BIOS-e820"

The output will return like this :

Mar 29 21:04:16 centos62 kernel: BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 00000000000dc000 - 00000000000e0000 (reserved)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 0000000000100000 - 000000003fef0000 (usable)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 000000003fef0000 - 000000003feff000 (ACPI data)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 000000003feff000 - 000000003ff00000 (ACPI NVS)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 000000003ff00000 - 0000000040000000 (usable)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
Mar 29 21:04:16 centos62 kernel: BIOS-e820: 00000000fffe0000 - 0000000100000000 (reserved)

How to Install “man” Command on Fedora 16

man is the system’s manual pager. Each page argument given to man is normally the name of a program, utility or function. The Linux command “man” is used to display the manual page for other command and also will help you to explain the functions for the commands that commonly used. The term “man” is short for manual. On Fedora 16 minimum installation, “man” command has not been installed. In this post, i will show how to install “man” pages command on Linux Fedora 16 server.

You’ill get the following warning if you type man command on your Fedora 16 server.

-bash: man: command not found

To install “man” command, simply run the following line :

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

Examples :

[root@fedora16 ~]# yum install man -y
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package man-db.i686 0:2.6.0.2-2.fc16 will be installed
--> Processing Dependency: groff for package: man-db-2.6.0.2-2.fc16.i686
--> Processing Dependency: libpipeline.so.1 for package: man-db-2.6.0.2-2.fc16.i686
--> Processing Dependency: less for package: man-db-2.6.0.2-2.fc16.i686
--> Running transaction check
---> Package groff.i686 0:1.21-3.fc16 will be installed
---> Package less.i686 0:444-2.fc16 will be installed
---> Package libpipeline.i686 0:1.2.0-1.fc16 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package               Arch           Version                   Repository                     Size
====================================================================================================
Installing:
 man-db                i686           2.6.0.2-2.fc16            Fedora16-Repository           563 k
Installing for dependencies:
 groff                 i686           1.21-3.fc16               Fedora16-Repository           1.9 M
 less                  i686           444-2.fc16                Fedora16-Repository           109 k
 libpipeline           i686           1.2.0-1.fc16              Fedora16-Repository            47 k

Transaction Summary
====================================================================================================
Install       4 Packages

Total download size: 2.6 M
Installed size: 9.3 M
Downloading Packages:
----------------------------------------------------------------------------------------------------
Total                                                                18 MB/s | 2.6 MB     00:00
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : less-444-2.fc16.i686                                                             1/4
  Installing : groff-1.21-3.fc16.i686                                                           2/4
  Installing : libpipeline-1.2.0-1.fc16.i686                                                    3/4
  Installing : man-db-2.6.0.2-2.fc16.i686                                                       4/4

Installed:
  man-db.i686 0:2.6.0.2-2.fc16

Dependency Installed:
  groff.i686 0:1.21-3.fc16       less.i686 0:444-2.fc16       libpipeline.i686 0:1.2.0-1.fc16

Complete!

How to Install crontab on CentOS 6.2

Question :
When i try to edit and create the crontab on my CentOS 6.2 server, i get the following message:

[root@centos62 ~]# crontab -e
bash: crontab: command not found

Answer :
On linux CentOS 6.2 minimum installation, crontab package does not installed or included. Crontab is the program used to install, remove or list the tables used to drive the cron daemon. cron is a daemon to execute scheduled commands. Cron should be started from /etc/rc.d/init.d or /etc/init.d.

In order to use crontab, you have to install using the following command :

[root@centos62 ~]# yum install vixie-cron -y

Example :

[root@centos62 ~]# yum install vixie-cron -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.averse.net
 * epel: ftp.jaist.ac.jp
 * extras: mirror.averse.net
 * updates: mirror.issp.co.th
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package cronie.i686 0:1.4.4-7.el6 will be installed
--> Processing Dependency: dailyjobs for package: cronie-1.4.4-7.el6.i686
--> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-7.el6.i686
--> Running transaction check
---> Package cronie-anacron.i686 0:1.4.4-7.el6 will be installed
--> Processing Dependency: crontabs for package: cronie-anacron-1.4.4-7.el6.i686
---> Package exim.i686 0:4.72-2.el6 will be installed
--> Running transaction check
---> Package crontabs.noarch 0:1.10-33.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                 Arch            Version                Repository                     Size
====================================================================================================
Installing:
 cronie                  i686            1.4.4-7.el6            CentOS6.2-Repository           70 k
Installing for dependencies:
 cronie-anacron          i686            1.4.4-7.el6            CentOS6.2-Repository           29 k
 crontabs                noarch          1.10-33.el6            CentOS6.2-Repository           10 k
 exim                    i686            4.72-2.el6             epel                          1.2 M

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

Total download size: 1.3 M
Installed size: 3.9 M
Downloading Packages:
(1/4): exim-4.72-2.el6.i686.rpm                                              | 1.2 MB     00:11
----------------------------------------------------------------------------------------------------
Total                                                               111 kB/s | 1.3 MB     00:12
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : exim-4.72-2.el6.i686                                                             1/4
  Installing : cronie-1.4.4-7.el6.i686                                                          2/4
  Installing : crontabs-1.10-33.el6.noarch                                                      3/4
  Installing : cronie-anacron-1.4.4-7.el6.i686                                                  4/4

Installed:
  cronie.i686 0:1.4.4-7.el6

Dependency Installed:
  cronie-anacron.i686 0:1.4.4-7.el6     crontabs.noarch 0:1.10-33.el6     exim.i686 0:4.72-2.el6

Complete!

Sample usage of crontabe :

[root@centos62 ~]# crontab -e
# Used to update Cacti
*/5 * * * * /usr/share/cacti/poller.php >> /var/log/cacti 2>&1

How to Setup Local Yum Repository from CD-ROM/DVD-ROM image on Fedora 16

In this post, i will share on how to install, update and remove RPM packages from CD-ROM/DVD-ROM image or local yum repository on linux Fedora 16 server. This will very useful when you are running on slow internet connection. Instead of go through the internet connection, it is possible to use local repository to install the module and package. Follow these steps to setup your local CD-ROM/DVD-ROM yum repository on linux Fedora 16 server.

1. Mount your DVD into /mnt or /media. It’s depend on you.

[root@fedora16 ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

2. Enter to /mnt directory and list out the files :

[root@fedora16 ~]# cd /mnt
[root@fedora16 mnt]# ls
GPL       RPM-GPG-KEY-fedora               RPM-GPG-KEY-fedora-ppc    RPM-GPG-KEY-fedora-sparc64
images    RPM-GPG-KEY-fedora-16-primary    RPM-GPG-KEY-fedora-ppc64  RPM-GPG-KEY-fedora-x86_64
isolinux  RPM-GPG-KEY-fedora-16-secondary  RPM-GPG-KEY-fedora-s390   TRANS.TBL
Packages  RPM-GPG-KEY-fedora-arm           RPM-GPG-KEY-fedora-s390x
repodata  RPM-GPG-KEY-fedora-i386          RPM-GPG-KEY-fedora-sparc

3. Create files fedora16.repo under /etc/yum.repos.d and enter the following lines :

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

Enter these lines in fedora16.repo :

[Fedora16-Repository]
name=DVD-Fedora16 Repository
baseurl=file:///mnt
enabled=1
gpgcheck=0

Please proceed to step 4 – step 8 when you perform yum command to install the package or module and get the following error :

Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. 
Please verify its path and try again

4. Create repo.disabled inside /etc/yum.repos.d :

[root@fedora16 ~]# mkdir /etc/yum.repos.d/repo.disabled

[root@fedora16 ~]# ls /etc/yum.repos.d/
fedora16.repo fedora.repo  fedora-updates.repo  fedora-updates-testing.repo  repo.disabled

6. Then moved all these 3 repo files into “repo.disabled” folder :

[root@fedora16 ~]# mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/repo.disabled
[root@fedora16 ~]# mv /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/repo.disabled
[root@fedora16 ~]# mv /etc/yum.repos.d/fedora-updates-testing.repo /etc/yum.repos.d/repo.disabled

7. List out the updated files and folders inside /etc/yum.repos.d :

[root@fedora16 ~]# ls -l /etc/yum.repos.d/
total 8
-rw-r--r--. 1 root root   92 Mar 18 00:09 fedora16.repo
drwxr-xr-x. 2 root root 4096 Mar 18 01:27 repo.disabled

Note : Only file fedora16.repo and folder repo.disabled should be exist.

8. Run yum clean all to clear up your yum cache directory :

[root@fedora16 ~]# yum clean all
Cleaning repos: Fedora16-Repository
Cleaning up Everything

9. Steps completed. You can start using yum command as usual.

[root@fedora16 ~]# yum install module/package
[root@fedora16 ~]# yum update module/package
[root@fedora16 ~]# yum remove module/package