[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installation issues



Ok, I have it solved now. 
LedgerSMB 1.4.11 running on Ubuntu Server 14.04 LTS. 

The process to install is as follows. 
Thanks to Francewhoa for some hints on Debian-Wheezy 
http://ledgersmb.org/topic/installing-ledgersmb-14101-debian-wheezy-7x
I've copied a lot of the text from the above URL and made changes appropriate for Ubuntu Server 14.04 LTS.
Those changes in the below text compared to the above URL I based on some notes I made during the install. 
There might be some mistakes, or bits I've missed out. :-)

Please feel free to share or use this process however you please. 

<process>
System requirements
* Ubuntu Server 14.04.2 LTS amd64 with only the SSH Server installed. 
	(Assumes apt-get update and apt-get upgrade have been run after the initial install, but other than that everything else required is in the process below)
* Apache v2.4.7	(This will be installed)
* PostgreSQL 9.3	(This will be installed)
* Perl 5.18.2		(Perl comes with Ubuntu Server 14.04.2)

Steps

Using Terminal as sudo run the following command to install the required Perl-modules, required Texlive-modules, and their required dependencies

apt-get install libdata-dumper-simple-perl perl-modules liblocale-maketext-lexicon-perl libdbi-perl libdbd-pg-perl libconfig-any-perl libmime-lite-perl libhtml-linkextractor-perl libnet-tclink-perl libparse-recdescent-perl libmodule-build-perl libuuid-perl liblocale-gettext-perl libyaml-tiny-perl libtext-iconv-perl libtext-charwidth-perl libmodule-install-perl liblatex-driver-perl libclass-std-perl libconfig-std-perl

Using Terminal as sudo run the following command to install the required texlive modules, and their required dependencies. Note that this will download ~1,949 MB and could take long time.

apt-get install texlive-fonts-extra texlive-latex-extra-doc texlive-lang-all texlive-latex-extra texlive-fonts-recommended texlive texlive-doc-en texlive-generic-extra

Using Terminal as sudo run the following command to install the required Apache, and related packages

apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert build-essential

Using Terminal as sudo run the following four line of commands to install LedgerSMB 1.4.10.1
cd /tmp

wget http://downloads.sourceforge.net/project/ledger-smb/ledgersmb/1.4.11/ledgersmb-1.4.11.tar.gz

tar xvfz ledgersmb-1.4.11.tar.gz

mv ledgersmb /usr/local/
cd /usr/local/
mv ledgersmb ledgersmb.1.4.11
ln -s ledgersmb.1.4.11 ledgersmb

In the following steps we will configure Apache for LedgerSMB

Using Terminal as sudo run the following command to get full access to Apache
chown -R www-data:www-data /usr/local/ledgersmb
chown -R www-data:www-data /usr/local/ledgersmb.1.4.11

cd /usr/local/ledgersmb

Using Terminal as sudo run the following command to connect Apache server with the appropriate config-files
sed -e "s|WORKING_DIR|$PWD|g" /usr/local/ledgersmb/ledgersmb-httpd-2.4.conf.template > ~/ledgersmb-httpd.conf
mv ~/ledgersmb-httpd.conf /etc/apache2/conf-available/ledgersmb-httpd-2.4.conf
cd /etc/apache2/conf-enabled
ln -s ../conf-available/ledgersmb-httpd-2.4.conf ledgersmb-httpd.conf

Using Terminal as sudo run the following command to enable "mod_rewrite" Apache module
a2enmod rewrite
Using Terminal as sudo run the following command to enable "mod_cgi" Apache module
a2enmod cgi

Using Terminal as sudo run the following command to restart of Apache
service apache2 restart

Using Terminal as sudo run the following command to do some modifications of the configuration-files
mv /usr/local/ledgersmb/ledgersmb.conf.default /usr/local/ledgersmb/ledgersmb.conf

Using Terminal as sudo run the following command to restart of Apache again
service apache2 restart

Using Terminal as sudo run the following 3 command lines to validate the installation
cd /usr/local/ledgersmb

perl Makefile.PL

Terminal will return the following message
"Auto-install the 12 mandatory module(s) from CPAN?"

y

Terminal will return the following message
"Auto-install the 4 optional module(s) from CPAN?". "Starman, CGI::Emulate::PSGI, Plack::Builder, Plack::Middleware::Static"

n

Terminal will return the following message
"Auto-install the 1 optional module(s) from CPAN?". "Image::Size"

y

Terminal will return the following message
"Auto-install the 1 optional module(s) from CPAN?". "X12::Parser"

y

Terminal will return the following message
"Auto-install the 2 optional module(s) from CPAN?". "Template::Plugin::Latex, TeX::Encode"

y

Terminal will return the following message
"Auto-install the 2 optional module(s) from CPAN?". "XML::Twig, OpenOffice::OODoc"

y

Using Terminal as sudo run the following command to resume the compile from source procedure, and install dependencies

make

Answer y to the following tools in the XML::Twig module
xml_pp
xml_grep
xml_split
xml_merge
xml_spellcheck

Terminal will return the following message
"- Your preferred file format is [2] (OOo=1 ODF=2)."
"Is that OK (y/n) ?"

y

Using Terminal as sudo run the following command to install "Template::Latex" and its dependencies

apt-get install libtemplate-plugin-latex-perl

cpan -i Test::Pod::Coverage

cpan -i Test::Pod

Notes
* Template::Latex is included in Template::Plugin::Latex which is now included in Debian as libtemplate-plugin-latex-perl.
* That command can take a long time. When done it will return the message "PASS".

Using Terminal as Root run the following command to run "test" and resume the compile from source procedure, and install dependencies

make test

Using Terminal as sudo run the following command to install the Perl-files LedgerSMB put on Apache

cd /usr/local/ledgersmb

sh install.sh

Terminal will return the following message
"Would you like to configure as much as possible automatically?"

yes

Terminal will return the following message
"Would you like me to automatically choose some CPAN mirror sites for you? (This means connecting to the Internet)"

yes

Terminal will return the following message
"Auto-install the 4 optional module(s) from CPAN? [n]"
"- Starman ...missing."
"- CGI::Emulate::PSGI ...missing."
"- Plack::Builder ...missing."
"- Plack::Middleware::Static ...missing."

n

Terminal will return the following message
"Which user does your web server run as?"

www-data

Notes: Make sure you do not add any space. Type in "www-data" as is without the quotes.

Terminal will return the following message
"Where do we copy the ledgersmb-httpd.conf file to?"

/etc/apache2/conf-available

Note: Ensure there are no space

Using Terminal as sudo run the following command to restart of Apache again

service apache2 restart

Using Terminal as sudo run the following 2 commands to install and configure Posgresql.

apt-get install postgresql postgresql-client postgresql-contrib libaprutil1-dbd-pgsql

Using the Terminal as sudo, set the password for the Ubuntu user postgres

passwd postgres

su postgres -c psql template1

Terminal will now read as following. This means you successfully entered PosgreSQL.
"postgres=#"

The next command changes the password for the PostGreSQL username of postgres. In that command replace with a password of your choosing. Keep the two 'apostrophes'. To reduce the risk of errors, you password must be lower case, letter and numbers only, no symbols, and less than 16 characters. For testing purposes I have suggested using postgres as the password. You can do the same and change it later, or pick another password. 

ALTER USER postgres WITH PASSWORD 'postgres';

Run the following command to leave PosgreSQL. This will also alter the password for within the database. Then return you to Ubuntu Terminal.

\q

You are now at the Ubuntu postgres user prompt. 
Type exit to return to your Ubuntu normal user prompt. 

Using Terminal as sudo run the following command to create ledgersmb database who has full rights on the database with user ledgersmb

adduser ledgersmb

Using Terminal run the following command to switch to "postgres" user

su postgres

Using Terminal as "postgres" user run the following command to create a PostGreSQL ledgersmb user

createuser -D -A -P ledgersmb

Terminal will return the following message.
"Enter password for new role:"
Type in a password. To reduce the risk of errors, you password must be lower case, letter and numbers only, no symbols, and less than 16 characters.

createdb -O ledgersmb ledgersmb

Terminal will return the following message.

Fix the permissions of the /tmp/ledgersmb directory

chmod 777 /tmp/ledgersmb

So you can access ledgersmb from another computer you need to edit the apache config for ledgersmb. 
In a text editor such as vi, open up the ledgersmb apache config /etc/apache2/conf-available/ledgersmb-httpd-2.4.conf
Look for the lines 
 Require ip 127.0.0.1
 Rrequire host localhost
 Require all denied

Change them to be
  #Require ip 127.0.0.1
  #Require host localhost
  Require all granted

Now a word of caution. That change opens up ledgersmb to be connected to from all computers on the same network. 
If your ip address of your PC is 192.168.0.80, then you can change the words 'all granted' to be 'ip 192.168.0.80'
See this site for more info. 
http://httpd.apache.org/docs/2.4/en/howto/access.html 

Still using Terminal as sudo run the following command to reboot your system and resume activating all the above actions

reboot

In the following steps we will setup LedgerSMB

Using your favorite modern web browser such as Iceweasel go to http://<ip_of_ubuntu_server>/ledgersmb/setup.pl (link is external)

Notes
* The name for the company database can only contain letters, digits and underscores;
* Additionally, it must start with a letter;
* Company database names are case insensitive, meaning you can't create two separate company databases called 'Ledgersmb' and 'ledgersmb'."

For the password you type give the password you gave above when you set the database user's password in the database ('postgres' was the example password given).

For the database (=database of the organization) you can choose the company by yourself: type name of Company/Organization, in this example mycompany

Click on "login" button

On the next page select yes and click on "next" button

Then you are directed to the "Database Management Console" page (This could take several minutes because the database for the company will be made)

Choose a language from scroll down menu, such as "us"

Then "Next" button

On the next page, select a option from the scroll-down menu. The default "General.sql" option is best option to see all features.

Click on "Next" button

On the "Enter User" page fill in the data needed according to your choice:

Import: "no"
Assign permission: "choose full permissions"

Click on "Create User" button

On the next screen click on "Start Using LedgerSMB" link

On the log-in page fill here in the data you already have inserted according to the previous pages

Note that the next time you want to login LedgerSMB go to http://localhost/ledgersmb/login.pl (link is external)

Click on "Login" button

On "Preferences for ***" page, for security reason, you should change your password. Also you can modify your preferences in the listed formats.

</process>

Regards

Andrew Dent

-----Original Message-----
From: Andrew Dent [mailto:..hidden..] 
Sent: Monday, 8 June 2015 12:01 PM
To: ..hidden..
Subject: Re: [Ledger-smb-users] Installation issues

I tried a fresh Debian Jesse VM. 
Using the GUI package manager to install ledgersmb locked up the package manager. It appeared that the cause was the packager manager didn't install all the dependencies. 
Using apt-get install ledgersmb from a root prompt, and I got further. 
Everything seemed to install but with a failure at the end. Couldn't see the description of why. 
Anyway, pressed on with a browser and I found I had to enable apache rewrite and apache cgi. 
I feel the installer should have done both of those. 
Then there were authentication problems when I started to use ledgersmb from a browser. 
It was at this point I gave up on Debian as it seemed no better than using Ubuntu Server. 
My preference is to use Ubuntu Server as I don't need a GUI, and to use the Ubuntu Server 14.04 LTS. 
I'd also prefer to use the latest version of ledgersmb, not 1.3.40 which was installed on Jesse. 

Regards

Andrew

-----Original Message-----
From: Robert James Clay [mailto:..hidden..]
Sent: Sunday, 7 June 2015 1:28 AM
To: ..hidden..
Subject: Re: [Ledger-smb-users] Installation issues

On Sunday, March 02, 2014 01:59:06 PM Robert J. Clay wrote:
> On Sun, Mar 2, 2014 at 10:21 AM, Benedict White
>
> > Another thing, when installing on Debian, it does ask you to set up 
> > users for postgress inlcuding a ledgersmb account which does not 
> > have sufficient privalidges to add databases. ....
> 
>   There is both a Debian and a Ubuntu bug regarding that issue (which 
> I will be fixing when I find a good way to do so);

    That has been resolved and released with the Debian package version v1.3.46-1, which is available in Debian 'unstable' and 'testing' and now (as
1.3.46-1bpo8+1) in 'jessie-backports'.  It is also currently available in Ubuntu 'wily'.



RJ Clay
..hidden..







------------------------------------------------------------------------------
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users

------------------------------------------------------------------------------
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users

------------------------------------------------------------------------------
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users