Saturday, October 2, 2010

HowTO : Install SQL-Ledger on Ubuntu 10.04

SQL-Ledger is a double-entry accounting/ERP system written in perl. It has been tested with PostgreSQL, Apache, Netscape, Mozilla, Galeon, Explorer, Links, Lynx, Konqueror, Voyager, W3M and Opera clients on Linux, FreeBSD, Solaris, Windows, Mac computers and PDA's.

Installing SQL-Ledger on Ubuntu 10.04

  1. Login as root
    sudo -i
  2. Download SQL-Ledger.
    wget -c http://www.sql-ledger.com/source/sql-ledger-2.8.30.tar.gz
    (sql-ledger-2.8.30 is the stable version, but 3.0 is on the way)
  3. Untar the files
    cp sql-ledger-2.8.30.tar.gz /usr/local 
    cd /usr/local 
    
    tar zxvf sql-ledger-2.8.30.tar.gz
  4. Setup SQL-Ledger
    cd /usr/local/sql-ledger
    perl setup.pl
    Checking for latest version number ....
    www.sql-ledger.com ... ok
    
                   SQL-Ledger ERP Installation
    
    (i)nstall 2.8.30 (from Internet)
    
    (d)ownload 2.8.30 (no installation)
    
    Enter: i
    
    Enter httpd owner [] : www-data
    
    Enter httpd group [] : www-data
    
    Status
    Downloading sql-ledger-2.8.30.tar.gz .... 
    www.sql-ledger.com .... ok
    Decompressing sql-ledger-2.8.30.tar.gz ... done
    Unpacking sql-ledger-2.8.30.tar ... done
    cleaning up ... done
    
    This is a new installation.
    
    Webserver directives were written to
    
      /etc/apache2/sql-ledger-httpd.conf
    Please add
    
    # SQL-Ledger
    Include /etc/apache2/sql-ledger-httpd.conf
    
    to your httpd configuration file and restart the web server.
    
    Display README (Y/n) : n
  5. Apache Configuration. Looking at the last step,
    #Webserver directives were written to
    
      /etc/apache2/sql-ledger-httpd.conf
    Please add
    
    # SQL-Ledger
    Include /etc/apache2/sql-ledger-httpd.conf
    
    to your httpd configuration file and restart the web server.
    
    Display README (Y/n) : n
    In Ubuntu, the configurations are entered in the file /etc/apache2/apache2.conf. So open the file and add the line as instructed above.
    vim /etc/apache2/apache2.conf
    Locate other incldues and add the SQL-Ledger Include. See how my apache2.conf file.
  6. Change permissions of some of the files so that the Apache Server can write to them.
    cd /usr/local/sql-ledger  
    chown -hR www-data.www-data users templates css spool
  7. Restart Your Apache Server
    /etc/init.d/apache2 restart
  8. Install PostgreSQL
    apt-get install postgresql postgresql-client
  9. Create a new user and database for sql-ledge
    su postgres
    createuser -d -P sql-ledger
    createdb sql-ledger
    createlang plpgsql template1
  10. Setup the database and tables. Fire up your browser and point to http://localhost/sql-ledger/admin.pl. Initial Password is admin.  Select the "Database Administration" link, enter the user you created in the previous step.  The "Create Dataset" link queries the server for existing datasets and displays them in a table. Enter a name for the new dataset (use lowercase letters only!) and select one of the Chart of Accounts and click on Continue.
  11. Create the User. Click "Add User"and remember to use the dataset you have just created.
  12. Start Your Accounting by pointing your browser to http://localhost/sql-ledger/login.pl

No comments:

Post a Comment

Afrigator