FusionCloud – TechTalks + Tips and Tricks + Linux + etc

TechTalks + Tips and Tricks + Linux + etc


Tips and Tricks

Drupal Camp Manila 2013

Last Saturday February 16, 2013 Philippine Drupal Users Group presented Drupal Camp Manila 2013 to more or less 200 people held at Microsoft 6750 Ayala, Makati, Philippines. Students, Developers, Project managers and Business executives gathered around to hear and learn about Drupal. This year’s track was packed of advance topics from mapping to mobile development, from project management to development operations and of course the newly introduced session, the beginners session.

In the morning event we welcomed Mr Jim Ayson of Smart DevNet as he delivered his speech as keynote, he talked about Drupal to be used in his organization as a platform integrated with smart technology.

The place was very impressive, it was really designed for conferences like drupal camp, i’ve heard a lot of good feedbacks from the participants about the place,  its classy and if you look outside the window you will see a big part of the makati business district, the sky rocketing buildings and people walking around the area.

These are the breakout sessions in the morning event:

  • Ranel Padon [University of the Philippines]  - Web Mapping with Drupal
  • Andrew Kucharski [Promet Source]  - Project Management tools and organizations
  • Paul de Paula [NUAMS]  - Mobile development using Drupal and Titanium Appaccelerator
  • Andrew Kucharski [Promet Source]    - Thunder and Lightning: LoadStorm and Other Ways to Stress Out Your Drupal
  • Gerald Villorente [Kytes System/CNN]   - Drupal Security Hardening
  • Adolfo Nasol [Abtik Team]  - Creating Online Store with Drupal Commerce

For beginners session:

  • Intro to Drupal                 – Grace Porcal
  • Installation and Terms   – Nathan Cailo
  • Views Intro                      – Lexie of Promet Source

These are the breakout sessions in the afternoon event:

  • Sean Coleman [Kyte Systems]   -  Advance Drupal Commerce
  • Daniel Honrade [Theming Expert]   - 1 Minute Solution to Automate your Vimeo Inline Video Integratio
  • Paul de Paula [New Amsterdam Ideas]    -  Magic Begins with Context + Delta + Omega Theme
  • Gerald Villorente [Kyte Systems/CNN]    - Drupal Performance and Scaling
  • Andrew Kucharski [Promet Source]   - Opportunities to leapfrog content distribution while Mobilizing Your Site with Drupal
  • Marc Caballero [The Surfer Geek]   - How to contribute at
  • Paul de Paula [NUAMS]  -  Building a Drupal Distribution using Features + Drush Make + etc
  • Edison Tan [Microsoft Open Source Software Specialist]  -  Drupal on Windows Azure

For beginner’s sessions:

  • Context intro                                – John Ross
  • Html slicing                                  – Ericson Luciano
  • Intro to module development    – Nico Penaredondo
  • Drupal learning curve                – Nathaniel Cailo

I was impressed with the volunteers who talked about Drupal in the beginners sessions, its jampacked and the no. of people i saw in the morning was the same number when  it ended in the afternoon. I interviewed some of the participants who stayed and listened from the speakers and they said they learned a lot, and they cant wait to start building website.

Overall this years Drupal Camp was awesome, the topics was really trendy and interesting, the food was so delicious, It was the first time ever for a drupal camp manila to have such a nice lunch, from the spaghetti, fish pillet and etc., and the people were all friendly and you will see a lot of smiling faces probably because there are lots of companies announced that they are all hiring.

In behalf of the Philippine Drupal Users Group Philippines i would like to thank our sponsors who made this event a successful, to out Platinum Sponsors(Promet Source and Smart Devnet), Gold Sponsors(, Acquia), Silver Sponsors(Chochip Digital, Kite Systems, Globelabs), Community Sponsors(New Amsterdam Ideas, Hygen) and of course to our partners Microsoft and Mozilla Firefox.

“Learn from the drop” a drupal meetup in manila

Another successful drupal event took place last September 29, 2012 at Exist techbar, Ortigas, Manila. It was attended by mostly students and developers who wants to learn more in drupal. The event was organized by the Drupal Users Group(DUG) Manila led by strong willed lady Gem Devanadera.

The first speaker was Gerald Villorente from Kyte System/CNNGo talked about the fundamentals of Drupal, it was a great presentation and for sure a lot newbies learned a lot from it.

The second speaker was the art director of Kuy Digital, Oliver Kuy a drupal designer who loves theming and photoshop, He tackled the basic PSD to Drupal Theming, Oliver carefully discussed the process in
customizing drupal sites without much of coding.

One of the highlights of the event was a talk from our visitor who came all the way from chicago illinois, Mr. Young-jin Kim, of that specializes in CIVICCRM,  hes also an active Drupal organizer, a Drupal evangelist in Chicago. Young talked about “5 Reasons to use Drupal”. He also have shown us an infographics of the status of drupal in the US, and why the US Government trust Drupal.

Our last speaker was Albert Causing, he discussed about the OM Maximenu module developed by one of our members in DUG, Daniel Honrade.

The event was even more fun when participants joined the gangnam style dance, students from PUP shows no shyness when they rock on the dance floor.

This Drupal Meetup wont be possible without the support of the sponsors, In behalf of the Drupal Users Community we would like to extend our thanks to SmartDev Net, Exist, Mozilla Philippines, Globe Labs, New Amsterdam Ideas, DevCon and GeekGirls Philippines.

How to install CKAN on RHEL 6

As the CKAN documentation for Ubuntu explains, you can stand up an instance of Linux using VirtualBox, Amazon’s EC2 or through another method of your choosing. In our case, we used Amazon’s EC2. The process was identical to the standard instructions in the CKAN documentation for Ubuntu, except that we used an AMI for RHEL 6 instead of an AMI for Ubuntu to initialize the system. The AMI we used was named “RHEL-6.2-Starter-EBS-x86_64-4-Hourly2” (AMI ID ami-41d00528). This produced an Red Hat instance with a public address of

Log on to the server

ssh -i cmapkey.pem

Ensure the required packages are installed and update yum for latest updates on repositories

yum update

You will get a list of dependencies being resolved and packages to be installed, following by a prompt asking you to confirm that you want to download the packages. Enter “y”, and you’ll see a list of lines that begin “Updating” following by the package name, and then a list of lines that begin “Cleanup.” Finally, you’ll see the world “Complete:” followed by a command-line prompt.
  • Mercurial is a distributed revision control tool for software developers.
  • PostgreSQL is an object-relational database management system.
  • virtualenv is a tool to create isolated Python environments. It lets you create a new Python environment to run a Python app and install all package dependencies into the virtualenv without affecting your system’s site-packages.

yum install mercurial postgresql
easy_install pip
pip install virtualenv
yum install wget git-core subversion

The following packages are not supported by YUM and therefore have to be installed using RPM:

  1. python-dev
  2. libpq-dev
  3. libxml2-dev
  4. libxslt-dev
  5. openjdk-6-jdk
  6. solr-jetty

Install python-devel

Find a download of python-devel at and then:

rpm -ivh python-devel-2.6.6-29.el6.x86_64.rpm

Install postgresql 9.1

rpm -ivh pgdg-redhat91-9.1-5.noarch.rpm

Install libxml2 development version “libxml2-dev”

libxml2 is dependent upon zlib and zlib-devel.

rpm -ivh zlib-1.2.5-2.fu14.x86_64.rpm
rpm -Uvh zlib-1.2.5-2.fu14.x86_64.rpm

rpm -ivh zlib-devel-1.2.5-2.fu14.x86_64.rpm
rpm -Uvh zlib-devel-1.2.5-2.fu14.x86_64.rpm

rpm -ivh libxml2-devel-2.7.6-4.el6_2.4.x86_64.rpm
rpm -Uvh libxml2-devel-2.7.6-4.el6_2.4.x86_64.rpm

Install libxslt development version “libxslt-devel”

rpm -ivh libgpg-error-devel-1.7-4.el6.x86_64.rpm

rpm -ivh libgcrypt-devel-1.4.5-9.el6.x86_64.rpm

rpm -ivh libxslt-devel-1.1.26-2.el6.x86_64.rpm

Install virtual environment for python

virtualenv pyenv

Activate your virtual environment

To work with CKAN it is best to adjust your shell settings so that your shell uses the virtual environment you just created. (Note that the period and space at the beginning of the command are necessary.)

. pyenv/bin/activate

When the shell is activated you will see the prompt change to something like this:

(pyenv)[root@ip-10-190-46-61 ~]#

Install CKAN source code

Here is how to install the latest code (HEAD on the master branch):

pip install --ignore-installed -e git+

Install Additional Dependencies

CKAN has a set of dependencies it requires which you should install too. These are listed in three text files: requires/lucid_*.txt, followed by WebOb explicitly.

First we install two of the three lists of dependencies:

pip install --ignore-installed -r pyenv/src/ckan/requires/lucid_missing.txt -r pyenv/src/ckan/requires/lucid_conflict.txt
pip install webob==1.0.8

Install psycopg2 and pylons

  • Psycopg is the most popular PostgreSQL adapter for the Python programming language.
  • Pylons is a Web application framework written in Python.

yum install python-psycopg2
yum install python-pylons

Install cython for c compiler

  • Cython is a programming language to simplify writing C and C++ extension modules for the CPython Python runtime.

easy_install cython (This takes awhile.)

Install more required python modules

In the standard install instructions you would run: pip install --ignore-installed -r pyenv/src/ckan/requires/lucid_present.txt. However, it produces an error message on psycopg2, so instead we’ll install each package listed in lucid_present.txt manually (except for Psycopg and webob, which were already installed in the instructions above). Note that the the install of the lxml package may take a long time.

  • Babel is a collection of tools for internationalizing Python applications.
  • lxml is a Pythonic binding for the C libraries libxml2 and libxslt. It provides a library for processing XML and HTML in Python.
  • repoze.who is an identification and authentication framework for WSGI applications.

pip install babel==0.9.4
pip install lxml==2.2.4
pip install Pylons==0.9.7
pip install repoze.who==1.0.19
pip install tempita==0.4
pip install zope.interface==3.5.3
pip install repoze.who.plugins.openid==0.5.3
pip install repoze.who-friendlyform==1.0.8
pip install routes==1.11
pip install paste==1.7.2
pip install pastescript==1.7.3

At this point you need to deactivate and then re-activate your virtual environment to ensure that all the scripts point to the correct locations.


. pyenv/bin/activate

Set up a PostgreSQL database

Initialize and start Postgresql DB:

service postgresql initdb
service postgresql start

List existing databases:

sudo -u postgres psql -l

Create a user called ckanuser and enter “pass” for the password when prompted. (For actual production, you’ll want a more secure password).

sudo -u postgres createuser -S -D -R -P ckanuser

Now create the database (owned by ckanuser), which we’ll call ckantest:

sudo -u postgres createdb -O ckanuser ckantest

Install Postgresql development version

This will be used in setting up database using paster. Just execute the statement below.

yum install postgresql-devel

then find the pg_hba.conf and change “ident” to “trust”

find / -name pg_hba.conf
nano /var/lib/pgsql/data/pg_hba.conf

example lines in pga_hba.conf:

host all trust
host all trust

Disable firewall in Redhat

service iptables stop

Install and configure Solr

Installing Solr on Red Hat

Create a CKAN config file

cd ~/pyenv/src/ckan
paster make-config ckan development.ini

Modify the development.ini file, assigning the following values:

host = [DNS]
sqlalchemy.url = postgresql://ckanuser:pass@localhost/ckantest
ckan.simple_search = 1
(If Solr is installed, leave this line commented out.) ckan.site_url: [DNS]
ckan.site_id = [DNS]


host =
sqlalchemy.url = postgresql://ckanuser:pass@localhost/ckantest
ckan.simple_search = 1
ckan.site_id =

Enable the synchronous_search Plugin

New datasets added via the web UI won’t show up in search results or on the datasets page until you enable the synchronous search plugin in your CKAN config file (e.g. development.ini). Find the plugins line and set it to something like this:

ckan.plugins = stats synchronous_search

Create database tables

Now that you have a configuration file that has the correct settings for your database, you’ll need to create the tables. Make sure you are still in an activated environment with (pyenv) at the front of the command prompt and then from the pyenv/src/ckan directory run these commands:

service postgresql reload
pip install psycopg2
paster --plugin=ckan db init

(If your config file is called something other than development.ini then you need to specify it in the final command, e.g. paster --plugin=ckan db init

You will be prompted with this message if successful: “Initialising DB: SUCCESS.”

Create the cache and session directories

You need to create two directories for CKAN to put temporary files:

  • Pylon’s cache directory, specified by cache_dir in the config file.
  • Repoze.who’s OpenId session directory, specified by store_file_path in pyenv/src/ckan/who.ini

(from the pyenv/src/ckan directory or wherever your CKAN ini file you recently created is located):

mkdir data sstore

Link to who.ini

who.ini (the Repoze.who configuration) needs to be accessible in the same directory as your CKAN config file. So if your config file is not in pyenv/src/ckan, then cd to the directory with your config file and create a symbolic link to who.ini. e.g.:

ln -s pyenv/src/ckan/who.ini (this line is actually not necessary)

Test the CKAN webserver

(from the pyenv/src/ckan directory):

paster serve development.ini

If this runs successfully, you’ll see a message such as “serving on”.

browse CKAN Site at: localhost

Install console browser to be able to browse localhost or

Launch a separate ssh connection to the server. Then enter:

yum install w3m

To exit the browser, enter Command-z.

To quit serving the site, enter Command-c from the console browser where you ran paster serve development.ini.

Create an Admin User

By default, CKAN has a set of locked-down permissions. To begin working with it you need to set up a user and some permissions. First create an admin account from the command line (you must be root, sudo -s):

paster --plugin=ckan user add admin --config=development.ini

When prompted, enter a password. This is the password you will use to log in to CKAN. In the resulting output, note that you will also get assigned a CKAN API key.

This command is your first introduction to some important CKAN concepts. paster is the script used to run CKAN commands. std.ini is the CKAN config file. You can change options in this file to configure CKAN.

For exploratory purposes, you might was well make the admin user a sysadmin. You obviously wouldn’t give most users these rights as they would then be able to do anything. You can make the admin user a sysadmin like this:

paster --plugin=ckan sysadmin add admin --config=development.ini

Restart the server

paster serve development.ini

Then visit the site from your web brower at your server’s domain and port:


How to browse websites using w3m locally on ec2

When i was trying to install CKAN from source i encountered error on apachesolr, the only way i can test it out is to browse apachesolr admin site locally (, since im on ec2 and only accessing via ssh i cant browse it using firefox, chome. Good thing is that David from CKAN community introduced me to w3m a text based browser, it doesnt render visually but it does render the markups.

Heres step on setting it up:

sudo apt-get update

sudo apt-get install  w3m

w3m [options] [URL or filename]

w3m localhost:8090

There you have it.



How to upload/download recursively using only ftp

Im used to have access in all our servers with full access, with ssh root you can do anything on the server, permissions, ownership issues will be addressed easily without hassle. I had this experience in downloading/uploading files from remote servers using only ftp. It took me hours to finally solved it, ftp has a limitation it doesnt recursively download all sub directories, it does execute this line ftp> mput -r * , but what it only does is copying all files, it doesnt copy sub folders.

I found an application lftp, its a sophisticated http/ftp client, its a file transfer program and do what ftp cant do, especially ftp’ s recursive isses on subfolders.

# lftp ftp_host
> user username password
> mirror source target
(download entire directory tree)
> mirror -R source target
(reverse mirror; upload entire directory tree)

This will save you gazillions of hours if you are transffering files with subfolders using ftp only.



Create a free website or blog at

Up ↑