Skip to main content

Posts

Showing posts from December, 2009

Postgresql cluster on Ubuntu

When having two versions of PostgreSQL on the same machine, need to use --cluster option for all psql command - psql, createuser, createdb, dropdb etc. The format is:- psql --cluster version/cluster $ pg_lsclusters Version Cluster Port Status Owner Data directory Log file 8.3 main 5432 online postgres /var/lib/postgresql/8.3/main /var/log/postgresql/postgresql-8.3-main.log 8.4 main 5433 online postgres /var/lib/postgresql/8.4/main /var/log/postgresql/postgresql-8.4-main.log $ psql --cluster 8.4/main mydb

dnsmasq for local virtual network

Setting up local virtual network with VirtualBox. The setup:- Main Host eth0/bridged mode listen on 192.168.1.200. Connected to the real local LAN. eth1 listen on 10.0.0.1 - dnsmasq dhcp listen here. Sub internal host app2 - eth0/internal network 10.0.0.2 db - eth0/internal network 10.0.0.3 /etc/dnsmasq.conf setup so that the dhcp assigned the IP address from /etc/hosts for any matching hostname. dhcp-host=app2,db But the client still getting the lease in dhcp-range rather than the one set in /etc/hosts. Turn out we need to set "send host-name app2;" in /etc/dhcp3/dhclient.conf because dhclient does not send the hostname by default when acquiring the lease.

Makefile notes

On changing directory in Makefile:- Each command in a makefile is executed in its own shell. To execute three subcommands in the same shell, write them all as a single command. For instance, if your shell uses ';' as a subcommand separator, you might write http://www.mail-archive.com/help-make@gnu.org/msg07671.html

Drupal Install Profile

Collecting resources on Drupal install profile:- Fix some conceptual problems with install profiles and make them actually usable Some of the Hot Sauce Behind Open Atrium: Installation Profiles + Features Reason on why './profiles' stay at the same level as './site' and not under './sites/*/profiles':- Search for profiles in site folders An attempt to use module as an alternative to install profile:- Simpler Alternative to Install Profile