Adempiere install Suse

From ADempiere
Revision as of 19:02, 9 January 2012 by Stuartn (Talk) (Install Suse)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

This installation guide has been optimised for Adempiere 3.42 (stable) and Suse 11.1. Have fun! --Stuartn 21:24, 19 August 2009 (PDT)

Install Suse

You may choose a full Suse install, a Suse Studio minimum install or a special minimal install

Make sure to include a browser like MozillaFirefox and the latest postgresql, postgresql-contrib, postgresql-server, postgresql-jdbc (if you have it). A fresh install from DVD may not have all of these so you will need to add the Packman community repository and install the missing rpms after you build the system.

If you are doing a minimal install you might also want to ensure that you have bridge-utils, kwrite, dolphin, konqueror, okular, gcc, gcc++, make, automake, autoconf, kernel-source, kernel-syms, ark, Yast2-runlevel, NetworkManager and sysconfig. Perhaps you want to block or delete beagle, nepomuk and pulse-audio.

Get sun java-1.6.0_30 (the java se package from the Sun archive).

Furthermore, if you are installing in VirtualBox with a special minimal install then you will want to run Guest Additions so update your kernel if there is a more recent one, install kernel-source (for your new kernel or Guest Additions will fail!). With a minimal install, you will need to allocate 1024Mb RAM to VirtualBox once you get to the stage of starting Adempiere's application server, which means your host needs 2Gb.

Set paths

  • Open a Terminal
  • Navigate to your java virtual machine folder: eg. cd /usr/java
  • Look at the folders present: ls
  • Writedown the name of your java folder eg. /usr/java/java1.5.0_22
  • Edit your .profile file in your home directory: kwrite /home/<your user name>/.profile
  • Add the following exports (make sure there are no spaces before or after the = sign):
export ADEMPIERE_HOME=/opt/Adempiere
export JAVA_HOME=/usr/java/<name of your java folder>
  • Type su – <your user name >, then password. This causes a new shell and the .profile file to be reread.
  • Check your environmental variables with the commands:
echo $ADEMPIERE_HOME
echo $JAVA_HOME

Configure Postgresql

  • Using the same Terminal window (or a new one becoming root: su –)
  • Add a password for the postgres user: passwd postgres
    • Respond with the password: postgres
    • For a demo system ignor the criticism that it is a weak password
  • Start Postgres: rcpostgresql start
  • Become the postgres user: su - postgres
  • Log in to Postgresql database: psql postgres
  • Set the user password for the database (if this command doesn't work then you need to retype the two inverted comma characters):
ALTER USER postgres WITH PASSWORD 'postgres';
\q
  • Add a new super user called adempiere:
createuser -s -P adempiere
Respond with the password: adempiere
  • If you get the user wrong you can drop the user with: dropuser <user name>
  • Add a new database called adempiere with owner adempiere:
createdb adempiere  -O adempiere
  • Exit postgres user and remain as root: exit
  • Stop Postgresql database: rcpostgresql stop
  • Edit the pg_hba.conf file: kwrite /var/lib/pgsql/data/pg_hba.conf
  • Make all permissions trust as follows:
    • This is for a demo system on a single machine, a production or network installation would need to set these more carefully
local  postgres  all                   trust
#Ipv4 local connections
local  all       all                   trust
host   all       all  127.0.0.1/32	trust
#Ipv6 local connections
host   all       all  ::1/128	        trust
  • Quit kwrite
  • Exit root: exit
  • Exit terminal: File > Quit
  • Set the postgresql server to start automatically: use Yast: Configure Runlevels
    • Enable the Postgres Server (use the Expert tab - see runlevels 3 & 5 are set)
    • Manually Start the Postgres Server now
    • Close the Runlevels configuration

Download and install Adempiere files

  • Download the latest Adempiere. Download the file adempiere_???.tar.gz to your Documents (or somewhere else)

Ignore the following if you do not wish to apply patches

  • Download the latest Adempiere patches. Save each of these to a new folder adpatches in your Documents folder
  • Go to the section Detected installation problem in postgresql 8.3.5 and download the necessary substitution files to a new folder adsubstitutions in your Documents folder this is very important for all postgresql versions from 8.3.5
  • At the same Wiki page, pick the link to Adempiere scripts and download the latest Adempiere scripts.
    • Be sure to get the scripts from the postgresql sub-directory rather than the directory you first see when you click the link!
    • For the most recent version of each script, click download and save the resulting page in a new folder adscripts in your Documents folder. The browser's Save should automatically keep the right name for you
    • After downloading all the scripts, rename each of the files as just <number>.sql, for example 372.sql
      • Additional note for clarification: for a fresh installation you do not need the migration script from 3.4.0 to 3.4.2

Resart here: preparing Adempiere files

  • Open a new Terminal window:
  • Unzip Adempiere:
tar -xvvzf adempiere_???.tar.gz
  • Navigate to the Adempiere utils subdirectory: cd Adempiere/utils
  • Copy the UNIX template to an operating file:
cp RUN_UnixEnvTemplate.sh RUN_UnixEnv.sh

Ignore the following if you do not wish to apply substitutions and patches

Open File Manager and set twin windows

  • Navigate the first window to: adsubstitutions
  • Navigate the second window to: Adempiere/utils/postgresql
    • Copy all files from adsubstitutions to Adempiere/utils/postgresql
  • Navigate the first window to: adpatches
  • Navigate the second window to: Adempiere/lib
    • Copy patch files: from adpatches to Adempiere/lib
  • In Adempiere/lib, observe where the patches are immediately above the original files.
    • Rename the original files: append “-old” to each file that will be patched
    • Rename the new patch files: removing date descriptors so the names are the same as the original files
      • In a fresh installation, some of the patches may not have an original file, for example webuiOriginal-***.war

Restart here: Import the Adempiere dump database

  • Open a new Terminal
  • Become root: su -
    • Copy the Adempiere folder to /opt (note: remove any existing /opt/Adempiere or else you will end up with /opt/Adempiere/Adempiere) :
cp -rf /home/<your user name>/Documents/Adempiere /opt/Adempiere
  • Change the ownership of /opt/Adempiere to <your user name>
chown -R <your user name> /opt/Adempiere
  • Remain in Terminal as root

Still in Terminal as root:

  • Change to the Adempiere data directory: cd /opt/Adempiere/data
  • Type the following two commands:
psql -U adempiere -d adempiere -c "drop schema sqlj cascade"

(the above command should report that the schema doesn't exist - if the postgresql server is not running then you will need to manually start it)

psql -U adempiere -d adempiere -f Adempiere_pg.dmp >> dump_errors.log

(this will take a few minutes to run)

  • Exit root: exit

Connection test

  • Still in Terminal as your normal user
  • Navigate: cd /opt/Adempiere
  • Make the setup file executable: chmod 755 RUN_setup.sh
  • Execute the setup file: ./RUN_setup.sh
    • It is imperative that the connection parameters be got right at this stage. When the Test is without errors (shows OK in bottom left hand corner of form), click the Save button at the bottom right, accept the license condition. Wait a number of minutes (it is very slow) until the deployment is finished and the Adempiere Server Setup screen disappears don't be impatient!
    • Also, make a note of your computer name shown in Application Server
  • The environmental variables are:
Java Home: <your java location>            Java VM: sun
Adempiere Home: /opt/Adempiere
Application Server <your computer name*>	Server Type Jboss
Web Port 8080 (or 8888 if Apache uses 8080)	JNP Port 1099
Database Server: localhost			SSL 8443 (or 8448 if Apache uses 8443)
Database Name: adempiere			Database Type: postgresql
Database Port: 5432				DB Admin Password: postgres
Database User: adempiere			Database Password: adempiere

* For the Application Server you may need to run Network Settings and navigate to Hostname/DNS, and check the box "Assign Hostname to Loopback IP". On this tab you can also see your computer name (or alternatively just look in Computer: System Information)

  • For a demo system you only need to put a valid mail server and there is no need to change any other email settings:
Mail Server a.valid.mailserver		AdminEmail you@your.mailserver (or root@localhost)
Mail User you					Mail Password yourpasswd

After you have a successful Test (receive OK in the bottom left hand corner) then SAVE. Deployment will commence. Eventually the Setup screen will disappear and you will be returned to the terminal.

Import Adempiere Database

  • Navigate to the utils subdirectory: cd utils
  • Make the data import command executable: chmod 755 RUN_ImportAdempiere.sh
  • Execute the data import command: ./RUN_ImportAdempiere.sh
    • This will take a few minutes and generate a lot of output information. You can ignore safely warning and notices but if the output has errors then the issues need to be fixed

Ignore the following if you do not wish to run migration scripts

  • Change to root: su -
  • Navigate to adscripts: cd /home/<your user name>/Documents/adscripts
  • List the scripts: ls
  • Use the following command to run each script in order starting at the lowest number:
psql -f <number>.sql adempiere adempiere
  • Exit the root user: exit

Run the application server

  • You should now be a standard user back in /opt/Adempiere/utils, if not change to it: cd /opt/Adempiere/utils
  • Make the application server command executable: chmod 755 RUN_Server2.sh
  • Execute the application server command: ./RUN_Server2.sh
    • If you terminate with an error at the end of the terminal trace "adempiere error initializing c3po ..." then you need to ensure that ports 8080 and 8443 are open in the firewall (if you are not using yast2-firewall then directly edit /etc/sysconfig/SuSEfirewall2 by finding the line with FW_SERVICES_EXT_TCP and including the ports 8443 and 8080, for example to FW_SERVICES_EXT_TCP="443 80 8443 8080"
    • This will take 1 to 2 minutes and end with omething like "23:48:02,803 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 1m:30s:950ms" although if your email was not fully set up it may persist with some failures in sending emails
    • If you are in VirtualBox, check that the server really is running and you have not exceeded allocated memory
    • Leave the server running, do not click within the window as it may stop the server with no external sign that this has occurred
    • Minimize the server terminal window

Run the java client

  • Open a new Terminal
  • Change to the Adempiere directory: cd /opt/Adempiere
  • Make the client command executable: chmod 755 RUN_Adempiere.sh
  • Execute the client command: ./RUN_Adempiere .sh
    • On the first occasion, it will be necessary to set the following connection variables
    • This is where you need your computer name that you wrote down above (or you need to look it up)
Application Host: <your computer name>
Application Port 1099
Connection LAN
Database Type postgresql
Database Host localhost
Database Port 5432
Database Name: adempiere
User: adempiere 	Password: adempiere
  • Log on as SuperUser/System and then as GardenAdmin/GardenAdmin.
    • Various login and password combinations are shown in the help tab as follows:
      • System SuperUser: SuperUser/System or System/System
      • Standard Supervisor and User: GardenAdmin/GardenAdmin or GardenUser/GardenUser
  • Exit the client when finished.

Shut down application server

While the application server can be stopped by crashing it, which is the standard method in Windows, Linux prefers the server to be shut down in an orderly way.

  • Open a new Terminal
  • Change to the Adempiere utils directory: cd /opt/Adempiere/utils
  • Make the application server stop command executable: chmod 755 RUN_Server2Stop.sh
  • Execute the application server stop command: ./RUN_Server2Stop.sh

Create desktop links to applications

  • Open File Manager: navigate to Desktop
  • Create link called “Start App Server” to point to /opt/Adempiere/utils/RUN_Server2.sh with working directory /opt/Adempiere/utils/
    • In advanced options set this to run in terminal and the terminal to remain open when the application finishes
  • Create link called “Stop App Server” to point to /opt/Adempiere/utils/RUN_Server2Stop.sh with working directory /opt/Adempiere/utils/
    • Don't set this to run in Terminal
  • Create link called “Start Adempiere” to point to /opt/Adempiere/RUN_Adempiere.sh with working directory /opt/Adempiere
    • Don't set this to run in Terminal
  • Drag these three shortcuts directly onto the desktop so icons are formed.