Openbravo 2.40 - installatie

Uit DeVliegendeWiki

Ga naar: navigatie, zoeken

Dit artikel beschrijft een beproefde installatie van Openbravo op Ubuntu Server. Zie Openbravo - Configuratie voor het vervolg op dit document.

Inhoud

Versies & ondersteuning

  • Huidige versie van OpenBravo (Jan. '09):
  • Ondersteunde operating systems: Microsoft Windows 2000, XP en Vista, Debian/Ubuntu, Red Hat, CentOS, Gentoo, Suse, FreeBSD, OpenSolaris en Solaris10. Enkel de volgende operating systems zijn daadwerkelijk door OpenBravo zelf getest: Windows XP, Ubuntu en Red Hat.
  • PostgreSQL: Versie 8.1.4 of hoger. OpenBravo 2.4. ondersteunt versie 8.3.x
  • Java 2 Platform Standard Edition (SE) 1.5 (vaak aangeduid als JDK 5.0) of versie 1.6 (vaak aangeduid als JDK 6.0). De OpenBravo installatie-handleiding beperkt zich tot versie 1.5.
  • Apache Tomcat 5.5 of hoger. Let op: Sommige documentatie van OpenBravo noemt Tomcat 5.0. Wellicht is dat foutief.
  • Apache Ant 1.6.5 of hoger

Handleidingen

Installatie Ubuntu Server

  • Ubuntu Server vanaf CD installeren. Dan heb je een vrij kaal OS zonder GUI.
  • Gnome installeren met
sudo apt-get install ubuntu-desktop
  • Installeer OpenSSH:
sudo apt-get install openssh-server openssh-client
  • Er hoeven geen firewall-instellingen gewijzigd te worden. Verifieer dat OpenSSH werk:
ssh localhost

PostgreSQL

  • Voor Openbravo 2.4 bij voorkeur PostgreSQL 8.3 of nieuwer gebruiken. Zie http://www.postgresql.org voor details.
  • Installatie: bv.:sudo apt-get install postgresql-8.3. Het lijkt erop apt-get automatisch de nieuwste versie binnen de aangegevens reeks kiest.
  • Op Ubuntu Server hoef je geen initiele database aan te maken
  • Start de PostgreSQL-client: sudo su - postgres -c psql. Vermoedelijk is dit een methode om 'met geweld' de client te starten, buiten het gebruik van een wachtwoord-procedure. De loginnaam is postgres, ook al lijk je niet zelf daarmee te kunnen inloggen.
  • Verander het wachtwoord: alter role postgres with password 'new_password';
  • Verlaat de PostgreSQL-client met \q
  • Je kunt binnen de PostgreSQL-client gedefineerde gebruikers opvragen met select * from "pg_user";.
  • Herstart PostgreSQL: sudo /etc/init.d/postgresql-8.3 restart

Java

sudo apt-get install sun-java6-jdk

Tomcat

Dit artikel is gebaseerd op input Dalox

  • Download laatste versie, optie core, naar map Documenten, en pak deze uit
  • Hernoem de Tomcat-hoofdmap tomcat.
  • Verplaats deze map naar /usr/share. Om in /usr/share te kunnen schrijven, heb je root privileges nodig, welke Ubuntu niet kent. Daarom is 't 't handigste om het verplaatsen vanuit de shell te doen, bv. met sudo mv tomcat /usr/share.
  • Maak een gebruiker aan met sudo /usr/sbin/useradd tomcat gevolgd door chmod +x /usr/share/tomcat/bin/*.sh
  • Pas de rechten op de map tomcat aan naar user: sudo chown <username>:<group name> -R /usr/share/tomcat. Username & group name verwijzen naar het account waarin Openbravo en de bijbehorende technology stack draait.
  • Tomcat starten: Dit moet later gecopieerd worden naar een startup-script, zodat Tomcat bij een systeemstart automatisch geladen wordt.
/usr/share/tomcat/bin/startup.sh

Ant

  • Download de meest recente versie (Feb. 2009: 1.7.1) naar map Documenten. Deze uitpakken en hernoemen naar ant.
  • Copieren naar /usr/share, bv. vanaf de shell met sudo mv ant /usr/share.

Omgevingsvariabelen defineren

Voeg toe aan /etc/profile, bv. mbv. sudo gedit /etc/profile &:

#JAVA OB
JAVA_HOME=/usr/lib/jvm/java-6-sun
CLASSPATH=.:$JAVA_HOME/src.zip
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH

#Tomcat
CATALINA_HOME=/usr/share/tomcat
CATALINA_OPTS="-server -Xms256M -Xmx1024M -XX:MaxPermSize=256M"
export CATALINA_HOME CATALINA_OPTS

#Ant
ANT_HOME=/usr/share/ant
PATH=$ANT_HOME/bin:$PATH
export ANT_HOME PATH

Daarna de computer opnieuw opstarten (al is in- en uitloggen wellicht al voldoende)

Openbravo

Installer

  • Indien je de installer gebruikt, heb je slechts een binary-bestand. Deze plaatsen in de map Documenten, behorende bij het account dat je gebruikt voor Openbravo.
  • Start de installer met chmod +x <bestand> en ./ <bestand>
  • Nadat je alle gegevens hebt ingevoerd, kan installatie een uur duren.

Compileren

Informatie rechtstreeks afkomstig van Dalox:

Om te compilen moet je in de terminal gaan naar het het mapje /home/.../OpenbravoERP/Appsopenbravo (hier staat het build.xml bestand.)

  • ant core.lib -> Compiles the core components of the MVC Framework. It generates openbravo-core.jar.
  • ant wad.lib -> Compiles WAD. It doesn't generate windows. It just compiles WAD itself. It generates openbravo-wad.jar.
  • ant trl.lib -> Compiles the translator. It generates openbravo-trl.jar.
  • Wad: Building of windows from dictionary
  • Java compilation: Compilation of every java file

If you execute <ant compile> the wad step will try to rebuild every window.

If you execute <ant compile.complete>, all the built windows will be erased and rebuilt.

If you execute <ant compile -Dtab=order> the wad step will try to rebuild only the windows containing 'order' in their name.

So, if you type <ant compile -Dtab=xx> wad probably won't build any window (unless there is a window with xx in it's name). You'll probably want to compile as less as possible (otherwise you'll waste time).

I stress that this is very simplistic. The wad process does other things appart from building windows. As a rule of dumb:

  • If you've changed the whole database: <ant compile.complete>
  • If you've changed one window in dictionary: <ant compile -Dtab=windowname>
  • If you've changed code (processes, forms...): <ant compile -Dtab=xxxxx>
  • ant war deploy (build war file and copy to tomcat)

Login

  • Default username/password: Openbravo/openbravo (dus username met hoofdletter en wachtwoord zonder).
Persoonlijke instellingen