How to Install Subversion 1.6.16 on CentOS 5.5 Server

Subversion is a open source version control system that will manages files and will keep the changes made to the files, over time. This will allows us to recover older versions of the data or examine the history of how the data changed. In this post, i will show you on how to install Subversion 1.6.16 on CentOS 5.5.

Prerequisite : How to Install Apache Httpd Web Server on Linux

1. Download Subversion 1.6.16

    [root@server data]# wget http://opensource.wandisco.com/centos/5/RPMS/i386/mod_dav_svn-1.6.16-1.i386.rpm
    --2011-03-29 20:20:22--  http://opensource.wandisco.com/centos/5/RPMS/i386/mod_dav_svn-1.6.16-1.i386.rpm
    Resolving opensource.wandisco.com... 212.7.198.163
    Connecting to opensource.wandisco.com|212.7.198.163|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 77152 (75K) [application/x-redhat-package-manager]
    Saving to: `mod_dav_svn-1.6.16-1.i386.rpm'
    
    100%[===========================================>] 77,152      47.1K/s   in 1.6s
    
    2011-03-29 20:20:25 (47.1 KB/s) - `mod_dav_svn-1.6.16-1.i386.rpm' saved [77152/77152]
    
    [root@server data]# wget http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-1.6.16-1.i386.rpm
    --2011-03-29 20:22:31--  http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-1.6.16-1.i386.rpm
    Resolving opensource.wandisco.com... 212.7.198.163
    Connecting to opensource.wandisco.com|212.7.198.163|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2191952 (2.1M) [application/x-redhat-package-manager]
    Saving to: `subversion-1.6.16-1.i386.rpm'
    
    100%[===========================================>] 2,191,952   53.4K/s   in 51s
    
    2011-03-29 20:23:25 (41.9 KB/s) - `subversion-1.6.16-1.i386.rpm' saved [2191952/2191952]
    
    [root@server data]# wget http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-devel-1.6.16-1.i386.rpm
    --2011-03-29 20:26:47--  http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-devel-1.6.16-1.i386.rpm
    Resolving opensource.wandisco.com... 212.7.198.163
    Connecting to opensource.wandisco.com|212.7.198.163|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 3407709 (3.2M) [application/x-redhat-package-manager]
    Saving to: `subversion-devel-1.6.16-1.i386.rpm'
    
    100%[===========================================>] 3,407,709   53.6K/s   in 62s
    
    2011-03-29 20:27:51 (53.9 KB/s) - `subversion-devel-1.6.16-1.i386.rpm' saved [3407709/3407709]
    
    [root@server data]# wget http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-perl-1.6.16-1.i386.rpm
    --2011-03-29 20:28:05--  http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-perl-1.6.16-1.i386.rpm
    Resolving opensource.wandisco.com... 212.7.198.163
    Connecting to opensource.wandisco.com|212.7.198.163|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1103833 (1.1M) [application/x-redhat-package-manager]
    Saving to: `subversion-perl-1.6.16-1.i386.rpm'
    
    100%[===========================================>] 1,103,833   66.8K/s   in 21s
    
    2011-03-29 20:28:28 (52.3 KB/s) - `subversion-perl-1.6.16-1.i386.rpm' saved [1103833/1103833]
    
    [root@server data]# wget http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-python-1.6.16-1.i386.rpm
    --2011-03-29 20:28:36--  http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-python-1.6.16-1.i386.rpm
    Resolving opensource.wandisco.com... 212.7.198.163
    Connecting to opensource.wandisco.com|212.7.198.163|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1286789 (1.2M) [application/x-redhat-package-manager]
    Saving to: `subversion-python-1.6.16-1.i386.rpm'
    
    100%[===========================================>] 1,286,789   30.2K/s   in 42s
    
    2011-03-29 20:29:20 (30.1 KB/s) - `subversion-python-1.6.16-1.i386.rpm' saved [1286789/1286789]
    
    [root@server data]# wget http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-tools-1.6.16-1.i386.rpm
    --2011-03-29 20:30:09--  http://opensource.wandisco.com/centos/5/RPMS/i386/subversion-tools-1.6.16-1.i386.rpm
    Resolving opensource.wandisco.com... 212.7.198.163
    Connecting to opensource.wandisco.com|212.7.198.163|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 390211 (381K) [application/x-redhat-package-manager]
    Saving to: `subversion-tools-1.6.16-1.i386.rpm'
    
    100%[===========================================>] 390,211     54.9K/s   in 7.2s
    
    2011-03-29 20:30:19 (53.1 KB/s) - `subversion-tools-1.6.16-1.i386.rpm' saved [390211/390211]
    
    [root@server data]# ls
    mod_dav_svn-1.6.16-1.i386.rpm       subversion-perl-1.6.16-1.i386.rpm
    subversion-1.6.16-1.i386.rpm        subversion-python-1.6.16-1.i386.rpm
    subversion-devel-1.6.16-1.i386.rpm  subversion-tools-1.6.16-1.i386.rpm

2. Install the RPM packages

    [root@server data]# rpm -Uvh --nosignature mod_dav_svn-1.6.16-1.i386.rpm subversion-1.6.16-1.i386.rpm subversion-devel-1.6.16-1.i386.rpm subversion-perl-1.6.16-1.i386.rpm subversion-python-1.6.16-1.i386.rpm subversion-tools-1.6.16-1.i386.rpm
    Preparing...                ########################################### [100%]
    1:subversion             ########################################### [ 17%]
    2:subversion-perl        ########################################### [ 33%]
    3:mod_dav_svn            ########################################### [ 50%]
    4:subversion-devel       ########################################### [ 67%]
    5:subversion-python      ########################################### [ 83%]
    6:subversion-tools       ########################################### [100%]
    [root@server data]#

3. Setting up directories

    mkdir /svn
    mkdir /svn/repos
    mkdir /svn/users
    mkdir /svn/permissions
    
    chown -R apache:apache /svn

4. Configure httpd Apache server as below:

    DocumentRoot /svn/repos
    ServerName svn.local
    ErrorLog logs/svn.local-error_log
    CustomLog logs/svn.local-access_log common

5. Create and Configure subversion.conf

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

     
    # Needed to do Subversion Apache server.
    LoadModule dav_svn_module     modules/mod_dav_svn.so
    
    # Only needed if you decide to do "per-directory" access control.
    LoadModule authz_svn_module   modules/mod_authz_svn.so
    
    #
    # Example location directive.
    #
    
    <Location /svn/repos>
            DAV svn
            SVNParentPath /svn/repos
            AuthType Basic
    	AuthName "Authorization Realm"
    	AuthUserFile /svn/users/passwords
            AuthzSVNAccessFile /svn/permissions/svnaccess
            Require valid-user
    </Location>
    
    

6. Create first repository using svnadmin command

    [root@server ~]# svnadmin create /svn/repos/testsvn
    [root@server ~]# chown -R apache:apache /svn/repos/testsvn

7. Create htpasswd user to access the testsvn repository

    [root@server ~]# htpasswd -c /svn/users/passwords user1
    New password:
    Re-type new password:
    Adding password for user user1
    
    [root@server ~]# htpasswd -m /svn/users/passwords user2
    New password:
    Re-type new password:
    Adding password for user user2

8. Create svnaccess file to access the testsvn repository

    [root@server ~]# vi /svn/permissions/svnaccess
    [groups]
    testgroup = user1, user2
    
    [testsvn:/]
    @testgroup = rw

9. Test your subversion server from browser http://192.168.2.5/svn/repos/testsvn/

    testsvn - Revision 0: /
    
    --------------------------------------------------------------------------------
    Powered by Subversion version 1.6.16 (r1073529).

Proceed to below URL if you want to view your repository using WebSVN or Viewvc.
How to Install WebSVN on CentOS
How to Install and Configure Viewvc on CentOS

How to Transfer Folder or Directory Using SCP Command in Linux

In this post, I will show the basic syntax on how to use secure copy (SCP) command to transfer the directory between linux servers. SCP allows directory to be transferred to, from, or between Linux or Unix hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh. Before start, there is the definition for every syntax that i will use:

  • local server1 (currently ssh) = The server1 ip (192.168.2.2) that i ssh from my notebook.
  • remote server2 = The server2 ip (192.168.2.5)
  • another remote server3 = The server3 ip (192.168.2.6)

There are three ways to use the scp command which are :

  1. To copy from local server1 (current ssh) to a remote server2. (server1–>server2)
  2. To copy from a remote server2 to local server1 (currently ssh). ( server2 –> server1)
  3. To copy from a remote server2 to another remote server3. ( server2–>server3)

In the third case, the directory is transferred directly between the servers; your local server1 ( currently ssh) will only tell the servers what to be transfer. Let’s have a look at the syntax of this command:

1. To copy directory from local server1 (currently ssh) to a (remote) server2.
server1 : 192.168.2.2
server2 : 192.168.2.5

    [root@server1 ~]# scp -r /tmp/scpdirdemo root@192.168.2.5:/tmp
    root@192.168.2.5's password:
    webmin-1.530-1.noarch.rpm                     100%   15MB 350.1KB/s   00:45
    VMwareTools-8.3.2-257589.tar.gz               100%   46MB 362.3KB/s   02:10
    [root@server1 ~]#
    

2. To copy directory from a remote server2 to local server1 (currently ssh)
server1 : 192.168.2.2
server2 : 192.168.2.5

    [root@server1 ~]# scp -r root@192.168.2.5:/tmp/scpdirdemo /tmp
    root@192.168.2.5's password:
    VMwareTools-8.3.2-257589.tar.gz               100%   46MB   3.8MB/s   00:12
    webmin-1.530-1.noarch.rpm                     100%   15MB   1.7MB/s   00:09
    [root@server1 ~]#
    

3. To copy directory from a remote server2 to another remote server3.
server1 : 192.168.2.2
server2 : 192.168.2.5
server3 : 192.168.2.6

    [root@server1 ~]# scp -r root@192.168.2.5:/tmp/scpdirdemo root@192.168.2.6:/tmp
    root@192.168.2.5's password:
    root@192.168.2.6's password:
    VMwareTools-8.3.2-257589.tar.gz                    100%   46MB  11.5MB/s   00:04
    webmin-1.530-1.noarch.rpm                          100%   15MB   7.7MB/s   00:02
    Connection to 192.168.2.5 closed.
    
    [root@server2 ~]# ls /tmp/scpdirdemo
    VMwareTools-8.3.2-257589.tar.gz  webmin-1.530-1.noarch.rpm
    [root@server2 ~]#
    

How to Transfer Files Using SCP Command in Linux

There are many way to transfer files over the network between the linux operating system. In this post, I will show the basic syntax on how to use secure copy (SCP) command to transfer the files. SCP allows files to be transferred to, from, or between Linux or Unix hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.

SCP Command in Linux

SCP Command will transfer files between linux machines over a secure and encrypted connection. But for if your server does not have SCp command, you will get the following error message :

# scp
-bash: /usr/bin/scp: No such file or directory

SCP command is part of openssh-clients package. You can install scp command with this syntax :

# yum install openssh-clients -y

Before start with SCP command example, there is the definition for every syntax that i will use :

  • local server1 (currently ssh) = The server1 ip (192.168.2.2) that i ssh from my notebook.
  • remote server2 = The server2 ip (192.168.2.5)
  • another remote server3 = The server3 ip (192.168.2.6)

3 SCP command in linux example :

  1. To copy from local server1 (current ssh) to a remote server2. (server1–>server2)
  2. To copy from a remote server2 to local server1 (currently ssh). ( server2 –> server1)
  3. To copy from a remote server2 to another remote server3. ( server2–>server3)

In the third case, the data is transferred directly between the servers; your local server1 ( currently ssh) will only tell the servers what to be transfer. Let’s have a look at the syntax of this command:

1. To copy from local server1 (currently ssh) to a (remote) server2.
server1 : 192.168.2.2
server2 : 192.168.2.5

Examples of the syntax as below :

# scp /Server1Path/FileName Server2Username@Server2IpAddress:/Server2Path
[root@server1 ~]# scp /tmp/scptest.txt root@192.168.2.5:/tmp
root@192.168.2.5's password:
scptest.txt                                   100%    9     0.0KB/s   00:00
[root@server1 ~]#

2. To copy files from a remote server2 to local server1 (currently ssh)
server1 : 192.168.2.2
server2 : 192.168.2.5

Examples of the syntax as below :

# scp Server2Username@Server2IpAddress:/Server2Path/FileName /Server1Path
[root@server1 ~]# scp root@192.168.2.5:/tmp/scptest1.txt /tmp
root@192.168.2.5's password:
scptest1.txt                                  100%  773     0.8KB/s   00:00
[root@server1 ~]#

3. To copy files from a remote server2 to another remote server3.
server1 : 192.168.2.2
server2 : 192.168.2.5
server3 : 192.168.2.6

Examples of the syntax as below :

# scp -r Server2Username@Server2IpAddress:/Server2Path/FileName 
Server3Username@Server3IpAddress:/Server3Path
[root@server ~]# scp -r root@192.168.2.5:/tmp/scptest.txt root@192.168.2.6:/tmp
root@192.168.2.5's password:
root@192.168.2.6's password:
scptest.txt                                   100%    9     0.0KB/s   00:00
Connection to 192.168.2.5 closed.
[root@server ~]#
[root@server ~]# ssh root@192.168.2.6
root@192.168.2.6's password:
[root@server2 ~]# ls /tmp
scptest.txt
[root@server2 ~]

How to Troubleshoot the Directory Server System Tuning Analysis Warning and Notice in CentOS

Before we proceed to install and configure the directory server, we must check for minimum operating requirements. This checking and scanning task can be done by using the linux or unix dsktune command utility. The dsktune utility will help you to scans the system for potential problems, required patches and dependencies and then provide the report of the items found that need to be addressed before running this software in a production environment.

This are the example of my server dsktune report

    [root@server ~]# dsktune
    CentOS Directory Server system tuning analysis version 10-AUGUST-2007.
    
    NOTICE : System is i686-unknown-linux2.6.18-194.el5 (1 processor).
    
    WARNING: 590MB of physical memory is available on the system.
    1024MB is recommended for best performance on large production system.
    
    NOTICE : The net.ipv4.tcp_keepalive_time is set to 7200000 milliseconds
    (120 minutes).  This may cause temporary server congestion from lost
    client connections.
    
    WARNING: There are only 1024 file descriptors (hard limit) available, which
    limit the number of simultaneous connections.
    
    WARNING: There are only 1024 file descriptors (soft limit) available, which
    limit the number of simultaneous connections.
    

1. WARNING:
590MB of physical memory is available on the system. 1024MB is recommended for best performance on large production system.

To address this issue, we have to upgrade the physical memory to at least 1024MB

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

To address this issue, we have to decrease the time default value for tcp_keepalive_time connection. Edit the /etc/sysctl.conf file and add the following lines on line number 6:

    [root@server ~]# vi /etc/sysctl.conf
          1 # Kernel sysctl configuration file for Red Hat Linux
          2 #
          3 # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
          4 # sysctl.conf(5) for more details.
          5 #Decrease the time default value for tcp_keepalive_time connection
          6 net.ipv4.tcp_keepalive_time = 300
          7

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

To address this issue, we have to add two parameter at the bottom of limits.conf configuration file as below:

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

Please reboot the server to take effect.

How to Install 389 Directory Server on CentOS/RHEL

On this guide i will show you on how to install 389 directory server on CentOS server. This guide assume that your CentOS server has been completely installed with minimum packages and the hostname and FQDN also has been configured correctly. According to CentOS Wiki, As of May 2009, the CentOS Directory server is officially released and is available from the Extras Repository for CentOS-5. Please follow below yum command to install the 389 directory and it’s dependencies. The number of dependencies might be different from you as this depend on your installed packages on your server.

    [root@server ~]# yum install centos-ds
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * addons: mirror.averse.net
     * base: mirror.averse.net
     * extras: mirror.averse.net
     * updates: mirror.averse.net
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package centos-ds.i386 0:8.1.0-1.el5.centos.2 set to be updated
    --> Processing Dependency: centos-admin-console for package: centos-ds
    --> Processing Dependency: centos-ds-base for package: centos-ds
    --> Processing Dependency: centos-ds-console for package: centos-ds
    --> Processing Dependency: centos-ds-admin for package: centos-ds
    --> Processing Dependency: centos-idm-console for package: centos-ds
    --> Processing Dependency: idm-console-framework for package: centos-ds
    --> Running transaction check
    ---> Package centos-admin-console.noarch 0:8.1.0-2.el5.centos.2 set to be updated
    ---> Package centos-ds-admin.i386 0:8.1.0-9.el5.centos.1 set to be updated
    --> Processing Dependency: libadminutil.so.1 for package: centos-ds-admin
    --> Processing Dependency: libadmsslutil.so.1 for package: centos-ds-admin
    ---> Package centos-ds-base.i386 0:8.1.0-0.14.el5.centos.2 set to be updated
    ---> Package centos-ds-console.noarch 0:8.1.0-5.el5.centos.2 set to be updated
    ---> Package centos-idm-console.i386 0:1.0.1-1.el5.centos.2 set to be updated
    ---> Package idm-console-framework.noarch 0:1.1.3-9.el5.centos.2 set to be updated
    --> Processing Dependency: ldapjdk for package: idm-console-framework
    --> Running transaction check
    ---> Package adminutil.i386 0:1.1.8-2.el5.centos.0 set to be updated
    ---> Package ldapjdk.i386 0:4.18-2jpp.3.el5 set to be updated
    --> Processing Dependency: java-gcj-compat for package: ldapjdk
    --> Processing Dependency: libgcj_bc.so.1 for package: ldapjdk
    --> Running transaction check
    ---> Package java-1.4.2-gcj-compat.i386 0:1.4.2.0-40jpp.115 set to be updated
    --> Processing Dependency: gjdoc for package: java-1.4.2-gcj-compat
    ---> Package libgcj.i386 0:4.1.2-48.el5 set to be updated
    --> Processing Dependency: gtk2 >= 2.4.0 for package: libgcj
    --> Processing Dependency: libgdk-x11-2.0.so.0 for package: libgcj
    --> Processing Dependency: libgtk-x11-2.0.so.0 for package: libgcj
    --> Processing Dependency: libgdk_pixbuf-2.0.so.0 for package: libgcj
    --> Running transaction check
    ---> Package gjdoc.i386 0:0.7.7-12.el5 set to be updated
    --> Processing Dependency: antlr for package: gjdoc
    ---> Package gtk2.i386 0:2.10.4-21.el5_5.6 set to be updated
    --> Running transaction check
    ---> Package antlr.i386 0:2.7.6-4jpp.2 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ====================================================================================
     Package                   Arch       Version                     Repository   Size
    ====================================================================================
    Installing:
     centos-ds                 i386       8.1.0-1.el5.centos.2        extras      3.4 k
    Installing for dependencies:
     adminutil                 i386       1.1.8-2.el5.centos.0        extras       68 k
     antlr                     i386       2.7.6-4jpp.2                base        978 k
     centos-admin-console      noarch     8.1.0-2.el5.centos.2        extras      222 k
     centos-ds-admin           i386       8.1.0-9.el5.centos.1        extras      364 k
     centos-ds-base            i386       8.1.0-0.14.el5.centos.2     extras      1.7 M
     centos-ds-console         noarch     8.1.0-5.el5.centos.2        extras      1.4 M
     centos-idm-console        i386       1.0.1-1.el5.centos.2        extras       74 k
     gjdoc                     i386       0.7.7-12.el5                base        793 k
     gtk2                      i386       2.10.4-21.el5_5.6           updates     6.5 M
     idm-console-framework     noarch     1.1.3-9.el5.centos.2        extras      1.0 M
     java-1.4.2-gcj-compat     i386       1.4.2.0-40jpp.115           base         29 k
     ldapjdk                   i386       4.18-2jpp.3.el5             base        782 k
     libgcj                    i386       4.1.2-48.el5                base         16 M
    
    Transaction Summary
    ====================================================================================
    Install      14 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 30 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/14): centos-ds-8.1.0-1.el5.centos.2.i386.rpm              | 3.4 kB     00:00
    (2/14): java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.i386.rpm     |  29 kB     00:00
    (3/14): adminutil-1.1.8-2.el5.centos.0.i386.rpm              |  68 kB     00:01
    (4/14): centos-idm-console-1.0.1-1.el5.centos.2.i386.rpm     |  74 kB     00:01
    (5/14): centos-admin-console-8.1.0-2.el5.centos.2.noarch.rpm | 222 kB     00:04
    (6/14): centos-ds-admin-8.1.0-9.el5.centos.1.i386.rpm        | 364 kB     00:06
    (7/14): ldapjdk-4.18-2jpp.3.el5.i386.rpm                     | 782 kB     00:20
    (8/14): gjdoc-0.7.7-12.el5.i386.rpm                          | 793 kB     00:22
    (9/14): antlr-2.7.6-4jpp.2.i386.rpm                          | 978 kB     00:32
    (10/14): idm-console-framework-1.1.3-9.el5.centos.2.noarch.r | 1.0 MB     00:26
    (11/14): centos-ds-console-8.1.0-5.el5.centos.2.noarch.rpm   | 1.4 MB     00:31
    (12/14): centos-ds-base-8.1.0-0.14.el5.centos.2.i386.rpm     | 1.7 MB     00:42
    (13/14): gtk2-2.10.4-21.el5_5.6.i386.rpm                     | 6.5 MB     02:17
    (14/14): libgcj-4.1.2-48.el5.i386.rpm                        |  16 MB     06:05
    ------------------------------------------------------------------------------------
    Total                                                45 kB/s |  30 MB     11:33
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : centos-ds-base                                              1/14
      Installing     : gtk2                                                        2/14
      Installing     : libgcj                                                      3/14
      Installing     : adminutil                                                   4/14
      Installing     : centos-ds-admin                                             5/14
      Installing     : centos-admin-console                                        6/14
      Installing     : centos-ds-console                                           7/14
      Installing     : java-1.4.2-gcj-compat                                       8/14
      Installing     : antlr                                                       9/14
      Installing     : ldapjdk                                                    10/14
      Installing     : gjdoc                                                      11/14
      Installing     : idm-console-framework                                      12/14
      Installing     : centos-idm-console                                         13/14
      Installing     : centos-ds                                                  14/14
    
    Installed:
      centos-ds.i386 0:8.1.0-1.el5.centos.2
    
    Dependency Installed:
      adminutil.i386 0:1.1.8-2.el5.centos.0
      antlr.i386 0:2.7.6-4jpp.2
      centos-admin-console.noarch 0:8.1.0-2.el5.centos.2
      centos-ds-admin.i386 0:8.1.0-9.el5.centos.1
      centos-ds-base.i386 0:8.1.0-0.14.el5.centos.2
      centos-ds-console.noarch 0:8.1.0-5.el5.centos.2
      centos-idm-console.i386 0:1.0.1-1.el5.centos.2
      gjdoc.i386 0:0.7.7-12.el5
      gtk2.i386 0:2.10.4-21.el5_5.6
      idm-console-framework.noarch 0:1.1.3-9.el5.centos.2
      java-1.4.2-gcj-compat.i386 0:1.4.2.0-40jpp.115
      ldapjdk.i386 0:4.18-2jpp.3.el5
      libgcj.i386 0:4.1.2-48.el5
    
    Complete!
    [root@server ~]#
    

How to Resolve init: Id “x” respawning too fast: disabled for 5 minutes

In most of linux distributions, this message means that the system boot by default into runlevel 5, which is supposed to respawn (re-start again after it’s been exited) a gui login via x windows, kdm, gdm, or whatever, but the system can’t locate the program. Consequently, the following logs will continue to appear on your /var/log/messages for every 5 minutes.

    Mar 22 21:05:14 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:10:15 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:15:16 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:20:17 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:20:32 server last message repeated 11 times
    Mar 22 21:25:18 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:30:19 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:35:20 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:40:21 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:45:22 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:50:23 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:55:25 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 21:59:53 server last message repeated 4 times
    Mar 22 21:59:53 server last message repeated 3 times
    Mar 22 22:00:26 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:05:27 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:09:33 server last message repeated 7 times
    Mar 22 22:10:28 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:15:29 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:20:30 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:23:49 server last message repeated 2 times
    Mar 22 22:25:31 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:27:58 server last message repeated 2 times
    Mar 22 22:30:32 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:35:33 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:36:01 server last message repeated 3 times
    Mar 22 22:40:34 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:45:35 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:50:36 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 22:55:37 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 23:00:38 server init: Id "x" respawning too fast: disabled for 5 minutes
    Mar 22 23:05:39 server init: Id "x" respawning too fast: disabled for 5 minutes
    

However, “Id” can also indicate the absence or misconfiguration of another program, like mingetty, if init tries to respawn itself more than 10 times in 2 minutes.

Reason:
I have removed the “X Window System” and “GNOME Desktop Environment” but never update the /etc/inittab.

Solution:

    [root@server ~]# vi /etc/inittab
    

Change the initdefault id to 3 as below:-

    #
    # inittab       This file describes how the INIT process should set up
    #               the system in a certain run-level.
    #
    # Author:       Miquel van Smoorenburg, 
    #               Modified for RHS Linux by Marc Ewing and Donnie Barnes
    #
    
    # Default runlevel. The runlevels used by RHS are:
    #   0 - halt (Do NOT set initdefault to this)
    #   1 - Single user mode
    #   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
    #   3 - Full multiuser mode
    #   4 - unused
    #   5 - X11
    #   6 - reboot (Do NOT set initdefault to this)
    #
    id:3:initdefault:
    

Save and quit the /etc/inittab then reboot the system.

How to Show Line Number in vi or vim Editor

A VI or VIM editor is a simple editor used by system administrators or programmers in Linux and Unix server environment. vi or vim is actually the same thing as is has same usage and same purpose. Vim is a text editor that is upwards compatible to Vi. Both can be used to edit all kinds of plain text and programs. By default, Vi and vim does not show the line number and this is very inefficient. However, there is the step to show line number in vi or vim editor. Follow this example:

1. Select any file to view in vi editor. For example httpd.conf

    [root@server ~]# vi /etc/httpd/conf/httpd.conf
    
    #
    # This is the main Apache server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See  for detailed information.
    # In particular, see
    #
    # for a discussion of each configuration directive.
    #
    #
    # Do NOT simply read the instructions in here without understanding
    # what they do.  They're here only as hints or reminders.  If you are unsure
    # consult the online docs. You have been warned.
    #
    # The configuration directives are grouped into three basic sections:
    #  1. Directives that control the operation of the Apache server process as a
    #     whole (the 'global environment').
    #  2. Directives that define the parameters of the 'main' or 'default' server,
    #     which responds to requests that aren't handled by a virtual host.
    #     These directives also provide default values for the settings
    #     of all virtual hosts.
    #  3. Settings for virtual hosts, which allow Web requests to be sent to
    #     different IP addresses or hostnames and have them handled by the
    #     same Apache server process.
    

2. Once you are in vi or vim editor, makesure you press ESC.
3. In vi or vim editor type the command below:-

    :set number
    

or

    :set nu
    

Once entered, you will see the line number showing at the left side.

          1 #
          2 # This is the main Apache server configuration file.  It contains the
          3 # configuration directives that give the server its instructions.
          4 # See  for detailed information.
          5 # In particular, see
          6 #
          7 # for a discussion of each configuration directive.
          8 #
          9 #
         10 # Do NOT simply read the instructions in here without understanding
         11 # what they do.  They're here only as hints or reminders.  If you are unsure
         12 # consult the online docs. You have been warned.
         13 #
         14 # The configuration directives are grouped into three basic sections:
         15 #  1. Directives that control the operation of the Apache server process as a
         16 #     whole (the 'global environment').
         17 #  2. Directives that define the parameters of the 'main' or 'default' server        ,
         18 #     which responds to requests that aren't handled by a virtual host.
         19 #     These directives also provide default values for the settings
         20 #     of all virtual hosts.
         21 #  3. Settings for virtual hosts, which allow Web requests to be sent to
         22 #     different IP addresses or hostnames and have them handled by the
    

4. If you want to hide the line number, you can use the command below:-

    :set nonumber
    

or

    :set nonu
    

How to Remove Games and Entertainment in Linux

When you installing CentOS, game also included in the the Operating system. Apart from the Games and Entertainment section there were games that were present in the gnome-games. However, there is the simple way to trace and remove this game. Please use below command:

    [root@server ~]# yum grouplist | grep -i game
       Games and Entertainment
    
    [root@server ~]# yum groupremove "Games and Entertainment"
    Loaded plugins: fastestmirror
    Setting up Group Process
    Loading mirror speeds from cached hostfile
     * addons: mirror.averse.net
     * base: mirror.averse.net
     * extras: mirror.averse.net
     * updates: mirror.averse.net
    Resolving Dependencies
    --> Running transaction check
    ---> Package gnome-games.i386 1:2.16.0-2.el5 set to be erased
    ---> Package joystick.i386 0:1.2.15-20.2.2 set to be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================
     Package              Arch          Version                 Repository          Size
    =====================================================================================
    Removing:
     gnome-games          i386          1:2.16.0-2.el5          installed           19 M
     joystick             i386          1.2.15-20.2.2           installed           93 k
    
    Transaction Summary
    =====================================================================================
    Remove        2 Package(s)
    Reinstall     0 Package(s)
    Downgrade     0 Package(s)
    
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
    /var/tmp/rpm-tmp.61118: line 2: gconftool-2: command not found
    /var/tmp/rpm-tmp.61118: line 4: gconftool-2: command not found
      Erasing        : joystick                                                      1/2
    error: %preun(gnome-games-2.16.0-2.el5.i386) scriptlet failed, exit status 127
    
    Removed:
      gnome-games.i386 1:2.16.0-2.el5            joystick.i386 0:1.2.15-20.2.2
    
    Complete!
    

How to Install ADWLauncher and ADWLauncher EX on Android

ADW.Launcher, is a Opensource home replacement application. Meanwhile the ADWLauncher EX is a highly customizable home replacement application that require you to buy it before use. It’s beyond tweaking your android desktop.

What is a home replacement application?
Is an normal android application that will run when you press your android phone’s HOME key. It’s usually what people know as the “android desktop”.

To download from Android Market, Please try below steps:
1. Open Android Market on Your phone and go to “Search”
2. Type “ADWLauncher EX” in the search field and hit “Search”
3. Once you find the “ADWLauncher EX” game, choose “Install” and follow the instructions


ADWLauncher EX VS ADW.Launcher

ADWLauncher EX is based on the ADW.Launcher opensource core with a lot of new enhancements features as below:
a) 5 different app drawer styles/behaviors

  • 3D Nexus One like application drawer
  • 2 different plain vertical drawer styles, the “old one” and a new fast and smooth one
  • 2 different Iphone-like horizontal application drawers, a traditional paginated one and a new one with continuous fling

b) Different desktop transitions: new animations while navigating through your desktop screens. Try them all, they’re crazy!!!
c) New Icons configurations/look and feel: Tweak your desktop icons, change its sizes, add coloured backgrounds, change font size, color, etc!
d) New fast presets mode: Quickly change the whole desktop configuration by 1 click!
e) Editable desktop icons for applications, shortcuts and folders!
f) A lots of code improvements

To try ADWLauncher EX, you can download from below mirrors:
Mirror1
Mirror2
Mirror2

How to Show the Tables in a MySQL Database Server

In this guide i will guide you the simple step to show the table on the database server. Assume that the wordpress blog has been installed and running fine with the following database details:

    Database Name : wp1db
    Database User : wp1user
    Database Password : wp1password
    

Go to the terminal or ssh to MySQL Database server. You should login as wp1user.

    [root@server ~]# mysql -u wp1user -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 198
    Server version: 5.0.77 Source distribution
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    
    mysql> status
    --------------
    mysql  Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1
    
    Connection id:          204
    Current database:
    Current user:           wp1user@localhost
    SSL:                    Not in use
    Current pager:          stdout
    Using outfile:          ''
    Using delimiter:        ;
    Server version:         5.0.77 Source distribution
    Protocol version:       10
    Connection:             Localhost via UNIX socket
    Server characterset:    latin1
    Db     characterset:    latin1
    Client characterset:    latin1
    Conn.  characterset:    latin1
    UNIX socket:            /var/lib/mysql/mysql.sock
    Uptime:                 1 hour 10 min 58 sec
    
    Threads: 3  Questions: 3307  Slow queries: 0  Opens: 57  Flush tables: 1  Open tables: 
    29  Queries per second avg: 0.777
    --------------
    
    
    mysql> use wp1db;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    
    
    mysql> show tables;
    +-----------------------+
    | Tables_in_wp1db       |
    +-----------------------+
    | wp_commentmeta        |
    | wp_comments           |
    | wp_links              |
    | wp_options            |
    | wp_postmeta           |
    | wp_posts              |
    | wp_term_relationships |
    | wp_term_taxonomy      |
    | wp_terms              |
    | wp_usermeta           |
    | wp_users              |
    +-----------------------+
    11 rows in set (0.01 sec)
    
    

How to Grant Privileges in MySQL Database Server

In this tutorial, i will guide you how to grant privileges in MySQL database server. You must connect to the MySQL Server as a root user and perform below task:

1. How to Login MySQL DB as a root:

    [root@server ~]# mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 214
    Server version: 5.0.77 Source distribution
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    

2. How to Create MySQL Database : wp1db

    mysql> CREATE DATABASE wp1db;
    

3. How to Create user with password : wp1user /wp1password

    mysql> CREATE USER 'wp1user'@'localhost' IDENTIFIED BY 'wp1password';
    

4. How to Grant all privileges on wp1db to wp1user

    mysql> GRANT ALL PRIVILEGES ON wp1db.* to wp1user@localhost ;
    

5. Verify the grant access

    mysql> SHOW GRANTS FOR 'wp1user'@'localhost';
    +---------------------------------------------------------------------------------------+
    | Grants for wp1user@localhost                                                          |
    +---------------------------------------------------------------------------------------+
    | GRANT USAGE ON *.* TO 'wp1user'@'localhost' IDENTIFIED BY PASSWORD '67ca6cf16fbdbef2' |
    | GRANT ALL PRIVILEGES ON `wp1db`.* TO 'wp1user'@'localhost'                            |
    +---------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
    

How to Fix “missing the MySQL extension” on Linux

missing the MySQL extensionI believe most users who try to install WordPress on a Linux server encountered this problem. This problem occurs if Apache, PHP and MySQL server has been installed but without or missing the MySQL extension. Follow the steps below to resolve this issue :

Problem :
I’m installing WordPress blog system under CentOS Linux or RHEL and getting an error which read as follows:

PHP installation appears to be missing the MySQL extension which is required
by WordPress

What is PHP

PHP is the most popular scripting language for web development. It is free, open source and server-side (the code is executed on the server).

What is MySQL

MySQL is a Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).

MySQL module for php5

PHP support for MySQL should work without a problem if installed properly.

Solution for missing the MySQL extension :

1. Login to your linux server as a root and install the most important php extension to work with MySQL server features :

[root@server ~]# yum install php-mysql -y

2. Once you installed above php-mysql extension, kindly restart your apache web server.

etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]