[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ubuntu server on a home network with Apache; PostgreSQL; LedgerSMB -- newbie Step by Step
- Subject: Ubuntu server on a home network with Apache; PostgreSQL; LedgerSMB -- newbie Step by Step
- From: "David Methot" <..hidden..>
- Date: Fri, 05 Jan 2007 16:42:26 -0500
Ubuntu server on a home network with Apache; PostgreSQL; LedgerSMB -- newbie Step by Step
The objective is to use an old unused computer as the business computer which will hold the accounting database. LedgerSMB along with PostgreSQL will allow more than one user the access to the accounting software from anywhere on the network.
Although computer literate, I don't make a living at it... so by the time I learned anything it's obsolete. Command prompts were something I used a long time ago under MS-DOS. Linux is new to me, so the following steps are what made it work on my system. There may be better and easier ways to achieve the same, so if you can help improve this process, please do so. If someone somewhere can use this to setup their own configuration, then the 5 or 6 days of banging my head against the monitor and the few swear words will have more value.
Good Luck
Farmer Dave, a Linux newbie
:-)
-------------------------------------------------------------------------
Ubuntu Server
-------------------------------------------------------------------------
Download and burn on CD Ubuntu's server edition; in this case version 6.10
Make sure the computer is properly hooked up to the router.
Start your computer and configure your Bios to boot on the CD-ROM
If it will not boot using CD-ROM... use Smart Boot Manager. See https://help.ubuntu.com/community/SmartBootManagerHowto
in my case it would still not boot, so I replaced the CD-ROM with the same one I used to burn the CD.
Ubuntu's menu will appear; Select Install to the hard disk
I get an error " [42949372.960000] ACPI:Unable to locate RSDP " and ignore it.
Since I only have 64MB of memory, the install will enter a low memory mode.
Answer to prompts.
At the 'Partition disks' menu, I choose to erase entire disk
At the 'Ubuntu software selection' I choose DNS server.
If new to Linux, check out "An introduction to the Linux command line" at http://www.tuxfiles.org/linuxhelp/cli.html
To get an idea of what the directories are for, check out "Linux's directory structure" at http://www.tuxfiles.org/linuxhelp/linuxdir.html
-------------------------------------------------------------------------
Apache
-------------------------------------------------------------------------
Install Apache
$ sudo apt-get update
$ sudo apt-get install apache2
I get the response " could not determine the server's fully qualified domain name, using 127.0.1.1 for ServerName "
If I enter http://192.168.0.102/ in my favorite browser on any other computer on the network, I will reach the apache2-default directory. Try replacing 102 with 102, 103, 104, etc if no connection is established.
-------------------------------------------------------------------------
Various utilities
-------------------------------------------------------------------------
Install C-compiler and other libraries
$ apt-get install build-essential
$ sudo ln -s /usr/bin/gcc-4.1 /bin/gcc
$ sudo apt-get install libreadline5-dev
$ sudo apt-get install zlib1g-dev
-------------------------------------------------------------------------
PostgreSQL
-------------------------------------------------------------------------
Install PostgreSQL. Here I'm using version 8.1.5; change accordingly for newer version and/or another mirror.
$ sudo mkdir /usr/temp
$ cd /usr/temp
$ sudo wget ftp://ftp.postgresql.org/pub/source/v8.1.5/postgresql-8.1.5.tar.gz
$ sudo gunzip postgresql-8.1.5.tar.gz
$ cd /usr/src
$ sudo tar xf /usr/temp/postgresql-8.1.5.tar
$ cd postgresql-8.1.5
$ sudo ./configure
$ sudo make
$ sudo make install-strip
$ sudo make clean
$ sudo /sbin/ldconfig /usr/local/pgsql/lib
$ PATH=/usr/local/pgsql/bin:$PATH
$ export PATH
$ MANPATH=/usr/local/pgsql/man:$MANPATH
$ export MANPATH
create os user & initialize db cluster
$ adduser postgres
enter a password of your liking << postgrespassword >>
$ sudo su
$ mkdir /usr/local/pgsql/data
$ chown postgres /usr/local/pgsql/data
$ su postgres
$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
$ exit
$ exit
set-up an auto-start at login script
$ sudo cp /usr/src/postgresql-8.1.5/contrib/start-scripts/linux /etc/init.d/postgresql.sh
$ sudo chmod 755 postresql.sh
$ sudo update-rc.d postgresql.sh defaults
$ exit
reboot computer
$ sudo -u postgres /usr/local/pgsql/bin/createdb testdb
if postgresql install was succesful, you should have a response "CREATE DATABASE"
$ sudo -u postgres /usr/local/pgsql/bin/dropdb testdb
to delete the database
-------------------------------------------------------------------------
CPAN
-------------------------------------------------------------------------
Install CPAN
$ sudo perl -MCPAN -e shell
if it's the first ime CPAN is used, an initial configuration questionnaire is launched. Otherwise enter the following if you wish to redo the questionnaire.
cpan> o conf init
The default answer is probably appropriate most times.
Since I want to save space, I won't be keeping the source files.
Parameters for the 'make' command? --> "CC=gcc"
Parameters for the 'make install' command? --> "CC=gcc"
type q to exit the shell
when I ran the shell again... sudo perl -MCPAN -e shell ... I was asked again to do the inititial confiuration again! which I redid.
cpan> install HTML::LinkExtor
cpan> q
-------------------------------------------------------------------------
LedgerSMB
-------------------------------------------------------------------------
Install Ledger SMB. Here I'm using version 1.1.1d; change accordingly for newer version and/or another mirror.
$ cd /usr/temp
$ sudo wget http://superb-east.dl.sourceforge.net/sourceforge/ledger-smb/ledger-smb-1.1.1d.tar.gz
$ sudo gunzip ledger-smb-1.1.1d.tar.gz
$ cd /usr/src
$ sudo tar xf /usr/temp/ledger-smb-1.1.1d.tar
$ cd ledger-smb
$ sudo perl -w setup.pl
it will try to install DBI and DBD::Pg package if not already done
Create a regular Postgres user. Carefull with the case of the parameters when typing the commands... "-d" is not the same as "-D".
$ sudo -u postgres /usr/local/pgsql/bin/createuser -S -d -R -P ledger-smb
Enter password for new "ledger-smb" role just created: << PostgresRolePassword >>
Configure Apache to serve LedgerSMB
$ cd /etc/apache2
$ sudo cp /usr/src/ledger-smb/ledger-smb-httpd.conf ledger-smb.conf
$ sudo nano ledger-smb.conf
modify the paths at 3 places...
Alias /ledger-smb "/usr/src/ledger-smb/"
<Directory "/usr/src/ledger-smb">
AllowOveride All
AddHandler cgi-script .pl
Options ExecCGI Includes FollowSymLinks
Order Allow,Deny
Allow from all
</Directory>
<Directory "/usr/src/ledger-smb/users">
Order Deny,Allow
Deny from All
</Directory>
save & exit
$ sudo nano apache2.conf
add the following lines somewhere in the text...
# Ledger-SMB
Include /etc/apache2/ledger-smb.conf
save & exit
reboot computer
$ cd /usr/src/ledger-smb
$ sudo chown -hR www-data:www-data users templates css spool
-------------------------------------------------------------------------
Set-up a database and tables
-------------------------------------------------------------------------
Load your web browser and connect to
http://192.168.0.102/ledger-smb/admin.pl
This is your first time logging into LedgerSMB. Please set your administrative password
Select the "Database Administration" link,
enter the user you created in the previous step.
Host
Port
User ledger-smb
Password PostgresRolePassword
Connect to
Superuser
Password
Click on create Dataset
Create users and passwords to work in the created dataset.
Connect your web browser to http://192.168.0.102/ledger-smb/login.pl to start the application
if you get "You have chosen to open login.pl.... open with or save to disk" dialog... clear the browser cache
Your system now has user structure that looks like the following.
system user password
------- ---------------------- --------------
Linux root encrypted
Linux ubuntu * ubuntuPassword *
Linux postgres * postgrespassword *
Postgresql postgres * (superuser)
Postgresql ledger-smb * PostgresRolePassword *
Ledger SMB admin * adminPasword *
LedgerSMB ledgerUser1 * ledgerUser1Password *
LedgerSMB ledgerUser2 * ledgerUser2Password *
* or whatever names you choosed
--
Low Prices, Wide Selection of Gas Masks
Everyday low price guarantee. We offer special police discounts and an extremely wide selection of gas masks, filters and huge selection of preparedness gear.
http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=24e08df2353d2e6cb9bae3a0e3c8c61e