SMEOnffLine: Instalasi SQL Ledger

From OnnoWiki
Revision as of 11:40, 7 November 2009 by Onnowpurbo (talk | contribs) (New page: Siapkan software pendukung # apt-get install postgresql postgresql-client libdbd-pg-perl libdbi-perl libwww-perl Ambil source code SQL ledger dari http://www.sql-ledger.org http://ww...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Siapkan software pendukung

# apt-get install postgresql postgresql-client libdbd-pg-perl libdbi-perl libwww-perl

Ambil source code SQL ledger dari

http://www.sql-ledger.org
http://www.sql-ledger.org/cgi-bin/nav.pl?page=source/index.html&title=Download

Copy & extract source

cp sql-ledger-2.8.26.tar.gz /usr/local/
cd /usr/local
tar zxvf sql-ledger-2.8.26.tar.gz 

Pastikan anda memiliki akses ke Internet & ini akan membutuhkan waktu lumayan agak lama karena harus mendownload source code sql-ledger

cd /usr/local/sql-ledger
perl setup.pl

Masukan parameter

 i
 www-data
 www-data
 n

Selanjutnya installer SQL-Ledger akan mulai bekerja dan mengambil source dan data terbaru dari Internet


Status
Downloading sql-ledger-2.8.27.tar.gz .... 
www.sql-ledger.com .... ok
Decompressing sql-ledger-2.8.27.tar.gz ... done
Unpacking sql-ledger-2.8.27.tar ...
done
cleaning up ... done

Proses membutuhkan waktu beberapa saat untuk mendownload software dari Internet. Kita perlu menunggu hingga selesai.

Kita perlu mengedit konfigurasi Web Server Apache agar SQL-Ledger di kenali oleh Web Server Apache. SQL Ledger akan secara automatis membuat file

/etc/apache2/sql-ledger-httpd.conf

isinya

Alias /sql-ledger /usr/local/sql-ledger/
<Directory /usr/local/sql-ledger>
  AllowOverride All
  AddHandler cgi-script .pl
  Options ExecCGI Includes FollowSymlinks
  Order Allow,Deny
  Allow from All
</Directory>

<Directory /usr/local/sql-ledger/users>
  Order Deny,Allow
  Deny from All
</Directory>

Masukan / include file tersebut ke konfigurasi Apache melalui perintah

# vi /etc/apache2/apache2.conf

atau

# vi /etc/apache2/httpd.conf

isikan

# SQL-Ledger
Include /etc/apache2/sql-ledger-httpd.conf


Setelah mengedit file konfigurasi Web Server Apache, kita perlu me-restart Web Server Apache tersebut menggunakan perintah

# /etc/init.d/apache2 restart

Pastikan bahwa folder pada SQL-Ledgers users, templates, css dan spool dapat di akses oleh Web Server Apache. Hal ini dapat dilakukan menggunakan perintah

cd /usr/local/sql-ledger
chown -hR www-data.www-data users templates css spool

Selanjutnya kita perlu menyiapkan database server PostgresQL. Pastikan anda telah menginstalasi postgresql. Kita perlu meng-create user sql-ledger dari user postgres. Hal ini dapat dilakukan menggunakan perintah,

# su postgres
$ createuser -d sql-ledger
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n

atau kadang kali keluar pertanyaan berikut

Shall the new role be a superuser? (y/n) y
CREATE ROLE

Sampai tahapan ini sebetulnya kita sudah mulai dapat menggunakan Web dan mengkonfigurasi lebih lanjut melalui Web. Adapun alamat Web yang perlu di akses untuk login admin (passsword admin) adalah,

http://localhost/sql-ledger/admin.pl

Untuk login biasa dapat mengunakan alamat,

http://localhost/sql-ledger/login.pl

Ringkasan hal yang perlu dilakukan untuk menginstalasi SQL-Ledger adalah.

  • untar SQL-Ledger di sebuah folder, misalnya, /usr/local atau /opt.
  • Ubah ijin dari folder users, templates, css dan spool
  • edit httpd.conf
  • edit sql-ledger.conf
  • tambahkan database user sql-ledger
  • masuk ke admin.pl melalui Web
  • create datasets untuk companies
  • tambahkan add users

Pada bagian database, masukan

a) PostgreSQL
Host:		Untuk sambungan lokal, dapat di kosongkan saja.
Dataset:	Dataset dibuat dalam 7 langkah.
Port:		Untuk sambungan lokal, dapat di kosongkan saja.
User:		sql-ledger
Password:	password untuk sql-ledger

Pranala Menarik