Tuesday, January 23, 2007

Catatan Pada php.ini

Berikut ini adalah sedikit catatan pada php.ini yang saya peroleh ketika mencoba menyiapkan sebuah http daemon.

1. Ketika akan menggunakan tanda pembuka code buka kurung lancip '<' dan tanda tanya '?' alih-alih buka kurung lancip '<' dan tanda tanya '?' dan php [*ternyata blogspot tidak membolehkan tag pada input posting :) ], pastikan untuk membuka variabel short_open_tag
.
.
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
.
.
; Allow the tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
short_open_tag = On
.
.

2. Ketika menggunakan variabel global, pastikan untuk membuka variabel register_long_arrays dan register_arc_arv agar anda dapat memakai variabel array gaya lama (misal $HTTP_*_VARS dll
.
.
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
.
.
; Whether or not to register the EGPCS variables as global variables. You may
; want to turn this off if you don't want to clutter your scripts' global scope
; with user data. This makes most sense when coupled with track_vars - in which
; case you can access all of the GPC variables through the $HTTP_*_VARS[],
; variables.
;
; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = On

; Whether or not to register the old-style input arrays, HTTP_GET_VARS
; and friends. If you're not using them, it's recommended to turn them off,
; for performance reasons.
register_long_arrays = On

; This directive tells PHP whether to declare the argv&argc variables (that
; would contain the GET information). If you don't use these variables, you
; should turn it off for increased performance.
register_argc_argv = On
.
.

3. Untuk server yang digunakan untuk pengembangan sistem sebaiknya semua error message dibuka agar diketahui semua kesalahan yang mungkin terjadi
.
.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

.
.
error_reporting = E_ALL

; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On
.
.
; Disable the inclusion of HTML tags in error messages.
; Note: Never use this feature for production boxes.
html_errors = On
.
.

4. Jika ingin menggunakan ASP, maka variabel asp_tags harus dibuka terlebih dahulu
.
.
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
.
.
; Allow ASP-style <% %> tags.
asp_tags = Off
.
.

5. Pastikan untuk me-restart http daemon agar perubahan yang telah dilakukan terhadap php.ini bisa dieksekusi.

Monday, January 22, 2007

Log Instalasi PDFLib-Lite

Posting ini merupakan rangkaian log instalasi terakhir, yaitu menginstal pdflib-lite.
Untuk lebih jelasnya silahkan membaca posting-posting sebelumnya.

Untuk menginstal pdflib-lite diperlukan dua file, yaitu:
> PDFlib-Lite : http://www.pdflib.com/en/products/pdflib-family/pdflib-6/pdflib-lite/
> pecl-php pdflib : http://pecl.php.net/package/pdflib

1. Ekstrak PDFlib-lite
[root@localhost package_install_frsource]# tar -xzvf PDFlib-Lite-6.0.3.tar.tar


2. Konfigurasi PDFlib-Lite dengan sebelumnya masuk ke folder PDFlib-Lite
[root@localhost package_install_frsource]# cd PDFlib-Lite-6.0.3
[root@localhost PDFlib-Lite-6.0.3]# ./configure --prefix=/usr/local
checking whether g++ accepts -g... yes
checking whether the previously found C++ compiler works... yes
configure: creating ./config.status
config.status: creating config/mkcommon.inc
config.status: creating pdflib-config
config.status: executing default commands
_____________________________________________________________
For your convenience, here's a summary of configure's results:

Support for shared libraries: yes
C++ language binding for PDFlib: yes
Java language binding for PDFlib: yes
Perl language binding for PDFlib: yes
Python language binding for PDFlib: yes
Ruby language binding for PDFlib: no
Tcl language binding for PDFlib: no
PDF import library (PDI): no
Large file support: yes
Note: if you purchase the additional PDF import library (PDI)
you can also manipulate existing PDF documents with PDFlib.
The additional block feature can be used to personalize PDF.
See http://www.pdflib.com for details.

Please observe the licensing terms for commercial PDFlib usage.
PDFlib license agreement and purchase order can be found in the doc directory.

[root@localhost PDFlib-Lite-6.0.3]#

3. Compiling
[root@localhost PDFlib-Lite-6.0.3]# make
.
.
make[1]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/bind'
make[1]: Entering directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/progs'
make[2]: Entering directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/progs/pdflib'
../../libtool --silent --mode=link gcc -static -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -g -O2 -D__NO_CTYPE -DPDC_PF_LINUX_IA32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPDF_PLATFORM=\""Linux"\" -I../../libs/pdflib -o pdfimpose pdfimpose.c getopt.c ../../libs/pdflib/libs_libpdf.la -lm
../../libtool --silent --mode=link gcc -static -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -g -O2 -D__NO_CTYPE -DPDC_PF_LINUX_IA32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPDF_PLATFORM=\""Linux"\" -I../../libs/pdflib -o pdfimage pdfimage.c getopt.c ../../libs/pdflib/libs_libpdf.la -lm
../../libtool --silent --mode=link gcc -static -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -g -O2 -D__NO_CTYPE -DPDC_PF_LINUX_IA32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPDF_PLATFORM=\""Linux"\" -I../../libs/pdflib -o text2pdf text2pdf.c getopt.c ../../libs/pdflib/libs_libpdf.la -lm
make[2]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/progs/pdflib'
make[1]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/progs'
[root@localhost PDFlib-Lite-6.0.3]#

4. Installing
[root@localhost PDFlib-Lite-6.0.3]# make install
.
.
ake[3]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/bind/pdflib/java'
make[3]: Entering directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/bind/pdflib/perl'
../../../libtool --silent --mode=install \
../../../config/install-sh -c -m 644 pdflib_pl.la /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
../../../config/install-sh -c -m 644 pdflib_pl.pm /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
make[3]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/bind/pdflib/perl'
make[3]: Entering directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/bind/pdflib/python'
make[3]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/bind/pdflib/python'
make[2]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/bind/pdflib'
make[1]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/bind'
make[1]: Entering directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/progs'
make[2]: Entering directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/progs/pdflib'
mkdir -p /usr/local/bin
../../config/install-sh -c pdfimage text2pdf /usr/local/bin
make[2]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/progs/pdflib'
make[1]: Leaving directory `/usr/local/package_install_frsource/PDFlib-Lite-6.0.3/progs'
mkdir -p /usr/local/bin
./config/install-sh -c pdflib-config /usr/local/bin
[root@localhost PDFlib-Lite-6.0.3]#

5. Instal pecl pdflib menggunakan pear, dan masukkan /usr/local/ (sesuai dengan konfigurasi pada langkah2)
[root@localhost PDFlib-Lite-6.0.3]# pear install pecl/pdflib
-bash: pear: command not found
[root@localhost PDFlib-Lite-6.0.3]# /usr/local/apache2/php/bin/pe
pear peardev pecl
[root@localhost PDFlib-Lite-6.0.3]# /usr/local/apache2/php/bin/pear install pdflib-2\[1\].1.2.tgz
.
.

651038 4 drwxr-xr-x 3 root root 4096 Dec 30 18:21 /var/tmp/pear-build-root/install-pdflib-2.1.2/usr/local/apache2/php/lib/php/extensions
651039 4 drwxr-xr-x 2 root root 4096 Dec 30 18:21 /var/tmp/pear-build-root/install-pdflib-2.1.2/usr/local/apache2/php/lib/php/extensions/no-debug-non-zts-20060613
651031 264 -rwxr-xr-x 1 root root 264370 Dec 30 18:21 /var/tmp/pear-build-root/install-pdflib-2.1.2/usr/local/apache2/php/lib/php/extensions/no-debug-non-zts-20060613/pdf.so

Build process completed successfully
Installing '/var/tmp/pear-build-root/install-pdflib-2.1.2//usr/local/apache2/php/lib/php/extensions/no-debug-non-zts-20060613/pdf.so'
install ok: channel://pear.php.net/pdflib-2.1.2

6. Edit php.ini dan tambahkan baris yang berhuruf miring (sesuai dengan hasil langkah 5) pada bagian Dynamic Extensions
[root@localhost PDFlib-Lite-6.0.3]# vi /usr/local/apache2/php/php.ini
.
.
extension=/usr/local/apache2/php/lib/php/extensions/no-debug-non-zts-20060613/pdf.so
.
.

7. Untuk testing-nya Copy file contoh Hello world untuk php5 (php yang diinstal sebelumnya adalah php5) dari http://id2.php.net/manual/en/ref.pdf.php. Letakkan di /usr/local/apache2/htdocs/. Kemudian panggil melalui browser

Monitor Frequency Over Range

Kejadiannya ketika saya mencoba install fedora, pada monitor muncul pesan seperti dari bios yang menyebutkan "frequency over range" dan setelah itu tidak ada tampilan pada monitor walaupun pc running normal. Setelah banyak bertanya, ternyata hal ini terjadi karena frequency yang kita setting pada saat instalasi bisa jadi melebihi kapasitas monitor. Atau bisa saja karena kemungkinan video card bentrok dengan monitor.

Berikut adalah langkah-langkah troubleshootingnya:
1. Gunakan monitor lain dan reboot pc (monitor keluaran sekarang seharusnya memiliki frequency yang cukup tinggi).

2. Login ke fedora dan ganti resolusi ke yang paling rendah (640x480) dan refresh rate menjadi 60 atau 50
(*di fedora5 : System > Preference > Screen Resolution

3. Reboot pc menggunakan monitor yang over range.

Jika ketiga langkah tersebut tetap tidak berhasil
1. Gunakan monitor lain dan reboot pc

2. Login ke fedora dan edit file xorg.conf yang berada di /etc/X11/, ganti driver dengan 'vesa' seperti baris yang berhuruf miring
[@localhost]#cd /etc/X11/
[@localhost]#vi xorg.conf
.
.
#sekitar line 84
Section "Device"
Identifier "Videocard0"
Driver "vesa"
VendorName "Videocard vendor"
BoardName "ATI Technologies Inc ES1000"
EndSection
.
.
:wq

3. reboot pc menggunakan monitor yang over range

Menambah Path Directory di Windows XP

Path Directory adalah jika kita akan menjalankan sebuah program aplikasi maka Windows akan otomatis mencari di Path Directory yang ada dalam daftar Path Directories, jika program tersebut ditemukan Windows akan mengeksekusi program tersebut. Sehingga kita tidak perlu masuk ke dalam path directory dimana program itu berada. Kita tinggal memanggilnya melalui command prompt.

Berikut adalah langkah-langkah untuk menambahkan Path Directory :
1. Start > My Computer (Click Kanan) > Properties

2. System Properties > Advanced > Environment Variables

3. Environment Variables > System Variables > Pilih Path > Klik Edit

4. Tambahkan Path Directory anda.
Misalkan : c:\j2sdk1.4.2_01\bin (*note pisahkan dengan path sebelumnya menggunakan semikolon ";" ).

Dengan cara ini, saya bisa menjalankan aplikasi yang terdapat dalam C:\j2sdk1.4.2_01\bin tanpa harus berada dalam folder tersebut.
Misalnya seperti yang di bawah ini:

C:\>java -version
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)

C:\>

(*note. java adalah aplikasi yang ada dalam folder C:\j2sdk1.4.2_01\bin)

Sunday, January 21, 2007

Aloha

Saya mendengar kata ini digunakan dalam bidang jarigan komputer pada salah satu kursus singkat yang diberikan oleh Mr Otto Spaniol (Prof. Dr. yang mengajar di RWTH Aachen). Walau mungkin sebelumnya pernah diberikan pada masa-masa kuliah. Tapi saya 'mendengar' pertama kalinya pada saat itu. Dijelaskan oleh beliau dengan lugas dan sederhana. Mungkin karena beliau juga ikut berperan serta dalam pengembangan Aloha sehingga penjelasanya mudah dimengerti.

Aloha adalah protokol yang digunakan pada komunikasi satelit. Dikembangkan di University of Hawai. Prinsipnya sangat sederhana, transmiter akan mengirimkan data setiap ada frame untuk dikirim. Jika frame tersebut berhasil dikirim, frame berikutnya akan di kirimkan. Jika gagal, frame tersebut akan dikirim lagi setelah waktu acak.

Kekurangan pada Aloha versi pertama adalah karena semua stasiun menggunakan frekuensi yang sama dan tidak terkoordinas maka kemungkinan 'data collision' cukup sering terjadi sehingga menyebabkan banyak pengulangan pengiriman. Slotted Aloha adalah pengembangan dari Pure Aloha (Aloha versi pertama) yang menggunakan slot waktu untuk mengurangi 'data collision' dimana stasiun-stasiunnya harus disinkronisasi terlebih dahulu.

Database Server PostgreSQL

Berbeda dengan review sebelumnya, saya sangat puas sekali setelah membaca buku panduan PostgreSQL yang dikarang oleh Dr Richardus Eko Indrajit dan Andhie Lala Adam.

Betapa tidak, penjelasan yang diberikan sangat runut sehingga mudah untuk dimengerti. Mulai dari proses instalasi sampai penggunaan sedemikian rupa sehingga pembaca dengan gampang mengikuti. Contoh-contoh yang diberikan juga sangat membantu untuk memahami maksud penulis.

Membaca buku ini seperti mendayung sekali dua tiga pulau terlampaui. Selain kita belajar mengenai postgresql, kita juga belajar mengenai ORDBMS (Object Relational Database Management System) dan sedikit belajar administrasi linux (pada penjelasan instalasi PostgreSQL pada sistem linux).

Buku ini saya rekomendasikan bagi siapa saja tidak saja yang ingin belajar menggunakan PostgreSQL, tapi juga bagi yang ingin belajar mengenai database dan administrasinya.

Harga: gratis pinjam dari kantor

Membuat Homepage Interaktif dengan CGI/PERL

Ketika membeli judul buku karangan Gregorius Agung ini, yang ada di bayangan saya, adalah sebuah buku yang berisi tips dan trik untuk membuat web page yang interaktif menggunakan CGI/PERL. Harapan saya adalah saya akan mendapati banyak penjelasan mengenai CGI.

Setelah membacanya, terus terang saya kecewa. Saya tidak menemukan tips dan trik baru. Banyak penjelasan dalam buku ini yang sepetinya setengah-setengah. Pembaca hanya diberi link-link untuk mendownload program yang dibutuhkan. Tapi tidak ada penjelasan yang cukup tentang cara penggunaannya. Penjelasan mengenai CGI dan PERL juga sangat kurang untuk memenuhi judul yang dibawa buku ini. Yang saya dapatkan adalah bagaimana membuat sebuah form dan mengetesnya menggunakan server cgi yang disediakan ncsa menggunakan HTML. Selain itu penggunaan istalah java dan javascript yang menurut saya membingungkan. Sebagaimana diketahui bahwa javascript bukanlah java begitu pula sebaliknya.

Walaupun begitu, bab yang membahas mengenai Internet dan HTML saya nilai cukuplah untuk pemula yang belum mengetahui HTML. Sisanya, seperti yang saya sebutkan sebelumnya, sangat tidak sesuai dengan apa yang dicantumkan di cover belakang (level ketrampilan sampai dengan tingkat mahir dicentang).

Harga : Rp. 2500,- acara diskon Gramedia

Tulalit

Assalamualaikum Wr Wb,

Sabtu pagi kemarin saya menerima satu sms dari seorang teman yang mengucapkan selamat tahun baru. Heran saya berpikir "Telat banget ini sms kok baru nyampe sekarang". Keheranan berlanjut ketika malamnya saya menerima sms lagi yang menyatakan hal yang sama. Saya sampai berpikir "Ini providernya atau emang anaknya yg telat ngirim sih???"

Dengan sedikit bingung, saya menceritakan kepada salah satu teman kos saya, yang berkesimpulan kurang lebih sama. Kesalahan ada di provider.

Sampai akhirnya saya menyadari bahwa di sms ke dua dituliskan "selamat tahun baru 1428h".

Ketika saya ceritakan lagi kepada teman kos saya, dia menggoda "waduh gimana to, kemaren kan kamu habis nulis resolusi tahun baru hijriyah"

hahaha iya ya??

"Selamat Tahun Baru 1428 Hijriyah, Selamat mengisi tahun ini dengan ,semoga, keberhasilan dan keberhasilan :)"

Wassalamualaikum Wr Wb,

hkhotimah

Friday, January 19, 2007

Log Instalasi MapServer

Posting ini merupakan bagian ke 5 dari 4 posting sebelumnya. Untuk instalasi tahap akhir mapserver, selain source mapserver juga diperlukan source gdal.
Kedua paker source tersebut bisa diambil di alamat berikut:
> mapserver: htttp://mis.gis.umn.edu
> gdal: http://www.gdal.org/

1. Ekstrak gdal
[root@localhost package_install_frsource]# tar -xvzf gdal-1.3.2.tar.tar
.
.
gdal-1.3.2/wince/msvc8_gdalce_lib_test/msvc8_gdalce_lib_test.vcproj
gdal-1.3.2/wince/msvc8_gdalce_lib_test/msvc8_gdalce_lib_test.sln
gdal-1.3.2/wince/msvc8_gdalce_lib_test/stdafx.h
gdal-1.3.2/wince/msvc8_gdalce_lib_test/msvc8_gdalce_lib_test.cpp
gdal-1.3.2/wince/msvc8_gdalce_lib_test/stdafx.cpp
[root@localhost package_install_frsource]#
[root@localhost package_install_frsource]# cd gdal-1.3.2

2. Konfigurasi gdal
[root@localhost gdal-1.3.2]# ./configure \
> --with-png \
> --with-libtiff \
> --with-jpeg \
> --with-gif \
> --with-pg=/usr/local/pgsql/bin/pg_config \
> --with-geos
.
.
OCI support: no
SDE support: no
DODS support: no
SQLite support: no
DWGdirect support no
PANORAMA GIS support: no
GEOS support: yes

Statically link PROJ.4: no

Traditional Python: yes
NG SWIG Bindings:

enable OGR building: yes

[root@localhost gdal-1.3.2]#

3. Compiling gdal
[root@localhost gdal-1.3.2]# make
.
.
core -I/usr/local/package_install_frsource/gdal-1.3.2/alg -I/usr/local/package_install_frsource/gdal-1.3.2/ogr -I/usr/local/package_install_frsource/gdal-1.3.2/ogr/ogrsf_frmts -I/usr/local/package_install_frsource/gdal-1.3.2/frmts -DOGR_ENABLED -I/usr/local/package_install_frsource/gdal-1.3.2/port -c gdal_rasterize.cpp -fPIC -DPIC -o .libs/gdal_rasterize.o
g++ -Wall -O2 -I/usr/local/package_install_frsource/gdal-1.3.2/port -I/usr/local/package_install_frsource/gdal-1.3.2/gcore -I/usr/local/package_install_frsource/gdal-1.3.2/alg -I/usr/local/package_install_frsource/gdal-1.3.2/ogr -I/usr/local/package_install_frsource/gdal-1.3.2/ogr/ogrsf_frmts -I/usr/local/package_install_frsource/gdal-1.3.2/frmts -DOGR_ENABLED -I/usr/local/package_install_frsource/gdal-1.3.2/port -c gdal_rasterize.cpp -o gdal_rasterize.o >/dev/null 2>&1
/bin/sh /usr/local/package_install_frsource/gdal-1.3.2/libtool --mode=link g++ gdal_rasterize.o /usr/local/package_install_frsource/gdal-1.3.2/libgdal.la -o gdal_rasterize
g++ gdal_rasterize.o -o .libs/gdal_rasterize /usr/local/package_install_frsource/gdal-1.3.2/.libs/libgdal.so -L/usr/local/lib -ljpeg -ltiff -lpng -L/usr/local/pgsql/lib -lpq -lz -lrt -ldl
creating gdal_rasterize
make[1]: Leaving directory `/usr/local/package_install_frsource/gdal-1.3.2/apps'

4. Instaling gdal
[root@localhost gdal-1.3.2]#make install
.
.
/usr/local/package_install_frsource/gdal-1.3.2/install-sh -c gdalimport.py /usr/local/bin/gdalimport.py
/usr/local/package_install_frsource/gdal-1.3.2/install-sh -c gdal_merge.py /usr/local/bin/gdal_merge.py
/usr/local/package_install_frsource/gdal-1.3.2/install-sh -c pct2rgb.py /usr/local/bin/pct2rgb.py
/usr/local/package_install_frsource/gdal-1.3.2/install-sh -c rgb2pct.py /usr/local/bin/rgb2pct.py
/usr/local/package_install_frsource/gdal-1.3.2/install-sh -c gcps2vec.py /usr/local/bin/gcps2vec.py
for f in gdal.py ogr.py osr.py gdalconst.py gdalnumeric.py ; do /usr/local/package_install_frsource/gdal-1.3.2/install-sh -c -m 0644 $f /usr/lib/python2.4/site-packages ; done
# ugh! spurius relinking leaves a file owned by root into .libs/.
rm -f .libs/*.soT
make[1]: Leaving directory `/usr/local/package_install_frsource/gdal-1.3.2/pymod'
for f in data/*.* ; do /usr/local/package_install_frsource/gdal-1.3.2/install-sh -c -m 0644 $f /usr/local/share/gdal ; done
/bin/sh /usr/local/package_install_frsource/gdal-1.3.2/libtool --mode=finish --silent /usr/local/lib

5. Ekstrak mapserver
[root@localhost gdal-1.3.2]#cd ..
[root@localhost package_install_frsource]#tar -xvzf mapserver-4.10.0.tar.gz

6. Konfigurasi mapserver
[root@localhost package_install_frsource]# cd mapserver-4.10.0
[root@localhost mapserver-4.10.0]# ./configure \
> --with-proj=/usr/local \
> --with-geos=/usr/local/bin/geos-config \
> --with-ogr=/usr/local/bin/gdal-config \
> --with-gdal=/usr/local/bin/gdal-config \
> --with-postgis=/usr/local/pgsql/bin/pg_config \
> --with-curl-config=/usr/bin/curl-config \
> --with-php=/usr/local/package_install_frsource/php-5.2.0
.
.
configure: checking whether we should enable debug features...
configure: checking for PHP/MapScript module options...
checking for g++ -shared ... yes
checking for location of config.h or php_config.h... /usr/local/package_install_frsource/php-5.2.0/main/php_config.h
checking whether we have PHP3 or PHP4... -DPHP4
checking whether we should use PHP's regex... yes
found regex_extra.h - building PHP MapScript with PHP's bundled regex
PHP/MapScript module configured.
checking if --enable-runpath requested... no
checking if --with-java-include-os-name specified... no, autodetected linux
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mapscript/php3/Makefile
config.status: creating mapscript/java/Makefile
config.status: creating mapscript/csharp/Makefile

7. Compiling mapserver
[root@localhost mapserver-4.10.0]#make
.
.
PFONTS -DUSE_ICONV -DUSE_ZLIB -I/usr/local/package_install_frsource/mapserver-4.10.0 -I/usr/local/pgsql/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/include -I/usr/local/package_install_frsource/php-5.2.0 -I/usr/local/package_install_frsource/php-5.2.0/dl -I/usr/local/package_install_frsource/php-5.2.0/main -I/usr/local/package_install_frsource/php-5.2.0/Zend -I/usr/local/package_install_frsource/php-5.2.0/include -I/usr/local/package_install_frsource/php-5.2.0/TSRM -c -o php_regex.o php_regex.c
g++ -shared -o php_mapscript.so php_mapscript_util.o php_mapscript.o mapscript_i.o php_regex.o -L/usr/local/package_install_frsource_batulayang/mapserver-4.10.0 -lmap -L/usr/local/pgsql/lib -lpq -ljpeg -lfreetype -lpng -lz -lXpm -lX11 -L/usr/local/lib -lgdal -L/usr/local/lib -lgeos_c -L/usr/local/lib -lproj -lgd -L/usr/lib -lgd -ljpeg -lfreetype -lpng -lz -lXpm -lX11 -lc -lz -lm -lstdc++
make[1]: Leaving directory `/usr/local/package_install_frsource/mapserver-4.10.0/mapscript/php3'
[root@localhost mapserver-4.10.0]#

8. Pindahkah file-file berikut ke /usr/local/apache2/cgi-bin/.
[root@localhost mapserver-4.10.0]# cp shptree /usr/local/apache2/cgi-bin/.
[root@localhost mapserver-4.10.0]# cp shptreetst /usr/local/apache2/cgi-bin/.
[root@localhost mapserver-4.10.0]# cp shptreevis /usr/local/apache2/cgi-bin/.
[root@localhost mapserver-4.10.0]# cp sortshp /usr/local/apache2/cgi-bin/.

9. Test mapserver
[root@localhost mapserver-4.10.0]# /usr/local/apache2/cgi-bin/mapserv
/usr/local/apache2/cgi-bin/mapserv: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory
[root@localhost mapserver-4.10.0]# ldconfig
[root@localhost mapserver-4.10.0]# /usr/local/apache2/cgi-bin/mapserv
/usr/local/apache2/cgi-bin/mapserv: error while loading shared libraries: libpq.so.4: cannot open shared object file: No such file or directory
[root@localhost mapserver-4.10.0]# vi /etc/ld.so.conf
=====
note: edit ld.so.conf tambahkan "/usr/local/pgsql/lib"
=====
[root@localhost mapserver-4.10.0]# ldconfig
[root@localhost mapserver-4.10.0]# /usr/local/apache2/cgi-bin/mapserv
This script can only be used to decode form results and
should be initiated as a CGI process via a httpd server.
[root@localhost mapserver-4.10.0]#

Log Instalasi Postgis

Posting ini merupakan bagian ke 4. Untuk lebih jelasnya lihat 3 posting sebelum ini.
Instalasi Postgis membutuhkan beberapa paket source yaitu :
> proj4 : htttp://www.remotesensing.org/proj/
> geos : http://geos.refractions.net
>postgis : http://www.postgis.org/

1. Ekstrak, compiling, installing paket source untuk postgis(proj dan geos).
[root@localhost package_install_frsource]# tar -xvzf proj-4.5.0.tar.gz
.
.
proj-4.5.0/jniwrap/org/proj4/LatLong.java
proj-4.5.0/jniwrap/org/proj4/Others.java
proj-4.5.0/jniwrap/org/proj4/Proj4Factory.java
proj-4.5.0/jniwrap/org/proj4/Proj4.java
proj-4.5.0/jniwrap/org/proj4/ProjectionData.java
proj-4.5.0/jniwrap/org/proj4/Projections.java
[root@localhost package_install_frsource]#
[root@localhost package_install_frsource]# cd proj-4.5.0
[root@localhost proj-4.5.0]# ./configure
.
.
config.status: creating jniwrap/org/Makefile
config.status: creating jniwrap/org/proj4/Makefile
config.status: creating src/proj_config.h
config.status: executing depfiles commands
[root@localhost proj-4.5.0]#
[root@localhost proj-4.5.0]# make
.
.
make[2]: Entering directory `/usr/local/package_install_frsource/proj-4.5.0/jniwrap'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/usr/local/package_install_frsource/proj-4.5.0/jniwrap'
make[1]: Leaving directory `/usr/local/package_install_frsource/proj-4.5.0/jniwrap'
make[1]: Entering directory `/usr/local/package_install_frsource/proj-4.5.0'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/usr/local/package_install_frsource/proj-4.5.0'
[root@localhost proj-4.5.0]#
[root@localhost proj-4.5.0]# make install
.
.
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/local/package_install_frsource/proj-4.5.0'
make[1]: Leaving directory `/usr/local/package_install_frsource/proj-4.5.0'
[root@localhost proj-4.5.0]#
[root@localhost proj-4.5.0]# cd ..
[root@localhost package_install_frsource]# bunzip2 geos-2.2.3.tar.bz2
[root@localhost package_install_frsource]# tar -xvf geos-2.2.3.tar
.
.
geos-2.2.3/VisualStudio/
geos-2.2.3/VisualStudio/Makefile.am
geos-2.2.3/VisualStudio/Makefile.in
geos-2.2.3/VisualStudio/GEOS.sln
geos-2.2.3/VisualStudio/GEOS.vcproj
[root@localhost package_install_frsource]#
[root@localhost package_install_frsource]# cd geos-2.2.3
[root@localhost geos-2.2.3]# ./configure
.
.
config.status: creating VisualStudio/Makefile
config.status: creating source/capi/geos_c.h
config.status: creating source/headers/config.h
config.status: creating source/headers/geos/platform.h
config.status: executing depfiles commands
[root@localhost geos-2.2.3]#
[root@localhost geos-2.2.3]# make
.
.
creating example
make[1]: Leaving directory `/usr/local/package_install_frsource/geos-2.2.3/doc'
Making all in VisualStudio
make[1]: Entering directory `/usr/local/package_install_frsource/geos-2.2.3/VisualStudio'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/package_install_frsource/geos-2.2.3/VisualStudio'
make[1]: Entering directory `/usr/local/package_install_frsource/geos-2.2.3'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/usr/local/package_install_frsource/geos-2.2.3'
[root@localhost geos-2.2.3]#
[root@localhost geos-2.2.3]# make install
.
.
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/local/package_install_frsource/geos-2.2.3'
make[1]: Leaving directory `/usr/local/package_install_frsource/geos-2.2.3'
[root@localhost geos-2.2.3]#
[root@localhost geos-2.2.3]# cd ..

2. Ekstrak postgis dan pindahkan postgis ke postgresql-8.1.3/contrib/.
[root@localhost package_install_frsource]# tar -xvzf postgis-1.1.6.tar.gz
.
.
postgis-1.1.6/topology/README
postgis-1.1.6/install-sh
postgis-1.1.6/geos_version.sh
postgis-1.1.6/autogen.sh
postgis-1.1.6/Makefile
[root@localhost package_install_frsource]#
[root@localhost package_install_frsource]# ll
total 35500
drwxrwxrwx 8 509 users 4096 Dec 30 15:41 geos-2.2.3
-rw-r--r-- 1 root root 4085760 Nov 18 16:58 geos-2.2.3.tar
drwxr-xr-x 12 hkhotimah hkhotimah 4096 Dec 30 13:35 httpd-2.2.3
-rw-r--r-- 1 root root 6342475 Nov 18 08:31 httpd-2.2.3.tar.gz
drwxr-xr-x 18 1002 1002 4096 Dec 30 14:41 php-5.2.0
-rw-r--r-- 1 root root 8583491 Nov 18 10:31 php-5.2.0.tar.gz
drwxr-xr-x 10 529 users 4096 Nov 7 00:43 postgis-1.1.6
-rw-r--r-- 1 root root 2039011 Nov 18 11:05 postgis-1.1.6.tar.gz
drwxrwxrwx 6 avahi avahi 4096 Dec 30 13:51 postgresql-8.1.4
-rw-r--r-- 1 root root 14548395 Nov 18 11:32 postgresql-8.1.4.tar.gz
drwxrwxrwx 6 postgres users 4096 Dec 30 15:34 proj-4.5.0
-rw-r--r-- 1 root root 655450 Nov 18 11:02 proj-4.5.0.tar.gz
[root@localhost package_install_frsource]# mv postgis-1.1.6 postgresql-8.1.4/contrib/
[root@localhost package_install_frsource]# ll postgresql-8.1.4/contrib/ | grep postgis
drwxr-xr-x 10 529 users 4096 Nov 7 00:43 postgis-1.1.6

3. Konfigurasi postgis dengan sebelumnya masuk ke folder postgis
[root@localhost package_install_frsource]# cd postgresql-8.1.4/contrib/postgis-1.1.6/
[root@localhost postgis-1.1.6]# ./configure \
> --with-pgsql=/usr/local/pgsql/bin/pg_config
.
.
checking for pdfxmltex... /usr/bin/pdfxmltex
checking for db2pdf... /usr/bin/db2pdf
checking for jw... /usr/bin/jw
checking which template to use... linux
configure: creating ./config.status
config.status: creating Makefile.config
config.status: creating config.h

SUMMARY
-------------------------------------------------------

HOST_OS: linux-gnu

PGSQL: /usr/local/pgsql/bin/pg_config
GEOS: /usr/local/bin/geos-config (with C-API)
(ldflags: -L/usr/local/lib)
PROJ: prefix=/usr/local libdir=/usr/local/lib
ICONV: 1

PORTNAME: linux
PREFIX: /usr/local/pgsql
EPREFIX: ${prefix}
DOC: /usr/local/pgsql/doc/contrib
DATA: /usr/local/pgsql/share/contrib
MAN: /usr/local/pgsql/man
BIN: /usr/local/pgsql/bin
EXT: /usr/local/pgsql/lib (\$$libdir)
-------------------------------------------------------

4. Compiling
[root@localhost postgis-1.1.6]#
[root@localhost postgis-1.1.6]# make
.
.
gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=81 -DPOSTGIS_VERSION='"1.1.6"' -c -o PQunescapeBytea.o PQunescapeBytea.c
gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=81 -DPOSTGIS_VERSION='"1.1.6"' shpopen.o dbfopen.o getopt.o PQunescapeBytea.o pgsql2shp.o -L/usr/local/pgsql/lib -lpq -o pgsql2shp
make[1]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/contrib/postgis-1.1.6/loader'
make -C utils
make[1]: Entering directory `/usr/local/package_install_frsource/postgresql-8.1.4/contrib/postgis-1.1.6/utils'
chmod +x postgis_restore.pl create_undef.pl postgis_proc_upgrade.pl profile_intersects.pl test_estimation.pl test_joinestimation.pl
make[1]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/contrib/postgis-1.1.6/utils'
[root@localhost postgis-1.1.6]#

4. Installing
[root@localhost postgis-1.1.6]# make install
/usr/local/package_install_frsource/postgresql-8.1.4/contrib/postgis-1.1.6/install-sh -c -m 755 pgsql2shp /usr/local/pgsql/bin/pgsql2shp
/usr/local/package_install_frsource/postgresql-8.1.4/contrib/postgis-1.1.6/install-sh -c -m 755 shp2pgsql /usr/local/pgsql/bin/shp2pgsql
make[1]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/contrib/postgis-1.1.6/loader'
[root@localhost postgis-1.1.6]#

5. Edit /etc/ld.co.conf
[root@localhost postgis-1.1.6]# vi /etc/ld.so.conf
===
note:tambahkan "/usr/local/lib"
=====
[root@localhost postgis-1.1.6]# ldconfig

6. Test postgis
[postgres@localhost postgis-1.1.6]$ /usr/local/pgsql/bin/createlang plpgsql test
[postgres@localhost postgis-1.1.6]$ /usr/local/pgsql/bin/psql -d test -f /usr/local/pgsql/share/contrib/lwpostgis.sql
.
.
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
COMMIT
[postgres@localhost postgis-1.1.6]$
[postgres@localhost postgis-1.1.6]$ /usr/local/pgsql/bin/psql -d test -f /usr/local/pgsql/share/contrib/spatial_ref_sys.sql
.
.
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
COMMIT
VACUUM
[postgres@localhost postgis-1.1.6]$
[postgres@localhost postgis-1.1.6]$ exit

Thursday, January 18, 2007

Log Instalasi PHP

Posting ini adalah bagian ke tiga dari log proses instalasi sistem web server pada Fedora 5. Lihat posting sebelumnya untuk lebih jelasnya. Pada titik ini telah terinstall Apache dan Postgresql.

File source PHP dapat didownload di http://www.php.net.

1. File source telah diletakkan pada /usr/local/package_install_frsource
[root@localhost postgresql-8.1.4]# cd ..

2. Ekstrak source PHP
[root@localhost package_install_frsource]# tar -xzvf php-5.2.0.tar.gz
.
.
php-5.2.0/CREDITS
php-5.2.0/README.UPDATE_5_2
php-5.2.0/README.UNIX-BUILD-SYSTEM
php-5.2.0/buildconf.bat

3. Konfigurasi PHP dengan terlebih dahulu masuk ke folder php
[root@localhost package_install_frsource]# cd php-5.2.0
[root@localhost php-5.2.0]# ./configure \
> --prefix=/usr/local/apache2/php \
> --with-apxs2=/usr/local/apache2/bin/apxs \
> --disable-cgi \
> --with-config-file-path=/usr/local/apache2/php \
> --with-openssl \
> --with-kerberos \
> --with-zlib \
> --with-bz2 \
> --with-curl \
> --enable-dbase \
> --with-gd \
> --with-pgsql \
> --with-xsl \
> --with-gettext \
> --with-regex=system
.
.
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating main/php_config.h
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+

Thank you for using PHP.

4. Compiling
[root@localhost php-5.2.0]# make
.
.
lrt -lpng -lz -lcurl -lbz2 -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -lssl -lcrypto -ldl -lz -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lidn -lssl -lcrypto -lz -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxslt -lxml2 -lz -lm -lcrypt -o sapi/cli/php

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

[root@localhost php-5.2.0]#

5. Installing
[root@localhost php-5.2.0]# make install
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.so /usr/local/apache2/modules/libphp5.so
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/local/package_install_frsource/php-5.2.0/libs'
chmod 755 /usr/local/apache2/modules/libphp5.so
[activating module `php5' in /usr/local/apache2/conf/httpd.conf]
Installing PHP CLI binary: /usr/local/apache2/php/bin/
Installing PHP CLI man page: /usr/local/apache2/php/man/man1/
Installing build environment: /usr/local/apache2/php/lib/php/build/
Installing header files: /usr/local/apache2/php/include/php/
Installing helper programs: /usr/local/apache2/php/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/apache2/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/apache2/php/lib/php/
[PEAR] Archive_Tar - installed: 1.3.1
[PEAR] Console_Getopt - installed: 1.2
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
[PEAR] PEAR - installed: 1.4.11
Wrote PEAR system config file at: /usr/local/apache2/php/etc/pear.conf
You may want to add: /usr/local/apache2/php/lib/php to your php.ini include_path
Installing PDO headers: /usr/local/apache2/php/include/php/ext/pdo/
[root@localhost php-5.2.0]#

6. Memindahkan file konfigurasi php.ini
[root@localhost php-5.2.0]# cp php.ini-recommended /usr/local/apache2/php/php.ini
[root@localhost php-5.2.0]#
[root@localhost php-5.2.0]# vi /usr/local/apache2/conf/httpd.conf
======
note: Tambahkan beberapa baris berikut pada httpd.conf di sekitar baris 307

AddType application/x-httpd-php .php .html .phtml
AddType application/x-httpd-php-source .phps

Selain itu cek apakah baris berikut ada:
-sekitar baris 53
LoadModule php5_module module/libphp5.so

-sekitar baris 165

DirectoryIndex index.php index.html

======

7. Test hasil instalasi PHP
[root@localhost php-5.2.0]# service apachectl restart
===
note: copy phppgadmin4.0.1 untuk mengecek apakah php sudah bisa dijalankan dan sekaligus untuk mengetahui apakah postgresql dan php kompatibel
sukses phppgadmin muncul dan usertest bisa masuk ke phppgadmin
(*jika terdapat error, cek lagi konfigurasi postgresql /usr/local/pgsql/data/pg_hba.conf dan /usr/local/pgsql/data/postgresql.conf, cek lagi konfigurasi phppgadmin /usr/local/apache2/htdocs/phppgadmin/conf/, dan cek lagi /usr/local/apache2/php/php.ini kemudian restart apache n postgresql. )

=============
[root@localhost php-5.2.0]# /usr/local/apache2/bin/apachectl restart
====
note: jika sepertinya service apachectl masih error. Lakukan perintah restart secara manual seperti perintah di atas
====

Log Instalasi PostgreSQL

Posting ini adalah kelanjutan dari posting sebelumnya (Log Instalasi Apache). Pemisahan log ini dalam rangka untuk memudahkan pembacaan.
Sebagai panduan instalasi postgresql, saya selain menggunakan dokumen dari http://mapserver.gis.umn.edu/docs tetapi juga dari buku berjudul "Database Server PostgreSQL" karangan Dr. Richardus Eko Indrajit dan Andhi Lala Adam.

Source postgresql bisa diperoleh dari ftp://ftp9.id.postgresql.org/postgresql/

1. Source postgresql telah diletakkan di /usr/local/package_install_frsource
[root@localhost httpd-2.2.3]# cd ..

2. Ekstrak source postgresql
[root@localhost package_install_frsource]# tar -xvzf postgresql-8.1.4.tar.gz
.
.
postgresql-8.1.4/doc/src/FAQ/FAQ_japanese.html
postgresql-8.1.4/doc/src/FAQ/FAQ_polish.html
postgresql-8.1.4/doc/src/FAQ/FAQ_russian.html
postgresql-8.1.4/doc/src/FAQ/FAQ_turkish.html
postgresql-8.1.4/doc/src/FAQ/README
postgresql-8.1.4/doc/src/FAQ/TODO.html
[root@localhost package_install_frsource]#

3. Konfigurasi postgresql dengan sebelumnya pindah ke folder postgresql
[root@localhost package_install_frsource]# cd postgresql-8.1.4
[root@localhost postgresql-8.1.4]# LDFLAGS=-lstdc++ ./configure \
> --prefix=/usr/local/pgsql \
> --with-perl \
> --with-phyton \
> --with-krb5 \
> --with-openssl
.
.
checking for collateindex.pl... /usr/bin/collateindex.pl
checking for sgmlspl... sgmlspl
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking ./src/backend/port/dynloader/linux.c to src/backend/port/dynloader.c
config.status: linking ./src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
config.status: linking ./src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking ./src/backend/port/dynloader/linux.h to src/include/dynloader.h
config.status: linking ./src/include/port/linux.h to src/include/pg_config_os.h
config.status: linking ./src/makefiles/Makefile.linux to src/Makefile.port

4. Compiling
[root@localhost postgresql-8.1.4]# make
.
.
rm -f libplperl.so
ln -s libplperl.so.0.0 libplperl.so
make[3]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/src/pl/plperl'
make[2]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/src/pl'
make -C makefiles all
make[2]: Entering directory `/usr/local/package_install_frsource/postgresql-8.1.4/src/makefiles'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/src/makefiles'
make -C utils all
make[2]: Entering directory `/usr/local/package_install_frsource/postgresql-8.1.4/src/utils'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/src/utils'
make[1]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/src'
make -C config all
make[1]: Entering directory `/usr/local/package_install_frsource/postgresql-8.1.4/config'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/config'
All of PostgreSQL successfully made. Ready to install.

5. Installing
[root@localhost postgresql-8.1.4]# make install
.
.
/bin/sh ../config/install-sh -c -m 755 ./mkinstalldirs /usr/local/pgsql/lib/pgxs/config/mkinstalldirs
make[1]: Leaving directory `/usr/local/package_install_frsource/postgresql-8.1.4/config'
PostgreSQL installation complete.
[root@localhost postgresql-8.1.4]#

6. Menambahkan user postgres (pemilik default postgresql)
[root@localhost postgresql-8.1.4]# /usr/sbin/adduser postgres
[root@localhost postgresql-8.1.4]# mkdir /usr/local/pgsql/data
[root@localhost postgresql-8.1.4]# chown postgres /usr/local/pgsql/data/

7. Inisialisasi postgresql
[root@localhost postgresql-8.1.4]# su - postgres
[postgres@localhost ~]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data/
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating directory /usr/local/pgsql/data/global ... ok
creating directory /usr/local/pgsql/data/pg_xlog ... ok
creating directory /usr/local/pgsql/data/pg_xlog/archive_status ... ok
creating directory /usr/local/pgsql/data/pg_clog ... ok
creating directory /usr/local/pgsql/data/pg_subtrans ... ok
creating directory /usr/local/pgsql/data/pg_twophase ... ok
creating directory /usr/local/pgsql/data/pg_multixact/members ... ok
creating directory /usr/local/pgsql/data/pg_multixact/offsets ... ok
creating directory /usr/local/pgsql/data/base ... ok
creating directory /usr/local/pgsql/data/base/1 ... ok
creating directory /usr/local/pgsql/data/pg_tblspc ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
enabling unlimited row size for system tables ... ok
initializing dependencies ... ok
creating system views ... ok
loading pg_description ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
or
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start

[postgres@localhost ~]$

8. Testing
[postgres@localhost ~]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data/ -l /usr/local/pgsql/data/logfile start
postmaster starting
[postgres@localhost ~]$ /usr/local/pgsql/bin/createdb test
CREATE DATABASE

9. Membuat user postgresql
[postgres@localhost ~]$ /usr/local/pgsql/bin/psql test
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

test=# create user usertest createdb createuser password='usertest';
ERROR: syntax error at or near "=" at character 50
LINE 1: create user usertest createdb createuser password='usertest'...
^
test=# create user usertest createdb createuser password 'usertest';
CREATE ROLE
test=# \q
[postgres@localhost ~]$
[postgres@localhost ~]$exit

10. Otomatisasi postgresql, sehingga ketika restart dapat secara otomatis 'running'
[root@localhost postgresql-8.1.4]# vi contrib/start-scripts/linux
===
note: perintah di atas hanya untuk mengecek isi contrib/start-scripts/linux
===

[root@localhost postgresql-8.1.4]# cp contrib/start-scripts/linux /etc/init.d/postgresql
[root@localhost postgresql-8.1.4]# vi /etc/init.d/postgresql
==
note: perintah di atas setelah 'cp..' hanya untuk mengecek hasil copy
==

[root@localhost postgresql-8.1.4]# ll /etc/init.d | grep postgresql
[root@localhost postgresql-8.1.4]# ll /etc/init.d/ | grep postgresql
-rw-r--r-- 1 root root 2572 Dec 30 14:13 postgresql
[root@localhost postgresql-8.1.4]# chmod 700 /etc/init.d/postgresql
[root@localhost postgresql-8.1.4]# ll /etc/init.d/ | grep postgresql
-rwx------ 1 root root 2572 Dec 30 14:13 postgresql
[root@localhost postgresql-8.1.4]# /sbin/chkconfig --add postgresql
[root@localhost postgresql-8.1.4]# chkconfig --list | grep postgresql
postgresql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost postgresql-8.1.4]# chkconfig postgresql on

11. Test hasil otomatisasi postgresql
[root@localhost postgresql-8.1.4]# service postgresql restart
Restarting PostgreSQL: postmaster stopped
ok
[root@localhost postgresql-8.1.4]# su postgres
[postgres@localhost postgresql-8.1.4]$ /usr/local/pgsql/bin/psql test
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

test=# \q
[postgres@localhost postgresql-8.1.4]$
[postgres@localhost postgresql-8.1.4]$ exit
exit

Hello World

Assalamualaikum Wr Wb,

Layaknya code yang sangat familiar di telinga programmer ini, saya ingin mengucapkan "Halo Dunia" di posting pertama saya ini.

"Halo Dunia..."

Ide awal blog ini adalah saya ingin belajar. Simpel. Oleh karena itu komentar/saran/kritik mengenai blog ini secara keseluruhan atau posting-posting tertentu sangat saya nantikan.

Kategori blog akan seputar dunia 0 dan 1 (digital) yang saya tekuni. Hanya saja harap Anda bersabar dengan saya jika saat ini tidak banyak kategori yang bisa saya tawarkan disini.

Dan akhirnya semoga blog ini dapat memberikan manfaat bagi kita semua.

Wassalamualaikum Wr Wb,


hkhotimah