Installing on Slackware Linux

From ADempiere
Revision as of 18:07, 6 June 2007 by Gypsy (Talk) (From here on you're running X)

Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

The Slackware version used is 11.0 and the ADempiere version is 3.2.0.

All packages except PostgreSQL are available in the standard Slackware 11.0 distribution.

Install from the /extra directory the jdk-1_5_0_09-i586-1.tgz Make sure these packages are installed. They are all in Slackware-11.0:
cyrus-sasl >= 2.1.22-i486-1
glibc-solibs >= 2.3.6-i486-6
libtermcap >= 1.2.3-i486-6
openldap-client >= 2.3.27-i486-1
openssl >= 0.9.8d-i486-1 | openssl-solibs >= 0.9.8d-i486-1
python >= 2.4.3-i486-4
readline >= 5.1-i486-1
tcl >= 8.4.13-i486-2
zlib >= 1.2.3-i486-1

Download the source to postgreSQL: v8.2.4 source

Download the slackbuild from slacky.eu or from complete SlackBuild An installable package can be downloaded from the adempiere directory on yesican (ftp://yesican.chsoft.biz/pub/adempiere). The PostgreSQL login and group are both pgsql (numeric 73).

Download and install requiredbuilder because this SlackBuild requires it. Find the latest version via google.com/linux or download the package from requiredbuilder binary

Put these files all in the same directory:
the pgSQL source tarball
postgresql.SlackBuild
doinst.sh.gz
slack-desc
rc.pgsql.gz

From that directory, build (run postgresql.SlackBuild --cleanup) and install the resulting postgreSQL package. You may decide to put your files elsewhere, but for this installation the existing /var/db directory was used. If you use a different path then modify /etc/rc.d/rc.pgsql and substitute your information below. Complete the pgSQL installation by
su pgsql
initdb -D /var/db/pgsql/data
postgres -D /var/db/pgsql/data >/var/log/pgsql/serverlog 2>&1 &

Check the serverlog file for errors. If there aren't any, stop postgres.

NOTE: Slackware 11.0 uses a 2.4.33.3 kernel. Append these lines to /etc/sysctl.conf:

\# Adempiere with postgreSQL:
\#kernel.shmall = 2097152
kernel.shmmax = 2147483648
\#kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
\#fs.file-max = 65536
\#net.ipv4.ip_local_port_range = 1024 65000

Run /sbin/sysctl -e -p /etc/sysctl.conf

Download and install pljava: Get the binary from the link at the top of this page: download pljava or get it from here.

Unzip and put pljava.jar into /usr/lib/java/lib and pljava.po into /usr/lib/postgresql Check ownership and especially permissions.

Tell postgres about this by modifying /var/db/pgsql/data/postgresql.conf:
dynamic_library_path = '/usr/lib/postgresql'
custom_variable_classes = 'pljava'
pljava.classpath = '/usr/lib/java/lib/pljava.jar'

It probably isn't needed, but run ldconfig anyway.

NOTE: We want this to work the first time, so security is trashed in favor of functionality. YOU MUST NOT RUN WITH THIS SETUP, please!

Edit /var/db/pgsql/data/postgres.conf so pgSQL listens on all interfaces.

Edit /var/db/pgsql/data/pg_hba.conf so it ends like this (substitute your LAN IP):
\## IPv6 local connections:
\#host all all  ::1/128 trust
host template1 postgres 192.168.1.2/32 trust
host adempiere adempiere 192.168.1.2/32 trust
\# LAN access:
host adempiere adempiere 192.168.1.0/24 trust
\## World access:
\#host adempiere all 0.0.0.0/0 trust

Start pgSQL (/etc/rc.d/rc.pgsql start) and make sure it is running. tail /var/log/pgsql/serverlog

Create a postgres role with SUPERUSER CREATEROLE CREATEDB and LOGIN
Create an adempiere role with SUPERUSER CREATEROLE CREATEDB and LOGIN

Extract the AdempiereVERSION.tar.gz into /opt
Make sure all files are owned by root.root
Make sure all .sh files have permissions 755:

find . -name "[!-]*.sh" -exec chmod 755 {} \;

Edit /opt/Adempiere/RUN_setup.sh so ADEMPIERE_HOME is defined.

From here on you're running X

startx and run ./RUN_setup.sh.
Change Web port 80 if you run a web server on this computer. Since we are root, we can use any port we wish except 80 so we set it to 8.
Change SSL port 443, we used 8443.
Change Database type to Postgresql
Make Database name and Database user both adempiere
Set all passwords the same using at least 6 characters
Database search should become adempiere.
See a screenshot of the setup screen we used screnshot

Create the sample database:
Even though it is named Adempiere_pg.jar it is a zip file, so after extracting the AdempiereVERSION.tar.gz, unzip Adempiere/data/Adempiere_pg.jar into /tmp.

I'm not sure it is required but I edited the resulting .dmp file, replacing all instances of postgres with pgsql. (:%s/postgres/pgsql/g in vi).

su pgsql
createuser -E -d adempiere
(Say y. The instructions say to use -P but I want a blank password.)
createdb -E UTF8 -O adempiere adempiere
psql -d adempiere < /tmp/Adempiere_pg.dmp
(There should be no errors.)
exit

To install a patch, copy patchesWHATEVER.jar into /opt/Adempiere/lib/patches.jar:
cp patches_3.2_20070505.jar /opt/Adempiere/lib/patches.jar
You need to run RUN_setup.sh to complete the patching process.
cd /opt/Adempiere
and then
./RUN_setup.sh This can take a few minutes so please be patient. You should see patches.jar in the xterm output.

At the console

In order for Adempiere to work, ~utils/RUN_Server2.sh must be running, so login root on terminal 5 and
cd /opt/Adempiere/utils
run
./RUN_Server2.sh
Do NOT terminate this unless something is wrong! Leave terminal 5 running it. Experimentation with ^Z and bg are not promising. If you wish to stop this process:
cd /opt/Adempiere/utils
./RUN_Server2Stop.sh

Edit /opt/Adempiere/RUN_Adempiere.sh and make the top look like this:
\# $Id: RUN_Adempiere.sh,v 1.18 2005/07/21 16:44:54 jjanke Exp $
ADEMPIERE_HOME=/opt/Adempiere ; export ADEMPIERE_HOME

In X, run /opt/Adempiere/RUN_Adempiere.sh

From a computer on the lan, run a web browser to this url:
http://myserver.mydomain.tld:8/
where ":8" is the Web port set during RUN_setup.sh

To backup the sample database:
md /PATH/TO/backups
chown pgsql.pgsql /PATH/TO/backups
su pgsql
pg_dump adempiere >/PATH/TO/backups/adempiere.dmp
exit

You may want to shrink it:
cd /PATH/TO/backups
tar cjf adempiere.tbz2 adempiere.dmp
rm adempiere.dmp

Restore is
su pgsql
psql adempiere < /PATH/TO/backups/adempiere.dmp
The above does not create adempiere DB nor does it restore users, Etc.

Unresolved Issues

We want Adempiere available to anyone who has a login name and password, but attempting to configure Jboss to WAN results in an error message. The "try this" link (http://ns.chsoft.biz:8/admin/adempiereHome/adempiereDirect.jnlp) installs software on the user's computer but it works best for us for now.

When clicking the LOGIN button in the Web Store, port 8 is omitted from the URL so the login fails.
--
gypsy 6 June 2007