3

Connecting Postgresql 9.0 and phpPgAdmin-5.0.3 to cPanel in Centos 6

After installing PostgreSql 9.0, compile php and apache using WHM > Easyapache --with-pgsql option

For instructions on installing PostgreSQL 9.0 in Centos 6, click here

Download phpPgAdmin 5.0.3.tar.gz to this location:
/usr/local/cpanel/base/3rdparty

Extract the dowloaded file and rename the extracted phpPgAdmin-5.0.3 directed to phppgadmin.

Edit config.inc.php located in /usr/local/cpanel/base/3rdparty/phpPgAdmin/conf/config.inc.php

Find the line $conf['extra_login_security'] = true;

Set it to false.

Restart postgresql.
In WHM go to Restart Services > SQL Server (PgSQL)
Or in the console prompt type:
service postgresql-9.0 restart

I also restarted Apache
service httpd restart

At this point, the phpPgAdmin link shall be functional - but not the PostgreSQL link. If yo click it, cPanel will warn you that PostgreSQL is

offline.

PostgreSQL may be running but cPanel cannot find the data files.

Additional steps need to be done to connect Postgres to cPanel.

Edit pg_hba.conf located in /var/lib/pgsql/9.0/data
vi /var/lib/pgsql/9.0/data/pg_hba.conf
Find the following lines:
local all all md5
host all all 127.0.0.1 255.255.255.255 md5

Change md5 to trust, thus:
local all all md5
host all all 127.0.0.1 255.255.255.255 md5

This will be only temporary. In the succeeding steps "trust" shall be reverted to "m5" automatically.

Restart postgresql.

Go to SQL Services > Postgres Config

At this point, you are not ready yet to click the configuration buttons. If you do, WHM will warn that data directory could not be found.

Starting Postgresql version 9, postgresql installs files in different location and cPanel expects to find them in the old install locations.

So, we need to create symlinks from the new location to the old locations where cPanel expects to find the files.

Type the following in the console prompt (This has no equivalent in WHM):
ln -s /var/lib/pgsql/9.0/data /var/lib/pgsql
ln -s /var/lib/pgsql/9.0/backups /var/lib/pgsql

Then you can click the Install Config button and get a success confirmation message from WHM.

Re-enter the Postgres password and click Change Password.

Restart Postgresql.

If you check pg_hba.conf, you will find these llines again:
local all all md5
host all all 127.0.0.1 255.255.255.255 md5

Note that trust has been reverted to md5.

Now you can access Postgresql 9.0 databases from cPanel using the PostgreSQL Databases or the phpPgAdmin link.

5

Installing Drush v3 in Centos 6

Here are notes I gathered on steps that successfully installed Drush version 3 in my Centos 6.

Move to home dir
cd ~

Remove current drush (if existent)
rm -rf ~/.drush/

Create drush directory (and hide it)
mkdir ~/.drush/

Move to new dir
cd ~/.drush/

Get Drush v3
curl -C - -O -s http://ftp.drupal.org/files/projects/drush-All-versions-3.0.tar.gz

Extract Drush v3
tar -xf drush*.tar.gz

Bin Drush tar
rm -f drush-All*.tar.gz

Pear install console_table
cd drush/includes
curl -C - -O -s http://download.pear.php.net/package/Console_Table-1.1.3.tgz

Extract Pear
tar -xf Console_Table*.tgz

Copy the file
cp Console_Table-1.1.3/Table.php table.inc

rm -r Console_Table-1.1.3
rm -f Console_Table*.tgz

Make drush command executable
cd ~/.drush/
chmod u+x drush/drush

Alias drush and put in bash profile
echo "alias drush='~/.drush/drush/drush'" >> ~/.bash_profile

'Source' the .bash_profile file so updates are made
source ~/.bash_profile

Make sure that we alias drush just in case source does not work
alias drush='~/.drush/drush/drush'

You should see three OK(s) below if the steps below properly executed.

Update Drush using Drush
~/.drush/drush/drush dl drush

Update drush_make and provision in drush/commands
~/.drush/drush/drush dl drush_make
~/.drush/drush/drush dl provision

Move updated additions to correct directory
mv ~/.drush/provision ~/.drush/drush/commands/
mv ~/.drush/drush_make ~/.drush/drush/commands/

You are done and drush is ready to use.

1

How to connect Postgresql 9.0 to an existing Webmin

If you installed Postgresql 9.0 or upgraded Postgresql to the latest version in a Linux system that has an existing Webmin application, you need to update Webmin using Module configuration for Postgresql.

Postgresql 9.0 installs files in directories different from its earlier versions.'

Here is a checklist of what need to be changed using Webmin's module configuration:

Path to psql command: /usr/pgsql-9.0/bin/psql

Command to start PostgreSQL: if [ -r /etc/rc.d/init.d/rhdb ]; then /etc/rc.d/init.d/rhdb start; else /etc/rc.d/init.d/postgresql-9.0 start; fi

Command to stop PostgreSQL: if [ -r /etc/rc.d/init.d/rhdb ]; then /etc/rc.d/init.d/rhdb stop; else /etc/rc.d/init.d/postgresql-9.0 stop; fi

Command to initialize PostgreSQL: if [ -r /etc/rc.d/init.d/rhdb ]; then /etc/rc.d/init.d/rhdb start; else /etc/rc.d/init.d/postgresql-9.0 initdb ; /etc/rc.d/init.d/postgresql-9.0 start; fi

Path to postmaster PID file: /var/run/postmaster-9.0.pid

Paths to host access config file: /var/lib/pgsql/9.0/data/pg_hba.conf

Default backup repository directory: /var/lib/pgsql/9.0/backups

Restart Webmin.

A fresh installation of Webmin however, automatically recognizes an existing Postgresql 9.0 and adjusts the Postgres paths in the initial module configuration, so the steps listed above are no longer necessary.

1

Installing Postgresql 9.0 in Centos 6

Installing Postgresql 9.0 in Centos 6 is done in few easy steps.

First, download the Postgresql 9.0 RPM package:
wget http://yum.pgrpms.org/9.0/redhat/rhel-6-x86_64/pgdg-centos90-9.0-5.noarch.rpm

Install the package:
rpm -i pgdg-centos90-9.0-5.noarch.rpm

To avoid conflict with older postgresql packages existing in the Centos distribution, you must tell yum to exclude these in the installation. You must edit the CentOS-Base.repo file:
vi /etc/yum.repos.d/CentOS-Base.repo

Add this line at the [base] section:
exclude=postgresql*

Verify that the new package is active:
yum list

Then yum install postgres:
yum install postgresql90 postgresql90-devel postgresql90-server postgresql90-libs

Initialize postgresql:
service postgresql-9.0 initdb

Then start postgresql:
service postgresql-9.0 start

You are done with the installation.

The configuration that I you still need to do is to is edit the postgresql.conf file located in /var/lib/pgsql/9.0/data/ Be sure to add this line in the config:
listen_addresses = '*'

To enable remote access, I added this to the pg_hba.conf located in the same directory:
host all all 110.93.88.91 255.255.255.255 md5

1

Today is the death anniversary of Nikola Tesla

Nikola who? If you don't know him, can't blame you. But I am glad he is alive in Facebook with over 200,000 fans--- way below Michael Jackson's 10 million but much ahead that of his nemesis, Thomas Alba Edison who has just over 900. Nikola Tesla deserves more.

Ostracized and persecuted in his time because of an obsessive-compulsive behavior (a little understood disorder in his time), Tesla is now regarded as the "mad scientist" who invented the 20th century and probably beyond. Electricity that powers our homes and appliances ---and, yes, computers---is a result of Tesla's works on Alternating Current (AC). Maybe partly because of OBC, Tesla was so obsessed with "free energy for all" that he refused to impose royalties out of his AC patents. He could have been the richest man in his time and, who knows, a Tesla-AC royalty fee would still be an unwelcome burden in our electric bills.

Whereas we still hear of Westinghouse, General Electric, huge companies that benefited from his AC technology; Tesla died in 1943 at the age of 86, impoverished, leaving unfinished projects behind. Pure science ruled Tesla's life, unmindful of his finances. He should have been resting today in a tomb made of diamonds, which he deserves, but did not want to. There lies the greatness of the man.

I am not into fan pages but I take exception---way of saying "Thank you, Nikola Tesla." And we have not talked about the Principle of Resonance yet! ---another mind-boggling concept that will forever be equated with his name.

5

Address Verifier, a Data Quality Software from Anchor

Talking of Data Quality Software, I recently came across an interesting product that has huge future usability to me and other application developers. And what better way to keep track of it for easy reference than to blog about it?

The product is Address Verifier by Anchor Computer Software. It is a callable Application Programming Interface (API) that may be easily integrated to an application that requires address verification. The API uses the USPS ZIP+4® database and instantly verifies or corrects addresses. Applications that rely on accurate customer addresses like call center, batch processing or any web application are prospective beneficiaries of this API. Address Verifier provides the complete address of a target customer as soon you enter the zip code, house number and few characters of the street name.

To use the API, a developer needs to do some coding. This will not be a tough job because Anchor Software provides comprehensive documentation and installation instructions---in addition to Anchor's Live Support. Anchor customers also receive the latest version of the system and applications that uses the API get the latest monthly updates to the USPS ZIP+4® database.

54

Free Domain Name and More at No-IP

Looking for a free domain name? I use No-IP Free for my blogger blogs to make my url neat, shorter and prettier---and it is for free!

Using No-IP Free is simple. Go to no-ip.com, sign up and wait for your e-mail confirmation. After you receive your login credentials by e-mail, go to No-IP website, login using the account you have created and you will be guided at every step. Choose Add Host and Web Redirect options. Enter a hostname of you choice, e.g. avgweb, and in the dropdown list select a Free No-IP Domain, e.g. no-ip.org. You must also enter the url of the website that you like to redirect, e.g. http://www.blogger-templates-avg.blogspot.com. You may now click the Create Host button. Allow for five minutes lead time, then you can type your new hostname in the navigation text of youw web browser and your website opens. In this example, I now use http://avgweb.no-ip.org as the new neat url of my website.

To prevent the old long url from appearing in the navigation bar, you can also use the Mask/Cloaking option. Click the Mask checkbox and type a Page Title. Optionally, you can enter meta keywords and meta description for SEO purposes. After you successfully setup the Mask/Cloaking option, only your new short url appears in the navigation bar.

No-IP Free is the entry level service of No-IP and it is for personal use only. If you expect huge website traffic or if you intend to redirect a commercial website, you may upgrade to No-IP Enhanced or No-IP Plus, which offers managed DNS, all accessible from your personalized web interface.

As a DNS provider, No-IP gives more value for your mnoey. Whereas its competitors only offers two nameservers, No-IP offers five, all on distinct networks. This guarantees more uptime and protects your website from disastrous DNS outages. Using the DDNS service of No-IP, you can run your server on dynamic DNS. You save on fees from static IP addresses or web hosting. Using No-IP's ddns, you can also easily access your home or office computer from a remote site. You can also redirect your port 80, which is sometimes disabled by Internet Service providers.

You may also register a domain name directly with No-IP. You may then manage your domains using your personalized My No-IP page. A wide range of e-mail services also comes with your domain registration.

My No-IP Free urls give me no problem, and I know it is a window to the quality of all other more advanced services offered by No-IP