Installing on Slackware Linux

From ADempiere
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. Follow the installation instructions as given in the download page and then double check your work.

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'

Run ldconfig and then check for errors:

cd /usr/lib/postgresql
ldd pljava.so

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 screenshot

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). I do know that once an installation has succeeded, this edit is never again necessary.

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 2>/tmp/importDB.err
(Examine importDB.err.  There MUST 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
./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_Server2.sh &

Do NOT terminate this unless something is wrong! Because it will not return to a command prompt, just leave terminal 5 running RUN_Server2.sh. 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

Hardware and Configuration

Now that ADempiere has been up and running for three weeks, here are some observations and recommendations.
Our demo site's computer runs an AMD Athlon 1400 with 512 megs of RAM. This proves to be insufficient even for a demo. Starting the server takes 2m:25s, during which 'top' says the CPU is essentially maxed out by java. On a testbed machine at home an Intel dual core CPU running at 2.8 and with 1 gig of RAM takes 29s to RUN_Server2.sh, during which 'top' shows a maximum of 80% CPU usage.
Knowledgeable people recommend a more robust SQL Server than Posgres, but my limited experience indicates that java is the choke, so I would do everything possible to give java enough resources to accomplish its tasks with alacrity.
To use ADempiere under Postgres in a production environment, I would use at least 2 dual core CPUs with at least 4 gigs of RAM and enable HIGHMEM in the kernel, making certain that Postgres could use all available RAM. Because SATA drives are not hot swappable, if a SCSI hard drive had sufficient capacity to contain the entire /var directory, I'd install a RAID interface and set up hardware RAID1. If a single SCSI drive proved too small, I'd opt for a SATA drive with a 5 year warranty instead, foregoing hot swap capablity but still mirroring it in hardware. Note: the home ("testbed") system referred to above uses four SATA 3 drives in a software RAID5 configuration so I have a valid basis for recommending a hardware RAID solution over Linux software RAID.
For a file system, I think I'd select IBM JFS, although I have no experience with it. The /var mount would include a NOATIME option.
It is troublesome that RUN_Server2.sh will not return a command prompt. If the computer ever needed a reboot, there seems no way to start the server except to have RUN_Server2.sh be the last thing in rc.local and then never login on terminal one. Surely the developers can solve this issue...
The host machine would run neither an HTTP nor an SMTP server. Email would be done by giving the Adempiere server an account on a computer where an SMTP server is running. By avoiding an HTTP server, the default ports could be used, which would solve my Shopping Cart issue and might solve my Jboss problem (see Unresolved Issues below).

Running ADempiere

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

The postgres serverlog contains an error message
"ERROR: syntax error at or near "Free_MB" at character 68"
followed by
"STATEMENT: SELECT Tablespace_Name, COUNT (*) AS Pieces, SUM (bytes)/1024/1024 Free_MB, MAX (bytes)/1024 Largest_kB, ROUND(MAX (bytes) / SUM (bytes),2) * 100 Ratio, SUM (blocks) Free_Blocks, MAX (blocks) Largest_Blocks, ROUND(SQRT (MAX (blocks) / SUM (blocks)) * (100 / SQRT (SQRT (COUNT (blocks)))),2) Fragmentation_Index FROM DBA_Free_Space GROUP BY Tablespace_Name"
I have no idea how to fix that.

We want Adempiere available to anyone - especially salemen - 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.
--
Since this is a wiki, it should go without saying, but please feel free to correct errors, provide additional information, and whatever else - except delete all my hard work - that you wish.
gypsy 6 June 2007, updated 26 June 2007