How to Install and Configure Subversion 1.8 on CentOS 6.5

Subversion is a open source version control system that will manages files and will keep the changes made to the files. With Subversion, it can help you to recovers the older files and directories and also to examine the history of your files and directories how they are changed all over time. This post will discuss how you can install and configure Subversion 1.8 on CentOS 6.5

1. Prepare WANdisco repo :

[root@centos6-05 ~]# wget opensource.wandisco.com/RPM-GPG-KEY-WANdisco -O /tmp/RPM-GPG-KEY-WANdisco
[root@centos6-05 ~]# wget opensource.wandisco.com/RPM-GPG-KEY-WANdisco -O /tmp/RPM-GPG-KEY-WANdisco
--2014-03-11 23:29:59--  http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
Resolving opensource.wandisco.com... 54.248.108.17
Connecting to opensource.wandisco.com|54.248.108.17|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1759 (1.7K) [application/octet-stream]
Saving to: â/tmp/RPM-GPG-KEY-WANdiscoâ

100%[==========================================================>] 1,759       --.-K/s   in 0.003s

2014-03-11 23:30:00 (665 KB/s) - â/tmp/RPM-GPG-KEY-WANdiscoâ

2. Import RPM-GPG-KEY-WANdisco. Once imported, it safe to delete :

[root@centos6-05 ~]# rpm --import /tmp/RPM-GPG-KEY-WANdisco
[root@centos6-05 ~]# rm -rf /tmp/RPM-GPG-KEY-WANdisco

You can get more subversion file from the followings :
http://opensource.wandisco.com/rhel/6/svn-1.8/RPMS/x86_64/

3. Configure WANdisco repo file :

[root@centos6-05 ~]# vi /etc/yum.repos.d/WANdisco-1.8.repo
[WANdisco]
name=WANdisco SVN Repo 1.8
enabled=1
baseurl=http://opensource.wandisco.com/rhel/6/svn-1.8/RPMS/
gpgcheck=1

4. Install subversion using yum install :

[root@centos6-05 ~]# yum install subversion mod_dav_svn -y

Full installation screen :

[root@centos6-05 ~]# yum install subversion mod_dav_svn -y
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/metalink                                                                | 5.2 kB     00:00
 * Webmin: download.webmin.com
 * base: centos.ipserverone.com
 * epel: epel.mirror.net.in
 * extras: centos.ipserverone.com
 * updates: centos.ipserverone.com
WANdisco                                                                     |  951 B     00:00
WANdisco/primary                                                             |  65 kB     00:00
WANdisco                                                                                    309/309
Webmin                                                                       |  951 B     00:00
Webmin/primary                                                               |  21 kB     00:00
Webmin                                                                                      168/168
base                                                                         | 3.7 kB     00:00
base/primary_db                                                              | 4.4 MB     00:45
epel                                                                         | 4.2 kB     00:00
epel/primary_db                                                              | 6.0 MB     01:51
extras                                                                       | 3.4 kB     00:00
extras/primary_db                                                            |  19 kB     00:00
updates                                                                      | 3.4 kB     00:00
updates/primary_db                                                           | 2.1 MB     00:18
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mod_dav_svn.x86_64 0:1.8.8-1 will be installed
---> Package subversion.x86_64 0:1.8.8-1 will be installed
--> Processing Dependency: libserf-1.so.1()(64bit) for package: subversion-1.8.8-1.x86_64
--> Running transaction check
---> Package serf.x86_64 0:1.3.2-2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                   Arch                 Version                Repository              Size
====================================================================================================
Installing:
 mod_dav_svn               x86_64               1.8.8-1                WANdisco                77 k
 subversion                x86_64               1.8.8-1                WANdisco               2.2 M
Installing for dependencies:
 serf                      x86_64               1.3.2-2                WANdisco                43 k

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

Total download size: 2.3 M
Installed size: 7.8 M
Downloading Packages:
(1/3): mod_dav_svn-1.8.8-1.x86_64.rpm                                        |  77 kB     00:00
(2/3): serf-1.3.2-2.x86_64.rpm                                               |  43 kB     00:00
(3/3): subversion-1.8.8-1.x86_64.rpm                                         | 2.2 MB     00:19
----------------------------------------------------------------------------------------------------
Total                                                               112 kB/s | 2.3 MB     00:20
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : serf-1.3.2-2.x86_64                                                              1/3
  Installing : subversion-1.8.8-1.x86_64                                                        2/3
  Installing : mod_dav_svn-1.8.8-1.x86_64                                                       3/3
Stopping httpd: [  OK  ]
Starting httpd: [  OK  ]
  Verifying  : mod_dav_svn-1.8.8-1.x86_64                                                       1/3
  Verifying  : subversion-1.8.8-1.x86_64                                                        2/3
  Verifying  : serf-1.3.2-2.x86_64                                                              3/3

Installed:
  mod_dav_svn.x86_64 0:1.8.8-1                      subversion.x86_64 0:1.8.8-1

Dependency Installed:
  serf.x86_64 0:1.3.2-2

Complete!

5. Setting up SVN directories :

[root@centos6-05 ~]# mkdir /svn
[root@centos6-05 ~]# mkdir /svn/repos
[root@centos6-05 ~]# mkdir /svn/users
[root@centos6-05 ~]# mkdir /svn/permissions
[root@centos6-05 ~]# chown -R apache:apache /svn

6. Configure httpd Apache server as below :

[root@centos6-05 ~]# vim /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
    ServerAdmin webmaster@svn.ehowstuff.local
    DocumentRoot /svn/repos
    ServerName svn.ehowstuff.local
    ErrorLog logs/svn.ehowstuff.local-error_log
    CustomLog logs/svn.ehowstuff.local-access_log common
</VirtualHost>

7. Do a backup of origial subversion file :

[root@centos6-05 ~]# mv /etc/httpd/conf.d/subversion.conf /etc/httpd/conf.d/subversion.conf.bak

8. Create and Configure subversion.conf :

[root@centos6-05 ~]# vi /etc/httpd/conf.d/subversion.conf
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
        AuthType Basic
        AuthName "Authorization Realm"
        AuthUserFile /svn/users/passwords
        AuthzSVNAccessFile /svn/permissions/svnaccess
        Require valid-user
</Location>

9. Create first repository using svnadmin command :

[root@centos6-05 ~]# svnadmin create /svn/repos/testrepo
[root@centos6-05 ~]# chown -R apache:apache /svn/repos/testrepo

10. Create htpasswd user to access the testrepo repository :

[root@centos6-05 ~]# htpasswd -c /svn/users/passwords svnuser1
New password:
Re-type new password:
Adding password for user svnuser1

11. Create svnaccess file to access the testrepo repository :

[root@centos6-05 ~]# vi /svn/permissions/svnaccess

Add the following :

[testrepo:/]
svnuser1 = rw

12. Restart httpd :

[root@centos6-05 ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

13. Test your subversion server from browser :

http://svn.ehowstuff.local/svn/repos/testrepo/

Setup vsftpd Service on CentOS 6.5

vsftpd is a free FTP service for UNIX and linux systems. It is very stable, fast and secure ftp server. In this post, i will share how to setup sftpd Service on CentOS 6.5. The steps has been tested working fine with other version of CentOS 6.

1. Install vsftpd ftp service :

[root@server-05 ~]# yum install vsftpd -y

Example :

[root@server-05 ~]# yum install vsftpd -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.upsi.edu.my
 * extras: mirror.upsi.edu.my
 * updates: mirror.upsi.edu.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:2.2.2-11.el6_4.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package              Arch                 Version                         Repository          Size
====================================================================================================
Installing:
 vsftpd               x86_64               2.2.2-11.el6_4.1                base               151 k

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

Total download size: 151 k
Installed size: 331 k
Downloading Packages:
vsftpd-2.2.2-11.el6_4.1.x86_64.rpm                                           | 151 kB     00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : vsftpd-2.2.2-11.el6_4.1.x86_64                                                   1/1
  Verifying  : vsftpd-2.2.2-11.el6_4.1.x86_64                                                   1/1

Installed:
  vsftpd.x86_64 0:2.2.2-11.el6_4.1

Complete!

2. Install ftp client on linux :

[root@server-05 ~]# yum install ftp -y

3. Create local user1 to access ftp service.

[root@server-05 ~]# useradd user1
[root@server-05 ~]# passwd user1
Changing password for user user1.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

4. Add user1 into vsftpd userlist as below :

[root@server-05 ~]# vi /etc/vsftpd/user_list
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
user1

5. Disabled anonymous access:

anonymous_enable=YES

to below :

anonymous_enable=NO

6. Add the following to bottom of the config file. If userlist_deny=NO, only allow users in this file :

userlist_deny=NO

7. Update the following banner :

ftpd_banner=Welcome to ehowstuff FTP service.

8. Start vsftpd service :

[root@server-05 ~]# service vsftpd start
Starting vsftpd for vsftpd:                                [  OK  ]

9. Configure vsftpd daemon start automatically on booting :

[root@server-05 ~]# chkconfig vsftpd on

10. Test ftp service connection from windows client using user1 :


C:\>ftp 192.168.0.5
Connected to 192.168.0.5.
220 Welcome to ehowstuff FTP service.
User (192.168.0.5:(none)): user1
331 Please specify the password.
Password:
230 Login successful.
ftp> bye
221 Goodbye.

11. Test ftp service connection from linux client using user1 :

[root@server-05 ~]# ftp 192.168.0.5
Connected to 192.168.0.5 (192.168.0.5).
220 Welcome to ehowstuff FTP service.
Name (192.168.0.5:root): user1
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> exit
221 Goodbye.

Download CentOS 6.5 x86_64 and x86 ISO

CentOS 6.5 has just been released on 1st December 2013. CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public. It has 100% binary compatibility with its upstream source, Red Hat Enterprise Linux (RHEL).

Released Note :

http://wiki.centos.org/Manuals/ReleaseNotes/CentOS6.5

Major changes :
-The Precision Time Protocol – previously a technology preview – is now fully supported. The following drivers support network time stamping: bnx2x, tg3, e1000e, igb, ixgbe, and sfc.
-OpenSSL has been updated to version 1.0.1.
-OpenSSL and NSS now support TLS 1.1 and 1.2.
-KVM received various enhancements. These include improved read-only support of VMDK- and VHDX-Files, CPU hot plugging and updated virt-v2v-/virt-p2v-conversion tools.
-Hyper-V and VMware drivers have been updated.
-Updates to Evolution (2.32) and Libre Office (4.0.4).

Download URL for x86 and x64 ISO
http://mirrors.hostemo.com/CentOS/6.5/isos/x86_64/
http://mirrors.hostemo.com/CentOS/6.5/isos/i386/

How to Install VMware Tools on CentOS 6.5

vmwaretoolsVMware Tools is one of important components in order to run virtual machine (VM) with excellent performance. It is a group of utilities that help to enhances the overall performance of the virtual machine’s guest operating system (OS) and improves management of the VM. Without the VMware Tools, guest OS performance will lacks some of the important functionality. Below steps shows how to install the VMware Tools on CentOS 6.5 :

1. Install the prerequisites into your CentOS 6.5.

[root@centos6 ~]# yum install perl gcc make kernel-headers kernel-devel -y

Example.

[root@centos6 ~]# yum install perl gcc make kernel-headers kernel-devel -y
Loaded plugins: fastestmirror
base                                                                         | 3.7 kB     00:00
http://ossm.utm.my/centos/6.5/os/x86_64/repodata/617a880b84a87969e04bfeebb1b96d5f441da42ee931d374fa6b6d57decd821e-primary.sqlite.bz2: [Errno 12] Timeout on http://ossm.utm.my/centos/6.5/os/x86_64/repodata/617a880b84a87969e04bfeebb1b96d5f441da42ee931d374fa6b6d57decd821e-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
Trying other mirror.
base/primary_db                                                              | 4.4 MB     00:49
extras                                                                       | 3.4 kB     00:00
extras/primary_db                                                            |  18 kB     00:00
updates                                                                      | 3.4 kB     00:00
updates/primary_db                                                           |  65 kB     00:00
Setting up Install Process
Package 1:make-3.81-20.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-4.el6 will be installed
--> Processing Dependency: libgomp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x86_64
--> Processing Dependency: cpp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.7-4.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-4.el6.x86_64
--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.4.7-4.el6.x86_64
---> Package kernel-devel.x86_64 0:2.6.32-431.el6 will be installed
---> Package kernel-headers.x86_64 0:2.6.32-431.el6 will be installed
---> Package perl.x86_64 4:5.10.1-136.el6 will be installed
--> Processing Dependency: perl-libs = 4:5.10.1-136.el6 for package: 4:perl-5.10.1-136.el6.x86_64
--> Processing Dependency: perl-libs for package: 4:perl-5.10.1-136.el6.x86_64
--> Processing Dependency: perl(version) for package: 4:perl-5.10.1-136.el6.x86_64
--> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-136.el6.x86_64
--> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-136.el6.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.10.1-136.el6.x86_64
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.7-4.el6 will be installed
--> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-4.el6.x86_64
---> Package glibc-devel.x86_64 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc-headers = 2.12-1.132.el6 for package: glibc-devel-2.12-1.132.el6.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.132.el6.x86_64
---> Package libgomp.x86_64 0:4.4.7-4.el6 will be installed
---> Package perl-Module-Pluggable.x86_64 1:3.90-136.el6 will be installed
---> Package perl-Pod-Simple.x86_64 1:3.13-136.el6 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-136.el6.x86_64
---> Package perl-libs.x86_64 4:5.10.1-136.el6 will be installed
---> Package perl-version.x86_64 3:0.77-136.el6 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.12-1.132.el6 will be installed
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
---> Package perl-Pod-Escapes.x86_64 1:1.04-136.el6 will be installed
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                         Arch             Version                      Repository      Size
====================================================================================================
Installing:
 gcc                             x86_64           4.4.7-4.el6                  base            10 M
 kernel-devel                    x86_64           2.6.32-431.el6               base           8.7 M
 kernel-headers                  x86_64           2.6.32-431.el6               base           2.8 M
 perl                            x86_64           4:5.10.1-136.el6             base            10 M
Installing for dependencies:
 cloog-ppl                       x86_64           0.15.7-1.2.el6               base            93 k
 cpp                             x86_64           4.4.7-4.el6                  base           3.7 M
 glibc-devel                     x86_64           2.12-1.132.el6               base           978 k
 glibc-headers                   x86_64           2.12-1.132.el6               base           608 k
 libgomp                         x86_64           4.4.7-4.el6                  base           118 k
 mpfr                            x86_64           2.4.1-6.el6                  base           157 k
 perl-Module-Pluggable           x86_64           1:3.90-136.el6               base            40 k
 perl-Pod-Escapes                x86_64           1:1.04-136.el6               base            32 k
 perl-Pod-Simple                 x86_64           1:3.13-136.el6               base           212 k
 perl-libs                       x86_64           4:5.10.1-136.el6             base           578 k
 perl-version                    x86_64           3:0.77-136.el6               base            51 k
 ppl                             x86_64           0.10.2-11.el6                base           1.3 M

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

Total download size: 40 M
Installed size: 98 M
Downloading Packages:
(1/16): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm                                  |  93 kB     00:00
(2/16): cpp-4.4.7-4.el6.x86_64.rpm                                           | 3.7 MB     00:42
(3/16): gcc-4.4.7-4.el6.x86_64.rpm                                           |  10 MB     01:40
(4/16): glibc-devel-2.12-1.132.el6.x86_64.rpm                                | 978 kB     00:09
(5/16): glibc-headers-2.12-1.132.el6.x86_64.rpm                              | 608 kB     00:06
(6/16): kernel-devel-2.6.32-431.el6.x86_64.rpm                               | 8.7 MB     01:25
(7/16): kernel-headers-2.6.32-431.el6.x86_64.rpm                             | 2.8 MB     00:30
(8/16): libgomp-4.4.7-4.el6.x86_64.rpm                                       | 118 kB     00:01
(9/16): mpfr-2.4.1-6.el6.x86_64.rpm                                          | 157 kB     00:01
(10/16): perl-5.10.1-136.el6.x86_64.rpm                                      |  10 MB     01:35
(11/16): perl-Module-Pluggable-3.90-136.el6.x86_64.rpm                       |  40 kB     00:00
(12/16): perl-Pod-Escapes-1.04-136.el6.x86_64.rpm                            |  32 kB     00:00
(13/16): perl-Pod-Simple-3.13-136.el6.x86_64.rpm                             | 212 kB     00:01
(14/16): perl-libs-5.10.1-136.el6.x86_64.rpm                                 | 578 kB     00:05
(15/16): perl-version-0.77-136.el6.x86_64.rpm                                |  51 kB     00:00
(16/16): ppl-0.10.2-11.el6.x86_64.rpm                                        | 1.3 MB     00:11
----------------------------------------------------------------------------------------------------
Total                                                               103 kB/s |  40 MB     06:35
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
 Package: centos-release-6-5.el6.centos.11.1.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:perl-Pod-Escapes-1.04-136.el6.x86_64                                          1/16
  Installing : 4:perl-libs-5.10.1-136.el6.x86_64                                               2/16
  Installing : 1:perl-Pod-Simple-3.13-136.el6.x86_64                                           3/16
  Installing : 3:perl-version-0.77-136.el6.x86_64                                              4/16
  Installing : 1:perl-Module-Pluggable-3.90-136.el6.x86_64                                     5/16
  Installing : 4:perl-5.10.1-136.el6.x86_64                                                    6/16
  Installing : ppl-0.10.2-11.el6.x86_64                                                        7/16
  Installing : cloog-ppl-0.15.7-1.2.el6.x86_64                                                 8/16
  Installing : mpfr-2.4.1-6.el6.x86_64                                                         9/16
  Installing : cpp-4.4.7-4.el6.x86_64                                                         10/16
  Installing : libgomp-4.4.7-4.el6.x86_64                                                     11/16
  Installing : kernel-headers-2.6.32-431.el6.x86_64                                           12/16
  Installing : glibc-headers-2.12-1.132.el6.x86_64                                            13/16
  Installing : glibc-devel-2.12-1.132.el6.x86_64                                              14/16
  Installing : gcc-4.4.7-4.el6.x86_64                                                         15/16
  Installing : kernel-devel-2.6.32-431.el6.x86_64                                             16/16
  Verifying  : 1:perl-Module-Pluggable-3.90-136.el6.x86_64                                     1/16
  Verifying  : kernel-headers-2.6.32-431.el6.x86_64                                            2/16
  Verifying  : cpp-4.4.7-4.el6.x86_64                                                          3/16
  Verifying  : glibc-devel-2.12-1.132.el6.x86_64                                               4/16
  Verifying  : 1:perl-Pod-Escapes-1.04-136.el6.x86_64                                          5/16
  Verifying  : libgomp-4.4.7-4.el6.x86_64                                                      6/16
  Verifying  : 4:perl-5.10.1-136.el6.x86_64                                                    7/16
  Verifying  : mpfr-2.4.1-6.el6.x86_64                                                         8/16
  Verifying  : 4:perl-libs-5.10.1-136.el6.x86_64                                               9/16
  Verifying  : 1:perl-Pod-Simple-3.13-136.el6.x86_64                                          10/16
  Verifying  : kernel-devel-2.6.32-431.el6.x86_64                                             11/16
  Verifying  : gcc-4.4.7-4.el6.x86_64                                                         12/16
  Verifying  : 3:perl-version-0.77-136.el6.x86_64                                             13/16
  Verifying  : ppl-0.10.2-11.el6.x86_64                                                       14/16
  Verifying  : cloog-ppl-0.15.7-1.2.el6.x86_64                                                15/16
  Verifying  : glibc-headers-2.12-1.132.el6.x86_64                                            16/16

Installed:
  gcc.x86_64 0:4.4.7-4.el6                          kernel-devel.x86_64 0:2.6.32-431.el6
  kernel-headers.x86_64 0:2.6.32-431.el6            perl.x86_64 4:5.10.1-136.el6

Dependency Installed:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6                   cpp.x86_64 0:4.4.7-4.el6
  glibc-devel.x86_64 0:2.12-1.132.el6                 glibc-headers.x86_64 0:2.12-1.132.el6
  libgomp.x86_64 0:4.4.7-4.el6                        mpfr.x86_64 0:2.4.1-6.el6
  perl-Module-Pluggable.x86_64 1:3.90-136.el6         perl-Pod-Escapes.x86_64 1:1.04-136.el6
  perl-Pod-Simple.x86_64 1:3.13-136.el6               perl-libs.x86_64 4:5.10.1-136.el6
  perl-version.x86_64 3:0.77-136.el6                  ppl.x86_64 0:0.10.2-11.el6

Complete!

2. Attach the vmware tools sofware from vSphere client. Assumed that the host is ESXi 4.1.
1

3. Mount the attached vmware tool software.
[root@centos6 tmp]# mount /dev/cdrom /mnt
[root@centos6 tmp]# cd /mnt
[root@centos6 tmp]# ls
VMwareTools-8.3.7-341836.tar.gz  yum.log

4. Extract the VMware tools

[root@centos6 tmp]# tar xzvf VMwareTools-8.3.7-341836.tar.gz

5. Start install by issue command “./vmware-install.pl”

[root@centos6 tmp]# cd vmware-tools-distrib
[root@centos6 vmware-tools-distrib]# ls
bin  doc  etc  FILES  INSTALL  installer  lib  vmware-install.pl
[root@centos6 vmware-tools-distrib]# ./vmware-install.pl

Full installation as below :

[root@centos6 vmware-tools-distrib]# ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files?
[/usr/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d]

What is the directory that contains the init scripts?
[/etc/rc.d/init.d]

In which directory do you want to install the daemon files?
[/usr/sbin]

In which directory do you want to install the library files?
[/usr/lib/vmware-tools]

The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]

The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes]

The installation of VMware Tools 8.3.7 build-341836 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]

Initializing...

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                          [  OK  ]
   Virtual Printing daemon:                                [  OK  ]
   Unmounting HGFS shares:                                 [  OK  ]
   Guest filesystem driver:                                [  OK  ]

The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.  Use the flag
--clobber-kernel-modules=vmmemctl to override.

Found a compatible pre-built module for vmhgfs.  Installing it...

Found a compatible pre-built module for vmxnet.  Installing it...

Found a compatible pre-built module for vmblock.  Installing it...

Found a compatible pre-built module for vmci.  Installing it...

Found a compatible pre-built module for vsock.  Installing it...

The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.  Use the flag
--clobber-kernel-modules=vmxnet3 to override.

The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.  Use the flag
--clobber-kernel-modules=pvscsi to override.

No X install found.

Creating a new initrd boot image for the kernel.
   Checking acpi hot plug                                  [  OK  ]
Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                       [  OK  ]
   VM communication interface:                             [  OK  ]
   VM communication interface socket family:               [  OK  ]
   Guest operating system daemon:                          [  OK  ]
   Virtual Printing daemon:                                [  OK  ]

The configuration of VMware Tools 8.3.7 build-341836 for Linux for this running
kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an X server session.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

/sbin/restorecon:  Warning no default label for /tmp/vmware-block-restore0/tmp_file

How to Install and Securing MySQL on CentOS 6.4 VPS

MySQLMySQL Database server is one of the most popular used database in the internet especially for content management and blogging site. It’s can stores and retrieves data for the blog, websites and applications. This post will describes how you can install and securing MySQL on CentOS 6.4 virtual private server (VPS) or dedicated MySQL database server. For more information on MySQL, you can visit their website at www.mysql.com.

1. Install MySQL Database Server using yum command :

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

Example :

[root@centos64 ~]# yum install mysql mysql-server -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.upsi.edu.my
 * epel: kartolo.sby.datautama.net.id
 * extras: mirror.upsi.edu.my
 * updates: mirror.upsi.edu.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.69-1.el6_4 will be installed
--> Processing Dependency: mysql-libs = 5.1.69-1.el6_4 for package: mysql-5.1.69-1.el6_4.x86_64
---> Package mysql-server.x86_64 0:5.1.69-1.el6_4 will be installed
--> Processing Dependency: perl-DBI for package: mysql-server-5.1.69-1.el6_4.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.69-1.el6_4.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.69-1.el6_4.x86_64
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.67-1.el6_3 will be updated
---> Package mysql-libs.x86_64 0:5.1.69-1.el6_4 will be an update
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                    Arch               Version                    Repository           Size
====================================================================================================
Installing:
 mysql                      x86_64             5.1.69-1.el6_4             updates             907 k
 mysql-server               x86_64             5.1.69-1.el6_4             updates             8.7 M
Installing for dependencies:
 perl-DBD-MySQL             x86_64             4.013-3.el6                base                134 k
 perl-DBI                   x86_64             1.609-4.el6                base                705 k
Updating for dependencies:
 mysql-libs                 x86_64             5.1.69-1.el6_4             updates             1.2 M

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

Total download size: 12 M
Downloading Packages:
(1/5): mysql-5.1.69-1.el6_4.x86_64.rpm                                       | 907 kB     00:07
(2/5): mysql-libs-5.1.69-1.el6_4.x86_64.rpm                                  | 1.2 MB     00:12
(3/5): mysql-server-5.1.69-1.el6_4.x86_64.rpm                                | 8.7 MB     01:30
(4/5): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm                                 | 134 kB     00:00
(5/5): perl-DBI-1.609-4.el6.x86_64.rpm                                       | 705 kB     00:06
----------------------------------------------------------------------------------------------------
Total                                                               101 kB/s |  12 MB     01:57
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : mysql-libs-5.1.69-1.el6_4.x86_64                                                 1/6
  Installing : perl-DBI-1.609-4.el6.x86_64                                                      2/6
  Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                                3/6
  Installing : mysql-5.1.69-1.el6_4.x86_64                                                      4/6
  Installing : mysql-server-5.1.69-1.el6_4.x86_64                                               5/6
  Cleanup    : mysql-libs-5.1.67-1.el6_3.x86_64                                                 6/6
  Verifying  : mysql-libs-5.1.69-1.el6_4.x86_64                                                 1/6
  Verifying  : perl-DBD-MySQL-4.013-3.el6.x86_64                                                2/6
  Verifying  : perl-DBI-1.609-4.el6.x86_64                                                      3/6
  Verifying  : mysql-server-5.1.69-1.el6_4.x86_64                                               4/6
  Verifying  : mysql-5.1.69-1.el6_4.x86_64                                                      5/6
  Verifying  : mysql-libs-5.1.67-1.el6_3.x86_64                                                 6/6

Installed:
  mysql.x86_64 0:5.1.69-1.el6_4                 mysql-server.x86_64 0:5.1.69-1.el6_4

Dependency Installed:
  perl-DBD-MySQL.x86_64 0:4.013-3.el6                 perl-DBI.x86_64 0:1.609-4.el6

Dependency Updated:
  mysql-libs.x86_64 0:5.1.69-1.el6_4

Complete!

2. Make mysqld daemon start at boot and start MySQL Database Server :

[root@centos64 ~]# chkconfig mysqld on
[root@centos64 ~]# service mysqld start
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h centos64.ehowstuff.local password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

3. Securing MySQL Database Server. This includes setting up the password for mysql root, remove anonymous users, disallow root login remotely and remove test database and access.

[root@centos64 ~]# /usr/bin/mysql_secure_installation




NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...



All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!


4. For testing, login to MySQL Server using defined password :

[root@centos64 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
+--------------------+
2 rows in set (0.01 sec)

mysql>

How to Fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

Issue :

When i try to install WordPress, I’ve encountered this error and returned the following warning on browser :

“Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

Solution :

The reason for this is your existing PHP does not support mysql or php-mysql extension does not installed. To overcome this issue, just install php mysql support using below command on your virtual private server (VPS) or your dedicated web server.
1. Install php with mysql extension :

yum install php-mysql -y

2. Restart httpd :

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

Example :

[root@centos64 html]# yum install php-mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.upsi.edu.my
 * epel: ftp.cuhk.edu.hk
 * extras: mirror.upsi.edu.my
 * updates: mirror.upsi.edu.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php-pdo(x86-64) for package: php-mysql-5.3.3-22.el6.x86_64
--> Running transaction check
---> Package php-pdo.x86_64 0:5.3.3-22.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                 Arch                 Version                      Repository          Size
====================================================================================================
Installing:
 php-mysql               x86_64               5.3.3-22.el6                 base                81 k
Installing for dependencies:
 php-pdo                 x86_64               5.3.3-22.el6                 base                75 k

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

Total download size: 155 k
Installed size: 383 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): php-mysql-5.3.3-22.el6.x86_64.rpm                                     |  81 kB     00:00
(2/2): php-pdo-5.3.3-22.el6.x86_64.rpm                                       |  75 kB     00:00
----------------------------------------------------------------------------------------------------
Total                                                               137 kB/s | 155 kB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-pdo-5.3.3-22.el6.x86_64                                                      1/2
  Installing : php-mysql-5.3.3-22.el6.x86_64                                                    2/2
  Verifying  : php-pdo-5.3.3-22.el6.x86_64                                                      1/2
  Verifying  : php-mysql-5.3.3-22.el6.x86_64                                                    2/2

Installed:
  php-mysql.x86_64 0:5.3.3-22.el6

Dependency Installed:
  php-pdo.x86_64 0:5.3.3-22.el6

Complete!

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

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

1. Prepare EPEL repository.

2. Install 389-ds file :

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

3. Enable SELINUX :

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

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

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

192.168.2.64    centos64.ehowstuff.local centos64

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

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

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

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

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

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

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

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

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

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

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

Would you like to continue? [no]: yes

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

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

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

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

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

Choose a setup type [2]:

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

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

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

    General.FullMachineName=your.hostname.domain.name

Computer name [centos64.ehowstuff.local]:

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

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

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

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

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

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

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

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

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

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

Administration Domain [ehowstuff.local]:

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

Directory server network port [389]:

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

Directory server identifier [centos64]:

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

Suffix [dc=ehowstuff, dc=local]:

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

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

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

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

Administration port [9830]:

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

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

6. Start dirsrv and dirsrv-admin service :

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

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

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

8. Check dirsrv and dirsrv-admin service status :

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

How to Use wget With Username and Password for FTP/HTTP Site on Linux

Twitter and LinuxGNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. Some of the website and most of ftp site on internet require username and password in order to access the pages. This post will describe how to use wget with basic authentication.The following example of wget commands should allow you to access pages on a website that requires a username and password:

wget http://username:myPassword@www.ehowstuff.local/example/file.txt
wget --http-user=username --http-password=myPassword http://www.ehowstuff.local/example/file.txt
wget --user=username --password='myPassword' ftp://www.ehowstuff.local/example/file.txt
wget -r --user=username --password='myPassword' ftp://www.ehowstuff.local/example/

How to Setup Persistent Static Routes on Linux CentOS 6.4

linuxStatic routing is a type of method of network routing. Static routing is not actually a routing protocol but it’s just a manual configuration on the network route. This usualy managed by network system administrator. In Linux, static route can be added and delete using “route” command. But the drawback is when linux server is rebooted, it will forget the static routes configuration. To avoid network interruption on the linux server, you can configure static route to take effect immediately without rebooting and also should apply after the next reboot. Static Routes that apply after next reboot is called Persistent Static Routes. To achieve this on CentOS 6.4, the following steps should be perform :

1. To make configuration take effect immediately, run the following command :

[root@centos62 ~]# route add -net <network> netmask <netmask> gw <gateway_ip> dev <interface>

Examples :

[root@centos64 ~]# route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0
[root@centos64 ~]# route add -net 172.13.1.0 netmask 255.255.0.0 gw 172.13.1.1 dev eth1

2. To apply the configuration on next reboot, configure the following in /etc/sysconfig/static-routes :

[root@centos62 ~]# vi /etc/sysconfig/static-routes

Add the followings :

any -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
any -net 172.13.1.0 netmask 255.255.0.0 gw 172.13.1.1

How to Configure EPEL Repository on CentOS 6.4 x86_64

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

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

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

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

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

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

How to Install wget, telnet, man Utility on CentOS 6.4

centos 6.3On minimal CentOS 6.4 installation, wget, man and telnet command utilities does not install automatically. Wget is a free network utility for linux to download files from the Web. 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. Telnet is a network protocol used on the Internet or local area networks. Telnet is a user command and an underlying TCP/IP protocol for accessing remote computers and very useful for troubleshooting and verify the opened ports. You will get the following warning when you use wget, man and telnet on minimal CentOS 6.4 installation.

[root@centos64 ~]# wget
-bash: wget: command not found
[root@centos64 ~]# man
-bash: man: command not found
[root@centos64 ~]# telnet
-bash: telnet: command not found

So here are the steps to install those three useful command utilities :

[root@centos64 ~]# yum install wget man telnet -y

Full installation :

[root@centos64 ~]# yum install wget man telnet -y
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * updates: mirrors.hostemo.com
base                                                                         | 3.7 kB     00:00
extras                                                                       | 3.5 kB     00:00
updates                                                                      | 3.5 kB     00:04
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package man.x86_64 0:1.6f-32.el6 will be installed
--> Processing Dependency: lzma for package: man-1.6f-32.el6.x86_64
---> Package telnet.x86_64 1:0.17-47.el6_3.1 will be installed
---> Package wget.x86_64 0:1.12-1.8.el6 will be installed
--> Running transaction check
---> Package xz-lzma-compat.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be installed
--> Processing Dependency: xz = 4.999.9-0.3.beta.20091007git.el6 for package: xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64
--> Running transaction check
---> Package xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch           Version                                   Repository    Size
====================================================================================================
Installing:
 man                    x86_64         1.6f-32.el6                               base         263 k
 telnet                 x86_64         1:0.17-47.el6_3.1                         base          58 k
 wget                   x86_64         1.12-1.8.el6                              base         482 k
Installing for dependencies:
 xz                     x86_64         4.999.9-0.3.beta.20091007git.el6          base         137 k
 xz-lzma-compat         x86_64         4.999.9-0.3.beta.20091007git.el6          base          16 k

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

Total download size: 955 k
Installed size: 2.8 M
Downloading Packages:
(1/5): man-1.6f-32.el6.x86_64.rpm                                            | 263 kB     00:05
(2/5): telnet-0.17-47.el6_3.1.x86_64.rpm                                     |  58 kB     00:00
(3/5): wget-1.12-1.8.el6.x86_64.rpm                                          | 482 kB     00:09
(4/5): xz-4.999.9-0.3.beta.20091007git.el6.x86_64.rpm                        | 137 kB     00:04
(5/5): xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64.rpm            |  16 kB     00:00
----------------------------------------------------------------------------------------------------
Total                                                                42 kB/s | 955 kB     00:22
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : xz-4.999.9-0.3.beta.20091007git.el6.x86_64                                       1/5
  Installing : xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64                           2/5
  Installing : man-1.6f-32.el6.x86_64                                                           3/5
  Installing : 1:telnet-0.17-47.el6_3.1.x86_64                                                  4/5
  Installing : wget-1.12-1.8.el6.x86_64                                                         5/5
  Verifying  : xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64                           1/5
  Verifying  : man-1.6f-32.el6.x86_64                                                           2/5
  Verifying  : xz-4.999.9-0.3.beta.20091007git.el6.x86_64                                       3/5
  Verifying  : wget-1.12-1.8.el6.x86_64                                                         4/5
  Verifying  : 1:telnet-0.17-47.el6_3.1.x86_64                                                  5/5

Installed:
  man.x86_64 0:1.6f-32.el6      telnet.x86_64 1:0.17-47.el6_3.1      wget.x86_64 0:1.12-1.8.el6

Dependency Installed:
  xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6
  xz-lzma-compat.x86_64 0:4.999.9-0.3.beta.20091007git.el6

Complete!

Securing and Hardening Linux Dedicated Server

securing linuxWhen we hosted the linux dedicated server or virtual private server(VPS) in a data center, security of the system is very important in order to ensure the data and the information are safe from the hackers. Securing and hardening linux dedicated server is mandatory when nearly every computing resources and the application systems is online and susceptible to attack. This post share basic security and hardening tips for the linux dedicated server. If you are plan to host your own linux dedicated server, then this post should able to provide you a good baseline and ideas. The following are the best practices to securing and hardening linux dedicated server :

1. Patching Linux Systems
2. Keep Linux Kernel and Software such as WordPress/Joomla Up to Date
3. Secure SSH
4. Enforcing Stronger Passwords and Password Aging
5. Disable Unnecessary Processes, Services and Daemons
6. Install a host based firewall to protect your dedicated server from unauthorized access
7. Implement Linux Kernel /etc/sysctl.conf hardening
8. Configure Logging and Auditing
9. Install And Use Intrusion Detection System