Archive

Archive for May, 2008

Post Install Apache2.x, ColdFusion 8

May 28th, 2008 rupert Comments off

After binding Apache2.x and ColdFusion 8, I find it very useful to follow the post-install instructions below:

1. Copying ColdFusion Admin directory to /wwwroot (webroot)

# ln -s /var/www /wwwroot
# cp -Rf /opt/coldfusion8/wwwroot/CFIDE /wwwroot/
# rm /wwwroot/index.html
# cd /wwwroot
# ln -s CFIDE cfide

2. Adding index.cfm to DirectoryIndex.

# vim /etc/apache2/mods-available/dir.conf
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm index.cfm

3. Restart apache

/etc/init.d/apache2 stop 
/etc/init.d/apache2 start

4. Browse Admin page for the first time

Categories: debian Tags: , ,

Installing Postgresql, Postgis, pgRouting on Debian

May 25th, 2008 rupert Comments off

Operating System: Debian sid

Versions:

  • postgres 8.3.1
  • postgis 1.3.3
  • pgRouting1.02

1. Install base system and ssh

#vi /etc/apt/sources.list to include
deb http://debian.cn99.com/debian etch main
deb-src http://debian.cn99.com/debian etch main
#apt-get update
#apt-get upgrade libc6

2. Install the required packages for postgres8.3 and postgis1.3.3

#apt-get install sudo nmap telnet
#apt-get install python2.5 python2.5-dev python-setuptools
#apt-get install g++
#apt-get install build-essential cmake ibboost-graph-dev
#apt-get install libreadline5 libreadline5-dev
#apt-get install zlib-bin zlib1g-dev
#apt-get install libkrb5-dev
#apt-get install libcurl3
#apt-get install libssl-dev
#apt-get install postgresql-8.3
#apt-get install postgresql-8.3-postgis
#apt-get install postgresql-server-dev-8.3

3. Installing pgRouting

# tar -zxvf pgRouting-1.02.tgz
# cmake .
# make 
# make install

Jpeg decoder problem on TileCache on MacOSX Leopard

May 12th, 2008 rupert Comments off

There is a problem with a “jpeg decoder” because Python Imaging Library (PIL) cannot find the jpeg libraries. Remember that we installed kyngchaos UnixIO libraries, therefore the PIL setup.py script should point to use those libraries.

Actually, I even installed the jpegsrc manually. I believe there is no need to do this, since UnixIO Image libraries is sufficient enough for PIL to install. What is important is to ensure that python tests succeeded. Once you get passed that, then installing PIL should work.

1. Extract Imaging-1.1.6.tar.gz
2. Edit setup.py to reflect:
JPEG_ROOT="/Library/Frameworks/UnixImageIO.framework/unix"
3. python setup.py build_ext -i
4. If no test fails, then go ahead and install
5. python setup.py install
Categories: tilecache Tags: , , ,

Migrating data from Postgres8.2 to Postgres8.3

May 7th, 2008 rupert Comments off

One of my hurdles recently is migrating data from my Debian Lenny Desktop Box (Postgres8.2.7/Postgis1.3.1) to my new MacBookPro Leopard(Postgres8.3.1/Postgis1.3.3). I found it out the hard way by inspecting the dump files manually. Here are the results:

1. I strongly suggest if you have a big dump file (mine is 500MB) to split the schema from the data.

pg_dump -C -s -h 127.0.0.1 -U lbs -W beijing > beijing_20080507_schema.sql
pg_dump -a -d -h 127.0.0.1 -U lbs -W beijing > beijing_20080507_schema.sql

2. pg_dump from an 8.2 would have statically linked liblwgeom to /usr/lib/postgresql/8.2/liblwgeom. You should change that to whereever your liblwgeom resides, mine is on /usr/local/pgsql/lib/liblwgeom. Just do a simple search and replace using vim on your file_schema.sql

3. After editing the schema, we can now restore the structure of the database. Check for errors and manually update the schema if needs be.

psql -h 127.0.0.1 -U beijing_4326 < beijing_20080507_schema.sql

4. Ok, so now we have the structure ready, we can also check this from pgAdmin3. Have a good look on the functions and table structures if they are fully restored.

5. Let’s load the data.

psql -h 127.0.0.1 -U beijing_4326 < beijing_20080507_data.sql
Categories: postgres Tags:

Installing Apache2.2 ColdFusion8 on Mac OS X Leopard

May 7th, 2008 rupert 1 comment

Ok so this post is a bit late as I saw it in my drafts, but better late than never. I did these even before I wrote the PostGres8.3/Postgis/pgRouting post.

1. Apache
reference: http://httpd.apache.org/

./configure –prefix=/usr/local/apache2 –with-m2m=prefork
make
sudo make install

- To start on boot, download apache2startup.tar.gz and extract to your /Library/StartupItems/

2. ColdFusion
- run the installer as you would normally do in any windows/linux installation. I would suggest you put your installation in /opt and not ~ (home) because Leopard might wipe it out when upgrading to a higher OS version.
- should automatically start on boot
- bind coldfusion to apache

- Just in case you need to start it on boot, download coldfusion8Startup.tar.gz

3. Installing mod_python on Apache
$ ./configure –with-apxs=/usr/local/apache2/bin/apxs
$ make
$ sudo make install

Categories: osx Tags: , , ,