How to Cancel a Recurring Payment, Subscription, or Automatic Billing Agreement on PayPal

Paypal recurring payments allow seller to automatically billed the payments and renew the subscription when is come to expiry date. There is a alternate way to cancel a recurring payment, subscription, or automatic billing agreement with a merchant.

1. Login to your Paypal Account.
2. Click Profile.
3. My preapproved payments.
4. Select merchant and Click Cancel.
5. When prompted with the Cancel Confirmation dialog box, click Yes.
6. Finish.

How to Configure LDAP Authentication for Nagios on CentOS 5.5

This article assume that you already installed the nagios server on LAMP CentOS server and also installed 389 directory server. On the previous tutorial, the user that allowed to manage nagios is nagiosadmin which has been created using htpasswd. In this article, i will show you on how configure LDAP authentication for Nagios on CentOS 5.5.

Prerequisites
How to Install Apache Httpd Web Server on Linuxrel=”nofollow”
How to Install 389 Directory Server on CentOS/RHEL

1. Configure nagios.conf and change it to your LDAP environment. Assume the following info is valid on LDAP server:

    Server ip = 192.168.2.5
    Suffix = dc=intranet, dc=local
    LDAP user : user1 ( most of the time, this user is sytem administrator)
    
    [root@server ~]# vi /etc/httpd/conf.d/nagios.conf
    
    ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
    
    <Directory "/usr/lib/nagios/cgi">
       Options ExecCGI
       AllowOverride None
       Order allow,deny
       Allow from all
       AuthBasicProvider ldap
       AuthType Basic
       AuthzLDAPAuthoritative on
       AuthName " LDAP Authentication for Nagios Monitoring"
       AuthLDAPURL "ldap://192.168.2.5:389/DC=intranet,DC=local?uid?sub?(objectClass=*)" NONE
       Require user
    </Directory>
    
    Alias /nagios "/usr/share/nagios"
    
    <Directory "/usr/share/nagios">
       Options None
       AllowOverride None
       Order allow,deny
       Allow from all
       AuthBasicProvider ldap
       AuthType Basic
       AuthzLDAPAuthoritative on
       AuthName " LDAP Authentication for Nagios Monitoring"
       AuthLDAPURL "ldap://192.168.2.5:389/DC=intranet,DC=local?uid?sub?(objectClass=*)" NONE
       Require user
    </Directory>
    

2. Replace all of the “nagiosadmin” entries with “*” in /etc/nagios/cgi.cfg. This is to prevent the error message in CGI authentication.

    It appears as though you do not have permission to view information for any of the hosts you requested...
    
    If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
    and check the authorization options in your CGI configuration file.
    
    
    [root@server ~]# grep "nagiosadmin" /etc/nagios/cgi.cfg | grep -v "#"
    
    authorized_for_system_information=nagiosadmin
    authorized_for_configuration_information=nagiosadmin
    authorized_for_system_commands=nagiosadmin
    authorized_for_all_services=nagiosadmin
    authorized_for_all_hosts=nagiosadmin
    authorized_for_all_service_commands=nagiosadmin
    authorized_for_all_host_commands=nagiosadmin
    
    [root@server ~]# vi /etc/httpd/conf.d/nagios.conf
    

Replace nagiosadmin to * as below:

    authorized_for_system_information=*
    authorized_for_configuration_information=*
    authorized_for_system_commands=*
    authorized_for_all_services=*
    authorized_for_all_hosts=*
    authorized_for_all_service_commands=*
    authorized_for_all_host_commands=*
    
    [root@server ~]# grep "*" /etc/nagios/cgi.cfg | grep -v "#"
    authorized_for_system_information=*
    authorized_for_configuration_information=*
    authorized_for_system_commands=*
    authorized_for_all_services=*
    authorized_for_all_hosts=*
    authorized_for_all_service_commands=*
    authorized_for_all_host_commands=*
    

3. Restart the nagios service

    [root@server ~]# /etc/init.d/nagios restart
    Stopping nagios:                                           [  OK  ]
    Starting nagios:                                           [  OK  ]
    

4. Restart apache server

    [root@server ~]# /etc/init.d/httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]
    

How to Install Nagios on CentOS 5.5

Nagios is a popular open source system and network monitoring software application. It monitor hosts and services and then alerting users when something wrong has been triggered. It is the powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes. Below is the steps to install Nagios on CentOS 5.5 server. This tutorial assume that you already installed LAMP (Linux CentOS, Apache, Mysql and PHP) server.

Prerequisites
How to Install Apache Httpd Web Server on Linux
Install or updates the prerequisites. Make sure that all of these packages already installed and properly configured.

    [root@server ~]# yum -y --enablerepo=rpmforge install httpd php gcc glibc glibc-common gd gd-devel
    

Steps :
1. Download and install the rpmforge repository.

For x86 (32-bit) systems

    [root@server ~]# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    

For x64 (64-bit) systems

    [root@server ~]# rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
    

2. Install Nagios and Plugins using yum command

    [root@server ~]# yum -y --enablerepo=rpmforge install nagios nagios-plugins nagios-plugins-setuid
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * addons: centos.maulvi.net
    * base: centos.maulvi.net
    * epel: ftp.cuhk.edu.hk
    * extras: centos.maulvi.net
    * rpmforge: fr2.rpmfind.net
    * updates: mirror.yourconnect.com
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package nagios.i386 0:3.2.3-3.el5.rf set to be updated
    ---> Package nagios-plugins.i386 0:1.4.15-2.el5.rf set to be updated
    --> Processing Dependency: fping for package: nagios-plugins
    --> Processing Dependency: perl(Net::SNMP) for package: nagios-plugins
    ---> Package nagios-plugins-setuid.i386 0:1.4.15-2.el5.rf set to be updated
    --> Running transaction check
    ---> Package fping.i386 0:2.4b2-7.el5 set to be updated
    ---> Package perl-Net-SNMP.noarch 0:5.2.0-1.2.el5.rf set to be updated
    --> Processing Dependency: perl(Crypt::DES) for package: perl-Net-SNMP
    --> Running transaction check
    ---> Package perl-Crypt-DES.i386 0:2.05-3.2.el5.rf set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================
    Package                    Arch        Version                  Repository     Size
    =====================================================================================
    Installing:
    nagios                     i386        3.2.3-3.el5.rf           rpmforge      3.7 M
    nagios-plugins             i386        1.4.15-2.el5.rf          rpmforge      1.6 M
    nagios-plugins-setuid      i386        1.4.15-2.el5.rf          rpmforge      122 k
    Installing for dependencies:
    fping                      i386        2.4b2-7.el5              epel           30 k
    perl-Crypt-DES             i386        2.05-3.2.el5.rf          rpmforge       37 k
    perl-Net-SNMP              noarch      5.2.0-1.2.el5.rf         rpmforge       96 k
    
    Transaction Summary
    =====================================================================================
    Install       6 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 5.6 M
    Downloading Packages:
    (1/6): fping-2.4b2-7.el5.i386.rpm                             |  30 kB     00:02
    (2/6): perl-Crypt-DES-2.05-3.2.el5.rf.i386.rpm                |  37 kB     00:00
    (3/6): perl-Net-SNMP-5.2.0-1.2.el5.rf.noarch.rpm              |  96 kB     00:02
    (4/6): nagios-plugins-setuid-1.4.15-2.el5.rf.i386.rpm         | 122 kB     00:03
    (5/6): nagios-plugins-1.4.15-2.el5.rf.i386.rpm                | 1.6 MB     00:28
    (6/6): nagios-3.2.3-3.el5.rf.i386.rpm                         | 3.7 MB     01:07
    -------------------------------------------------------------------------------------
    Total                                                 53 kB/s | 5.6 MB     01:48
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Installing     : fping                                                         1/6
    Installing     : perl-Crypt-DES                                                2/6
    Installing     : nagios-plugins-setuid                                         3/6
    Installing     : nagios                                                        4/6
    Installing     : perl-Net-SNMP                                                 5/6
    Installing     : nagios-plugins                                                6/6
    
    Installed:
    nagios.i386 0:3.2.3-3.el5.rf                 nagios-plugins.i386 0:1.4.15-2.el5.rf
    nagios-plugins-setuid.i386 0:1.4.15-2.el5.rf
    
    Dependency Installed:
    fping.i386 0:2.4b2-7.el5                   perl-Crypt-DES.i386 0:2.05-3.2.el5.rf
    perl-Net-SNMP.noarch 0:5.2.0-1.2.el5.rf
    
    Complete!
    

3. Create the default Nagios user and set a password using htpasswd:

    [root@server ~]# htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
    New password:
    Re-type new password:
    Adding password for user nagiosadmin
    

4. Verify default config files using below command :

    [root@server ~]# nagios -v /etc/nagios/nagios.cfg
    
    Nagios Core 3.2.3
    Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
    Copyright (c) 1999-2009 Ethan Galstad
    Last Modified: 10-03-2010
    License: GPL
    
    Website: http://www.nagios.org
    Reading configuration data...
    Read main config file okay...
    Processing object config file '/etc/nagios/objects/commands.cfg'...
    Processing object config file '/etc/nagios/objects/contacts.cfg'...
    Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
    Processing object config file '/etc/nagios/objects/templates.cfg'...
    Processing object config file '/etc/nagios/objects/localhost.cfg'...
    Read object config files okay...
    
    Running pre-flight check on configuration data...
    
    Checking services...
    Checked 8 services.
    Checking hosts...
    Checked 1 hosts.
    Checking host groups...
    Checked 1 host groups.
    Checking service groups...
    Checked 0 service groups.
    Checking contacts...
    Checked 1 contacts.
    Checking contact groups...
    Checked 1 contact groups.
    Checking service escalations...
    Checked 0 service escalations.
    Checking service dependencies...
    Checked 0 service dependencies.
    Checking host escalations...
    Checked 0 host escalations.
    Checking host dependencies...
    Checked 0 host dependencies.
    Checking commands...
    Checked 24 commands.
    Checking time periods...
    Checked 5 time periods.
    Checking for circular paths between hosts...
    Checking for circular host and service dependencies...
    Checking global event handlers...
    Checking obsessive compulsive processor commands...
    Checking misc settings...
    
    Total Warnings: 0
    Total Errors:   0
    
    Things look okay - No serious problems were detected during the pre-flight check
    

5. Configure nagiso service to start at boot

    [root@server ~]# chkconfig nagios on
    

6. Start the nagios service

    [root@server ~]# /etc/init.d/nagios start
    nagios is stopped
    Starting nagios:                                           [  OK  ]
    

7. Restart apache server

    [root@server ~]# /etc/init.d/httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]
    

8. To login, navigate your browser to http://servername/nagios

How to Install WordPress Blog on CentOS 5.5

WordPress is an open source blog tool and publishing platform powered by PHP and MySQL. It can be install on Windows server or Linux server. It is the famous Content Management System (CMS) and it has many features including the plug-in that can make your blog look modern and powerful.Below are the simple steps to install the wordpress blog on CentOS server. This tutorial assume that you already installed LAMP ( Linux, Apache, Mysql and PHP) server.

1.Go t your web server root directory.

    [root@server ~]# cd /var/www
    

2. Download the latest wordpress using wget command:

    [root@server www]# wget http://wordpress.org/latest.tar.gz
    

3.  Extract the compressed archives with below command:

    [root@server www]# tar xzvf latest.tar.gz
    

4. The extracted file name will be wordpress. Rename it to anything you want. Normally we put it blog since your url will be like this:
http://servername/blog

    root@server www]# cp wordpress blog
    

5. Create the Database and database user:

    mysql> CREATE DATABASE blogdb;
    Query OK, 1 row affected (0.00 sec)
    
    mysql> CREATE USER 'bloguser'@'localhost' IDENTIFIED BY 'blogpassword';
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> GRANT ALL PRIVILEGES ON blogdb.* to bloguser@localhost;
    Query OK, 0 rows affected (0.00 sec)
    

6. Navigate the browser to http://servername/blog

There doesn’t seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn’t work for all server setups. The safest way is to manually create the file.

Click “Create a Configuration File”

7. You will be redirect to WordPress > Setup Configuration File:

Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.

  • Database name = any_db (User define as  step 5)
  • Database username = any_user (User define as step 5)
  • Database password = any_password (User define as step 5)
  • Database host = localhost (if apache and mysql on the same server)
  • Table prefix (if you want to run more than one WordPress in a single database)

Click Let’s Go! to proceed

8. Fill in below form and Click Submit

  • Database name = blogdb
  • Database username = bloguser
  • Database password = blogpassword
  • Database host = localhost
  • Table prefix = wp_

You will be redirect to this page. Please leave the page and proceed below steps.

Sorry, but I can’t write the wp-config.php file.
You can create the wp-config.php manually and paste the following text into it.

9. Go to your web server terminal or ssh to web server. Copy and rename wp-config-sample.php to wp-config.php:

    [root@server ~]# cp /var/www/blog/wp-config-sample.php /var/www/blog/wp-config.php
    

10. Modify the wp-config.php:

    root@server ~]# vi /var/www/blog/wp-config.php
    

Change below line to above:

    /** The name of the database for WordPress = Line 19 */
    define('DB_NAME', 'database_name_here');
    
    /** MySQL database username = Line 22 */
    define('DB_USER', 'username_here');
    
    /** MySQL database password = Line 25 */
    define('DB_PASSWORD', 'password_here');
    
    /** MySQL hostname = Line 28 */
    define('DB_HOST', 'localhost');
    

Save the wp-config.php file and exit from web server

11. Continue to this URL:
http://servername/blog/wp-admin/setup-config.php?step=2

Click “Run the install”

12. Please complete the form Click “Install WordPress”

  • Site Title : Blog Title
  • Username : Prefered username
  • Password, twice : Your password
  • Your E-mail : Your Email

13. To login Navigate the browser to http://servername/blog/wp-login.php

How to Submit Website to Search Engines for Free

Does your blog or website indexed by google? If your blog doesn’t indexed, you need to submit your site to Google manually.  For your information, every country have different google search engine. For example Indonesia, their google search engine is google.co.id, meanwhile malaysia  is google.com.my. In this post, i want to share with you on how to submit website of blog to different countries of google search engines. The steps is very easy and hopefully can help to increase the traffic of your website or blog.

1. Go to this URL : Free URL Submit to 120+ Search Engines
2. Enter your blog’s or website’s URL
3. Enter your “Email address”
4. Click “Check All”
5. Click ” Submit my site”

How to Install Cacti on CentOS 5.5

Cacti is a complete network graphing solution that usefull for network administrator to monitor their network bandwidth. It is very easy to use and have the following features:

  • Graphs
  • Data Sources
  • Data Gathering
  • Graph Display
  • User Management

In this tutorial, i will guide you on how to install Cacti on CentOS 5.5 server. This tutorial assume that you already installed LAMP (Linux CentOS, Apache, Mysql and PHP) server.

How to Prepare Other Yum Repositories For RHEL/CentOS 5

1. Download and install the rpmforge repository.

For x86 (32-bit) systems

    [root@server ~]# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    

For x64 (64-bit) systems

    [root@server ~]# rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
    

2. Install Cacti and dependencies with below command:

    [root@server ~]# yum -y --enablerepo=rpmforge install cacti mysql-server mysql php-common php-mysql net-snmp net-snmp-utils php-snmp liberation-fonts
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * addons: centos.maulvi.net
    * base: centos.maulvi.net
    * epel: ftp.cuhk.edu.hk
    * extras: centos.maulvi.net
    * rpmforge: fr2.rpmfind.net
    * updates: mirror.yourconnect.com
    Setting up Install Process
    Package matching php-mysql-5.1.6-27.el5_5.3.i386 already installed. Checking for update.
    Package liberation-fonts-1.0-1.el5.noarch already installed and latest version
    Resolving Dependencies
    --> Running transaction check
    ---> Package cacti.noarch 0:0.8.7g-2.el5.rf set to be updated
    --> Processing Dependency: rrdtool for package: cacti
    ---> Package mysql.i386 0:5.0.77-4.el5_5.5 set to be updated
    ---> Package mysql-server.i386 0:5.0.77-4.el5_5.5 set to be updated
    ---> Package net-snmp.i386 1:5.3.2.2-9.el5_5.1 set to be updated
    --> Processing Dependency: net-snmp-libs = 1:5.3.2.2-9.el5_5.1 for package: net-snmp
    ---> Package net-snmp-utils.i386 1:5.3.2.2-9.el5_5.1 set to be updated
    ---> Package php-common.i386 0:5.1.6-27.el5_5.3 set to be updated
    ---> Package php-snmp.i386 0:5.1.6-27.el5_5.3 set to be updated
    --> Running transaction check
    ---> Package net-snmp-libs.i386 1:5.3.2.2-9.el5_5.1 set to be updated
    ---> Package rrdtool.i386 0:1.4.4-1.el5.rf set to be updated
    --> Processing Dependency: ruby for package: rrdtool
    --> Processing Dependency: lua for package: rrdtool
    --> Processing Dependency: xorg-x11-fonts-Type1 for package: rrdtool
    --> Processing Dependency: perl(RRDs) for package: rrdtool
    --> Processing Dependency: perl(RRDp) for package: rrdtool
    --> Processing Dependency: libdbi.so.0 for package: rrdtool
    --> Running transaction check
    ---> Package libdbi.i386 0:0.8.1-2.1 set to be updated
    ---> Package lua.i386 0:5.1.4-4.el5 set to be updated
    ---> Package perl-rrdtool.i386 0:1.4.4-1.el5.rf set to be updated
    ---> Package ruby.i386 0:1.8.5-5.el5_4.8 set to be updated
    --> Processing Dependency: ruby-libs = 1.8.5-5.el5_4.8 for package: ruby
    --> Processing Dependency: libruby.so.1.8 for package: ruby
    ---> Package xorg-x11-fonts-Type1.noarch 0:7.1-2.1.el5 set to be updated
    --> Processing Dependency: chkfontpath for package: xorg-x11-fonts-Type1
    --> Running transaction check
    ---> Package chkfontpath.i386 0:1.10.1-1.1 set to be updated
    --> Processing Dependency: xfs for package: chkfontpath
    ---> Package ruby-libs.i386 0:1.8.5-5.el5_4.8 set to be updated
    --> Running transaction check
    ---> Package xorg-x11-xfs.i386 1:1.0.2-5.el5_6.1 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================
    Package                   Arch        Version                   Repository     Size
    =====================================================================================
    Installing:
    cacti                     noarch      0.8.7g-2.el5.rf           rpmforge      2.2 M
    net-snmp                  i386        1:5.3.2.2-9.el5_5.1       base          697 k
    net-snmp-utils            i386        1:5.3.2.2-9.el5_5.1       base          186 k
    php-common                i386        5.1.6-27.el5_5.3          base          153 k
    php-snmp                  i386        5.1.6-27.el5_5.3          base           30 k
    Updating:
    mysql                     i386        5.0.77-4.el5_5.5          updates       4.8 M
    mysql-server              i386        5.0.77-4.el5_5.5          updates       9.8 M
    Installing for dependencies:
    chkfontpath               i386        1.10.1-1.1                base           15 k
    libdbi                    i386        0.8.1-2.1                 base           35 k
    lua                       i386        5.1.4-4.el5               epel          228 k
    perl-rrdtool              i386        1.4.4-1.el5.rf            rpmforge       52 k
    rrdtool                   i386        1.4.4-1.el5.rf            rpmforge      895 k
    ruby                      i386        1.8.5-5.el5_4.8           base          274 k
    ruby-libs                 i386        1.8.5-5.el5_4.8           base          1.6 M
    xorg-x11-fonts-Type1      noarch      7.1-2.1.el5               base          1.5 M
    xorg-x11-xfs              i386        1:1.0.2-5.el5_6.1         updates        69 k
    Updating for dependencies:
    net-snmp-libs             i386        1:5.3.2.2-9.el5_5.1       base          1.3 M
    
    Transaction Summary
    =====================================================================================
    Install      14 Package(s)
    Upgrade       3 Package(s)
    
    Total download size: 24 M
    Downloading Packages:
    (1/17): chkfontpath-1.10.1-1.1.i386.rpm                       |  15 kB     00:00
    (2/17): php-snmp-5.1.6-27.el5_5.3.i386.rpm                    |  30 kB     00:01
    (3/17): libdbi-0.8.1-2.1.i386.rpm                             |  35 kB     00:01
    (4/17): perl-rrdtool-1.4.4-1.el5.rf.i386.rpm                  |  52 kB     00:02
    (5/17): xorg-x11-xfs-1.0.2-5.el5_6.1.i386.rpm                 |  69 kB     00:02
    (6/17): php-common-5.1.6-27.el5_5.3.i386.rpm                  | 153 kB     00:12
    (7/17): net-snmp-utils-5.3.2.2-9.el5_5.1.i386.rpm             | 186 kB     00:12
    (8/17): lua-5.1.4-4.el5.i386.rpm                              | 228 kB     00:20
    (9/17): ruby-1.8.5-5.el5_4.8.i386.rpm                         | 274 kB     00:10
    (10/17): net-snmp-5.3.2.2-9.el5_5.1.i386.rpm                  | 697 kB     00:25
    (11/17): rrdtool-1.4.4-1.el5.rf.i386.rpm                      | 895 kB     01:03
    (12/17): net-snmp-libs-5.3.2.2-9.el5_5.1.i386.rpm             | 1.3 MB     01:11
    (13/17): xorg-x11-fonts-Type1-7.1-2.1.el5.noarch.rpm          | 1.5 MB     01:38
    (14/17): ruby-libs-1.8.5-5.el5_4.8.i386.rpm                   | 1.6 MB     01:43
    (15/17): cacti-0.8.7g-2.el5.rf.noarch.rpm                     | 2.2 MB     02:23
    (16/17): mysql-5.0.77-4.el5_5.5.i386.rpm                      | 4.8 MB     03:32
    (17/17): mysql-server-5.0.77-4.el5_5.5.i386.rpm               | 9.8 MB     07:06
    -------------------------------------------------------------------------------------
    Total                                                 19 kB/s |  24 MB     21:11
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Updating       : net-snmp-libs                                                1/20
    Updating       : mysql                                                        2/20
    Installing     : net-snmp                                                     3/20
    Installing     : net-snmp-utils                                               4/20
    Installing     : libdbi                                                       5/20
    Installing     : php-common                                                   6/20
    Installing     : php-snmp                                                     7/20
    Installing     : ruby-libs                                                    8/20
    Installing     : ruby                                                         9/20
    Installing     : lua                                                         10/20
    Updating       : mysql-server                                                11/20
    Installing     : chkfontpath                                                 12/20
    Installing     : xorg-x11-xfs                                                13/20
    Installing     : xorg-x11-fonts-Type1                                        14/20
    Installing     : rrdtool                                                     15/20
    Installing     : cacti                                                       16/20
    Installing     : perl-rrdtool                                                17/20
    Cleanup        : mysql-server                                                18/20
    Cleanup        : mysql                                                       19/20
    Cleanup        : net-snmp-libs                                               20/20
    
    Installed:
    cacti.noarch 0:0.8.7g-2.el5.rf              net-snmp.i386 1:5.3.2.2-9.el5_5.1
    net-snmp-utils.i386 1:5.3.2.2-9.el5_5.1     php-common.i386 0:5.1.6-27.el5_5.3
    php-snmp.i386 0:5.1.6-27.el5_5.3
    
    Dependency Installed:
    chkfontpath.i386 0:1.10.1-1.1          libdbi.i386 0:0.8.1-2.1
    lua.i386 0:5.1.4-4.el5                 perl-rrdtool.i386 0:1.4.4-1.el5.rf
    rrdtool.i386 0:1.4.4-1.el5.rf          ruby.i386 0:1.8.5-5.el5_4.8
    ruby-libs.i386 0:1.8.5-5.el5_4.8       xorg-x11-fonts-Type1.noarch 0:7.1-2.1.el5
    xorg-x11-xfs.i386 1:1.0.2-5.el5_6.1
    
    Updated:
    mysql.i386 0:5.0.77-4.el5_5.5         mysql-server.i386 0:5.0.77-4.el5_5.5
    
    Dependency Updated:
    net-snmp-libs.i386 1:5.3.2.2-9.el5_5.1
    
    Complete!
    

3. Create the database, user for cacti:

    mysql> CREATE DATABASE cactidb;
    Query OK, 1 row affected (0.00 sec)
    
    mysql> CREATE USER 'cactiuser'@'localhost' IDENTIFIED BY 'cactipassword';
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> GRANT ALL PRIVILEGES ON cactidb.* to cactiuser@localhost;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> SHOW GRANTS FOR 'cactiuser'@'localhost';
    +-----------------------------------------------------------------------------------------+
    | Grants for cactiuser@localhost                                                          |
    +-----------------------------------------------------------------------------------------+
    | GRANT USAGE ON *.* TO 'cactiuser'@'localhost' IDENTIFIED BY PASSWORD '368d8a955a5a0bad' |
    | GRANT ALL PRIVILEGES ON `cactidb`.* TO 'cactiuser'@'localhost'                          |
    +-----------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
    

4. Populate the cacti database (Note: You will use the password you created for cactiuser here)

    [root@server ~]# /usr/bin/mysql cactidb -u cactiuser -p < /var/www/cacti/cacti.sql
    Enter password:
    
    [root@server ~]# vi /var/www/cacti/include/config.php
    

5. Please make sure these values reflect your actual database/host/user/password:

    $database_type = "mysql";
    $database_default = "cactidb";
    $database_hostname = "localhost";
    $database_username = "cactiuser";
    $database_password = "cactipassword"; $database_port = "3306";
    

6. Setting up the crontab:

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

7. Configure cacti.conf as below:

    [root@server ~]# vi /etc/httpd/conf.d/cacti.conf
    
    Alias /cacti/ /var/www/cacti/
    <Directory /var/www/cacti/>
    DirectoryIndex index.php
    Options -Indexes
    AllowOverride all
    order deny,allow
    allow from all
    AddType application/x-httpd-php .php
    php_flag magic_quotes_gpc on
    php_flag track_vars on
    </Directory>
    

8. Restart Apache to take effect on the changes:

    [root@server ~]# /etc/init.d/httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]
    [root@server ~]#
    

9. Navigate your browser to http://servername/cacti

10. Login to your new Cacti installation from http://servername/cacti/ with default user (admin) and the default password (admin).

How to Install Awstats on CentOS 5.5

In this tutorial i will guide you on how to install AWStats in CentOS server. AWStats is a free powerful tool that generates advanced websites statistics, graphically. This tutorial assumes that you have root access for CentOS with Apache server has been installed with domain www.my.local properly configured.

Steps :

1. Download and install the rpmforge repository.

For x86 (32-bit) systems

    [root@server ~]# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    

For x64 (64-bit) systems

    [root@server ~]# rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
    

2. Install AWStats with yum command:

    [root@server ~]# yum --enablerepo=rpmforge install awstats -y
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * addons: centos.maulvi.net
     * base: centos.maulvi.net
     * epel: ftp.cuhk.edu.hk
     * extras: centos.maulvi.net
     * rpmforge: fr2.rpmfind.net
     * updates: mirror.yourconnect.com
    addons                                                        |  951 B     00:00
    base                                                          | 1.1 kB     00:00
    epel                                                          | 3.7 kB     00:00
    extras                                                        | 2.1 kB     00:00
    rpmforge                                                      | 1.1 kB     00:00
    updates                                                       | 1.9 kB     00:00
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package awstats.noarch 0:7.0-2.el5.rf set to be updated
    --> Processing Dependency: perl(Geo::IP) for package: awstats
    --> Running transaction check
    ---> Package perl-Geo-IP.i386 0:1.38-1.el5.rf set to be updated
    --> Processing Dependency: libGeoIP.so.1 for package: perl-Geo-IP
    --> Running transaction check
    ---> Package geoip.i386 0:1.4.6-1.el5.rf set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================
     Package             Arch           Version                   Repository        Size
    =====================================================================================
    Installing:
     awstats             noarch         7.0-2.el5.rf              rpmforge         1.2 M
    Installing for dependencies:
     geoip               i386           1.4.6-1.el5.rf            rpmforge         782 k
     perl-Geo-IP         i386           1.38-1.el5.rf             rpmforge         118 k
    
    Transaction Summary
    =====================================================================================
    Install       3 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 2.1 M
    Downloading Packages:
    (1/3): perl-Geo-IP-1.38-1.el5.rf.i386.rpm                     | 118 kB     00:01
    (2/3): geoip-1.4.6-1.el5.rf.i386.rpm                          | 782 kB     00:13
    (3/3): awstats-7.0-2.el5.rf.noarch.rpm                        | 1.2 MB     00:23
    -------------------------------------------------------------------------------------
    Total                                                 52 kB/s | 2.1 MB     00:41
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : geoip                                                         1/3
      Installing     : perl-Geo-IP                                                   2/3
      Installing     : awstats                                                       3/3
    
    Installed:
      awstats.noarch 0:7.0-2.el5.rf
    
    Dependency Installed:
      geoip.i386 0:1.4.6-1.el5.rf            perl-Geo-IP.i386 0:1.38-1.el5.rf
    
    Complete!
    

3. Modify AWStats Apache Configuration

    [root@server ~]# vi /etc/httpd/conf.d/awstats.conf
    
    Alias /awstats/icon/ /var/www/awstats/icon/
    
    ScriptAlias /awstats/ /var/www/awstats/
    <Directory /var/www/awstats/>
        DirectoryIndex awstats.pl
        Options ExecCGI
        order deny,allow
        allow from all
    </Directory>
    

4. Rename config file localhost.localdomain.conf to www.my.local.conf

    [root@server ~]# mv /etc/awstats/awstats.localhost.localdomain.conf /etc/awstats/awstats.www.my.local.conf
    

5. Modify “SiteDomain” on Line 153 as below

    SiteDomain="www.my.local"
    

6. Modify “HostAliases” on Line 168 as below

    HostAliases="localhost 127.0.0.1 REGEX[my\.local$] REGEX[^10\.0\.0\.]"
    

7. Update Statistics

    [root@server ~]# /usr/bin/awstats_updateall.pl now -confdir="/etc" -awstatsprog="/var/www/awstats/awstats.pl"
    
    [root@server ~]# /usr/bin/awstats_updateall.pl now -confdir="/etc" -awstatsprog="/var/www/awstats/awstats.pl"
    Running '"/var/www/awstats/awstats.pl" -update -config=www.my.local -configdir="/etc/awstats"' to update config www.my.local
    Create/Update database for config "/etc/awstats/awstats.www.my.local.conf" by AWStats version 7.0 (build 1.971)
    From data in log file "/var/log/httpd/access_log"...
    Phase 1 : First bypass old records, searching new record...
    Searching new records from beginning of log file...
    Jumped lines in file: 0
    Parsed lines in file: 0
     Found 0 dropped records,
     Found 0 comments,
     Found 0 blank records,
     Found 0 corrupted records,
     Found 0 old records,
     Found 0 new qualified records.
    

8. Restart the apache service

    [root@server ~]# /etc/init.d/httpd start
    

8. Verify Install

    http://CentOS_server/awstats/awstats.pl?config=www.my.local
    

How to Install and Configure Squid Proxy Server in CentOS 5.5

In this post, i will guide you on how to install and configure squid proxy server with basic configuration. Squid proxy server and make web browzing fast as it reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Please follow below steps to configure your squid proxy server.

    [root@server ~]# yum -y install squid
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * addons: centos.ipserverone.com
     * base: centos.ipserverone.com
     * epel: mirror01.idc.hinet.net
     * extras: centos.ipserverone.com
     * updates: centos.ipserverone.com
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package squid.i386 7:2.6.STABLE21-6.el5 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================
     Package         Arch           Version                         Repository      Size
    =====================================================================================
    Installing:
     squid           i386           7:2.6.STABLE21-6.el5            base           1.3 M
    
    Transaction Summary
    =====================================================================================
    Install       1 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 1.3 M
    Downloading Packages:
    squid-2.6.STABLE21-6.el5.i386.rpm                             | 1.3 MB     00:24
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : squid                                                         1/1
    
    Installed:
      squid.i386 7:2.6.STABLE21-6.el5
    
    Complete!
    

1. Configure main squid configuration file. Use vi to edit.

    [root@server ~]# vi /etc/squid/squid.conf
    

2. The defaults port is TCP 3128. However you can change it to 9090 or 8080.
# Change Line 919 as below:

    http_port 8080
    

3. Add list of internal IP networks from where browsing should be allowed. In this example the ip network segment named intranet_local.
# add below on Line 590 ( allow only intranet_local)

    acl intranet_local src 192.168.2.0/24
    

# add below on Line 637

    http_access allow intranet_local
    
    4. Configure auto start at boot for squid service and start squid server: 

    [root@server ~]# chkconfig squid on
    [root@server ~]# /etc/init.d/squid start
    Starting squid: .                                          [  OK  ]
    

5. Configure your client browser with proxy server ip address with port 8080.
6. Test from client using this URL

How to Block a Caller on an Android Phone

On this article, i will guide you on how to block a callers on android phone. This steps might be useful in condition that you want to block unwanted calls immediately instead of you manually reject the call. Please follow these simple steps to block a caller from making any call to your phone. This article assume that you are using HTC sense as an example. Please note that the steps might be different on other manufacturer such as Samsung and Sony ericson. But the basic should be almost similar. There are two options steps that you can follow:

Option 1 Steps:
1. On All Apps menu, click Blocked callers
2. Click Add caller
3. You can select from people ( which on your phone book) or just add the caller number (if you remembered the number)
4. If you select from people, click save to finish
5. If you add the caller number, click ok to finish

Option 2 Steps:
1. On All Apps menu, click Search people
2. Select the caller that you want to block
3. On the Block caller, change Off to On
4. Click ok to finish

This ‘Blocked Callers’ feature can be disabled as below:
1. On All Apps menu, click Blocked callers
2. Select the caller that you want to unblock
3. On the Block caller, change On to Off
4. Click ok to finish

How to Reset Gmail Password

One of the most important tip to keep your password safe is periodically change your password. But most of the peoples or internet surfers never change their email password. In this article, i will guide you on how to change your current gmail password. Please note that below steps also will change and take effect on other google accounts such blogger.com, webmaster tools, google talk and google feedburner account and google adsense(if registered).

Follow these simple steps :

1. Sign in to your gmail using current password
2. Click On Setting
3. By default, it will bring you to general tab. Click Account and Import tab
4. On Change account settings, Click Change password
5. It will bring you to My Account page that will enable to to change current password to new password.
6. Enter Current password
7. Enter New password
8. Confirm New password and click save

How to Convert Web Pages Into Printable PDFs

In this page, i will guide you the simple steps on how to convert web pages into PDF. In internet explorer or Firefox, you can print the web pages but the alignment and quality totally unsatisfied. Sometimes it can waste your paper and if the page is too wide, most printers will cut the page at an awkward point, which loses important text, often in the middle of a word. There are several ways to convert web pages into PDF.  My most recommended to do this is  iWeb2Print.

The steps is very simple.

1. Visi iWeb2Print
2. Paste the URL in the entry box.
3. Click convert.

How to Install Webmin in Centos 5.5 Using Yum

On the previous article about webmin, i have guided you on how to install webmin in CentOS 5.5 using rpm. Meanwhile, in this article, i will guide you on how to install Webmin in centos using yum command that much more simple and can get you the latest version of webmin. Please follow the steps below to proceed.

1. Login to your CentOS server with root privileges.

2. To install and update Webmin via RPM through yum, you have to create webmin.repo on /etc/yum.repos.d directory as below:

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

Contain of webmin.repo

    [Webmin]
    name=Webmin Distribution Neutral
    #baseurl=http://download.webmin.com/download/yum
    mirrorlist=http://download.webmin.com/download/yum/mirrorlist
    enabled=1
    

3. Install the dependencies using yum command.

    [root@server ~]# yum -y install perl-Net-SSLeay
    

4. Install with yum command :

    [root@server ~]# yum install webmin
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * Webmin: webmin.mirror.somersettechsolutions.co.uk
     * addons: centos.maulvi.net
     * base: centos.maulvi.net
     * extras: centos.maulvi.net
     * updates: centos.ipserverone.com
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package webmin.noarch 0:1.540-1 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================
     Package            Arch               Version              Repository          Size
    =====================================================================================
    Installing:
     webmin             noarch             1.540-1              Webmin              16 M
    
    Transaction Summary
    =====================================================================================
    Install       1 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 16 M
    Is this ok [y/N]: y
    Downloading Packages:
    webmin-1.540-1.noarch.rpm                                     |  16 MB     07:05
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Operating system is CentOS Linux
      Installing     : webmin                                                        1/1
    Webmin install complete. You can now login to https://server.intranet.local:10000/
    as root with your root password.
    
    Installed:
      webmin.noarch 0:1.540-1
    
    Complete!