Welcome to the LedgerSMB Forums - Open Source accounting software
Install Ubuntu Server 9.04 or login via SSH to your server.
$ sudo su
# apt-get install openssh-server (optional, if you use SSH)
# apt-get install apache2
# apt-get install postgresql
# apt-get install libclass-std-utils-perl
# apt-get install libconfig-std-perl
# apt-get install libtest-tester-perl
# apt-get install libdbd-pg-perl -- Does DBI also, other stuff
The following is not needed for LedgerSMB, but solves serious problems with CPAN and Ubuntu.
# apt-get install libyaml-perl
# apt-get install libtk-perl
# apt-get install build-essential
# apt-get install autoconf
# apt-get install automake
# apt-get install libtool
# apt-get install gdb
# apt-get install libdata-dump-perl
# apt-get install libmime-lite-perl --Does a bunch of other stuff. I did not study details.
# apt-get install liblocale-maketext-lexicon-perl
# apt-get install tetex-base
# apt-get install tetex-extra This step is very slow. You may do after install finished.
Optional Items:
# apt-get install libparse-recdescent-perl
# apt-get install libnet-tclink-perl
The next steps are needed for Ubuntu or you will get an error at admin.pl creating dataset screens of "bad postgres password".
Please pick a password for the PostgreSQL superuser postgres postgres-user-password.
Some advise that it is OK to use the same password as 'ledgersmb-user-password', but I recommend against that.
The superuser postgres is the same in power for PostgreSQL as root is for your server.
Please pick a quality password, even if you will not use it much.
# su - postgres
$ psql
postgres=# ALTER USER postgres with PASSWORD 'postgres-user-password';
ALTER ROLE
postgres=# \q
$ exit
Next, you must create a Unix user 'ledgersmb' in order to use psql as user 'ledgersmb'
# adduser ledgersmb
Enter 'ledgersmb-user-password' twice
OR
you must change the pg_hba.conf (then restart postgresql) to reflect a different type of authentication than "ident sameuser", such as md5, pam, etc.
See the pg_hba.conf file for an explanation and examples.
Changing "ident sameuser" to "md5" is a common change.
You may wish to do this change after installation is complete.
You may put ledgersmb anywhere that works.
For this example, I will install in /usr/local.
Placing the *.tar.gz file in /usr/local and untarring there will create a ledgersmb directory there.
Thus /usr/local/ledgersmb = LEDGERPATH.
# cd /usr/local Note: in my example /usr/local/ledgersmb=LEDGERPATH
# wget ftp://where-ever.who.com/directory/stuff/ledgersmb.1.2.*.tar.gz
Note: http://softlayer.dl.sourceforge.net/sourceforge/ledger-smb/ledgersmb-1.2.18.tar.gz worked as of May 28, 2009
# tar xzf ledgersmb-1.2.*.tar.gz
# cd ledgersmb
# su - postgres
$ createuser --no-superuser --createdb --no-createrole -U postgres --pwprompt --encrypted ledgersmb
(password asked twice is 'ledgersmb-user-password')
('postgres-user-password' is not asked, unless you changed pg_hba.conf, then asked last.)
$ exit
# su - ledgersmb
$ createdb -U ledgersmb -O ledgersmb ledgersmb
$ psql -U ledgersmb -d ledgersmb -f /usr/local/ledgersmb/sql/Pg-central.sql Note: use -f LEDGERPATH/sql/Pg-central.sql
$ psql -U ledgersmb -d ledgersmb
ledgersmb=> UPDATE users_conf SET password = md5('ledgersmb-user-password') WHERE id = 1;
UPDATE 1
ledgersmb=>\q
$ exit
# cp ledgersmb.conf.default ledgersmb.conf
Edit ledgersmb.conf.
Set DBPassword to ledgersmb-user-password, make any other needed changes.
Run sh configure_apache.sh
# sh configure_apache.sh
The script will ask what user web server runs as: Apache2 runs as www-data
The script will ask where to copy ledgersmb-httpd.conf to: /etc/apache2/conf.d
Restart Apache2
# apache2ctl restart
You will need to run
cpan (Note: If apt-get install libtest-trap-perl ever works, you may skip cpan steps!)
Go ahead and say yes to do defaults
# cpan
cpan[1]> install Bundle::CPAN This takes some time. You need to watch.
Hit Yes to Prepend as needed. Hit exit instead of entering arithmetic expression. Etc.
cpan[1]> q
# cpan
cpan[1]> install Test::Trap
Etc.
cpan[1]> q
# perl Build.PL
If it passes you are OK
# ./Build test
If it passes OK (ignore long list of perl errors, look at end of list for pass or fail.)
Congratulations, you have installed and configured LedgerSMB 1.2.*
Browse to: http://'insert-your-hostname'/ledgersmb/login.pl
Enter a User Name and Password (This time you won't be using postgres or ledgersmb, but one of the created users.)
User: johndoe
Password: user-johndoe-password
Good Luck!! Enjoy!!