TurnKey Linux Virtual Appliance Library

OpenERP 6.1 and TKL 12

Hello

re-opening this subject... I was planing to start with the base TKL 12 image and install OpenERP on it.

Good idea ? Any advice / suggestion ?

Jeremy's picture

Looks pretty straight forward

The docs seem pretty complete for installation. Hopefully all goes smoothly, if you have troubles just remember that TKL v12.x is based on Debian 6 now.

The only thing I'd add, is perhaps it'd be better to start with the TKL PostgreSQL appliance instead? Assuming that you'll want to backup with TKLBAM...

L. Arnold's picture

Can you backup PosgreSQL already with TKLBAM

I thought it was still in development..

Jeremy's picture

AFAIK it's been available for some time...

Although I actually don't use any appliances with PostgreSQL so I'm not 100% sure... IIRC it was released just before v12.

[Update] As of 25/01/2013 TKLBAM does not currently support the PostgreSQL appliance (or any other appliances that use databases other than MySQL) OOTB. However, using the TKLBAM pre and post backup/restore hooks to dump/insert the DB and the --force-profile switch (to avoid the warning) it can be configured to work.

Good point about starting

Good point about starting with the TKL PostgreSQL - indeed TKLBAM is one of the key reason to use Turnkey :) ....


L. Arnold's picture

I would to for OpenERP 7 now that it is available.

For OpenERP 6.1 on Lucid this for sure would be good guidance:

http://www.theopensourcerer.com/2012/02/how-to-install-openerp-6-1-on-ubuntu-10-04-lts/

for  OpenERP 7.0 on Squeeze this should be good guidance:

http://www.vionblog.com/install-openerp-7-0-from-trunk/

 

You could use wget from this Site once you figure out which folder you want at OpenErp

http://nightly.openerp.com/7.0/

This is very much on my todo list.  7.0 seems really good.  I had 6.03 running for a year with a test link to Magento and it was ok, but the 7.0 build seems really really usable.  Who knows about the Magento link but there are folks who can get it done.

L. Arnold's picture

Also even more succinct instructions here;

http://lathama.net/Installing_OpenERP_7_on_Debian

(text from the llathama ink is basicaly:)

OpenERP or also known as OpenObject is Open Source Software written in Python starting over 13 years ago by Fabien Pinckaers (pinky) for his father and later his uncle's businesses. Today OpenERP provides the infrastructure for huge swaths of the manufacturing, hospitality, and other industries.

  1. Super Easy install...

  2. user@:~$ su

  3. root@:~# echo "deb http://nightly.openerp.com/7.0/nightly/deb/ ./" >> /etc/apt/sources.list

  4. root@:~# aptitude update && aptitude && upgrade && aptitude clean

  5. root@:~# aptitude install openerp

  6. Accept the package by typing yes and hitting enter. Will update this with a key addition.

  7. Developers and curious folks can run: root@lappy4:~# tail -f /var/log/openerp-server.log

  8. Open http://127.0.0.1:8069/ in a webbrowser

  9. Follow the super simple instructions.

  10. Profit!

Jeremy's picture

A few adjustments...

I'm not sure whether that would work without a few extra steps. So here's how I'd do it on TKL:

echo "deb http://nightly.openerp.com/7.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/openerp.list
apt-get update && apt-get upgrade && apt-get install openerp

Open http://<appliance-ip-or-FQDN>/ from a web browser to complete install...

The change to the first line are only personal preference (I like to have an additional spearate sources.list and keep the default one as-is). The second line basically just incorporates 4 & 5 and uses apt-get instead of aptitude (and skips the cache cleaning).

L. Arnold's picture

ok, thank you.. never mind the next response

I didn't see the guidance when I wrote the next response.

Whats up with the / ./  at the end of the package callout above?  Is that normal Linux speak

(I crossed out the response below on the subject though unfortunately search engines don't read redactions)

L. Arnold's picture

Seems to be installing (port will need to be specified)

It seems last time around (a year ago w/ version 6.03) I was specifying ports.  Instructions above were specifying a port # to call OpenERP (that I can't read just now in reply mode).

It would be nice to have a "Project Wiki" that could accompany threads like this to do documentations on the way.

(A little here)

Install LAPP

Setup Network

apt-get upgrade (since Static IP's wont update at startup time until after the IP is set up)

apt-get install tklpatch  (answer yes half way through)

(if you are going to use Aptitude..  also

apt-get install aptitude

echo "deb http://nightly.openerp.com/7.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/openerp.list
apt-get update && apt-get upgrade && apt-get install openerp

(Probably need to go into Apache to assign or reassign the Port or Home Page first)

Open /">http://<appliance-ip-or-FQDN>:PORTNO/ from a web browser to complete install...

(need to specify and control the port, likely in Apache)

INSTALL Takes a while so I will report back.

L. Arnold's picture

huge install...

It would be worth trying this on TKL CORE.  I almost expect we are getting a double Postgres install but not sure yet.

L. Arnold's picture

Seems the destination for OpenERP should have been specified

I am not sure where this is all loading (still loading) but it strkes me we should have specified a "where" in the

apt-get install openerp

command line.. 

still installing.

L. Arnold's picture

Working on understanding this...

Redacted for now:

I am getting an error that I have an Malformed line in this.  Seems like the "/./" is wrong but I really don't understand.  Also it seems the callout above is putting this in a sources folder/file that is different than Turnkey's.  Seems these should be the same, but there are also other places perhaps this should be stored.

the above instruction loads...

/etc/apt/

has the file:  sources-list

(having the following contents)

deb http://nightly.openerp.com/7.0/nightly/deb/./

but then running aptitude to load this I am told there is a "malformed line 1" and, then "couldn't read list of packages when the following is run (after having installed aptitude)

aptitude update && aptitude && upgrade && aptitude clean

Turnkeys sources seem to be:

/etc/apt/sources.list.d

has the file: sources-list

(having the following contents)

deb http://archive.turnkeylinux.org/debian squeeze main

deb http://ftp.debian.org/debian squeeze main
deb http://ftp.debian.org/debian squeeze contrib
# deb http://ftp.debian.org/debian squeeze non-free

Should these be combined?  How should I define the source for OpenERP?

I will keep exploring.

L. Arnold's picture

Apache not built into TKL LAPP Webmin Module.

I need to go fishing.  I recall this back in the Magento Pach a while back.  Had to install the Apache Module. 

http://www.turnkeylinux.org/forum/general/20100916/tklpatch-magento

Adrian calls out:  apt-get update && apt-get install webmin-mysql webmin-apache

(but the ide is not to install webmin-mysql so I will run with:

apt-get update && apt-get install  webmin-apache

L. Arnold's picture

I've been installing to the Posgres Appliance and Not the LAPP

Postgres has the Database server but not Apache.

I just installed Webmin-Apache, but it looks like I am building Apache on root next.

I should have started on LAPP  (Linux Apache Postgres)...

Live and learn.

VERY Cool, having loaded WebMin Apache, I am prompted to download and load Apache itself.

I still don't know, however, whether OPENERP even needs Apache.

Apache now installed, but I have to find if I can load OpenERP somehow still.  Definitely went in.

(as I noted the :8069 port did not work earlier.  Perhaps it will work now)

L. Arnold's picture

Yep, can't find where OpenERP landed (2 Web Servers toO)

I see that Light PPD was loaded for Postgres.  Now also Apache.

All this and I can'f find where OpenERP landed (definitely donwloaded)...

Any thoughts?  I'm not finding found /etc/openerp/  (but it just annotates about database creation)

Will try in the AM on TKL LAPP and try to have the packages end up in a known place.

Jeremy's picture

Same boat...

I think there is something wrong with the deb... I tried installing to LAPP, Postgresql and Core and it didn't work on any of them... The appliance is not even listening on the port that it's meant to and I can't find any openerp files anywhere... whereis openerp only returns etc/openerp (and no binary...)

L. Arnold's picture

Thanks for the confirm. Sure was downloading...

This link, a little older, may have a different approach:

http://www.vionblog.com/install-openerp-7-0-from-trunk/

Alternatively, last year when I did this I recall usng a WGET command.  Is the variable that apt-get will load a package that gets updated where WGET is a one time load?

L. Arnold's picture

Found it.. (lets move the conversation to Bottom of Thread

Ran the command based on this link: http://askubuntu.com/questions/129022/determine-destination-location-of-apt-get-install-package

dpkg - L openerp

yields:

/user/shared/pysshared/openerp  (then lots and lots of entries, too much I expect)

plus 2 last lines at:

usr/bin

usr/bin/openerp-server

I think next thing to do is to try to control where that ends up..  Ideally in /var/www

the other issue is taking control with the proper webserver so that Postgres can be accessed along with OpenERP.

Will still try here on TKL-Posgres a little, but next go to TKL-LAPP as I know Apache better than LightPPD.  Likely to go slower this time of day than last night but it is the weekend at least.

see you at the bottom next.

TKBACKUP not ready for prime time

Hi

As per suggestions above I installed openERP on a TKL PostgreSQL appliance. Things are working fine so far.

Having my server to my liking I tried this:

root@postgresql ~# tklbam-backup
TurnKey Hub Error: Backup profile archive not found: turnkey-postgresql-12.0-squeeze-x86

This probably means that TKLBAM doesn't yet fully support your system.
If you're feeling adventurous you can force another profile with the
--force-profile option. Sorry about that.

Whoops... the whole point was to be able to use TKBackup...

Any advice ?
 


Jeremy's picture

Oh no... :(

Sorry, it looks like I have misinformed you! I was sure that the TKL guys had fixed that up sometime ago. I just went back over the most recent blog posts and must admit that I couldn't find mention of a fix being released that included it so I must sincerely apologise.

I have contacted the devs to see if they can give some clarity on the situation (I know that some time ago Liraz was planning to make it's inclusion in TKLBAM a priority - and perhaps that's whay I thought it had been updated).

I recall that therre was some sort of (unsupported) workaround to include PostgreSQL backups in TKLBAM using the pre and post hooks facility, but it was never totally clearly documented anywhere (just hints on the pieces required to do it yourself).

My advice would be to read the advanced TKLBAM documentation and research creating a hook to dump the PostgreSQL DB on backup (and restore the dump on restore) and then use the --force-profile option to create the backup. Obviously you'll need to put the DB dump file somewhere where it will be included in the backup.

Ok looking into making my

Ok looking into making my custom settings - obviously I would have prefered an "official" support...

That being said I would think that PostgreSQL is "mainstream" enough to warrant some attention.


Jeremy's picture

Got confirmation that I was wrong

I have spoken with the devs and they have confirmed that there is currently no official support for PostgreSQL ... yet.

They assure me that they are working on it but haved changed tack. They are looking to create a generic TKLBAM database handling functionality which will allow support for multiple different DBs (rather than just adding specific PostgreSQL support). The upside is that this will allow greater flexability into the future and allow TKLBAM to support other existing DB appliances (eg CouchDB) much easier. The downside is that it is taking much longer than originally hoped.

So the way to go is as I mentioned above. Obviously test this thoroughly before you need to rely on it, but I can see no reason why it won't work. 

Thansk for the follow up -

Thanks for the follow up - will report with what I managed to patch together :)


L. Arnold's picture

TKLBAM is now working w/ Postgres but you likely know that

Recent update to TKLBAM now works with Postgres.  I went at least back to version 12 Squeeze.

(just to update the thread)

L. Arnold's picture

Process should seemingly include

I have not yet done this but I would

In Postgres

DUMP the Database to a file that can be backed up

          test to see if you can "restore" the database from that File

in TKLBAM (so you don't get the error)

--skip databases

(being sure you still backup the Dump)

I would recomend storing a finite set of the Dump Files.  Perhaps 3 so that you don't get a Huge Bloat to your database size in your backup. 

I have not customized the TKLBAM auto scripts, but it is pretty easy to specify --limits in Manual Backup and restore processes.

I am going to see if I can get an OPENERP build done as well.  What version did you end up installing?

Jeremy's picture

Almost...

But you will also need to '--force-profile'. Unfortunately I'm not sure of the specific profile names/format but judging by the error message I would assume something like 'turnkey-mysql-12.0-squeeze-x86' or even 'turnkey-core-12.0-squeeze-x86' would work. Note though if you use the profile of an appliance that includes MySQL (eg the MySQL appliance) then you will need to '--skip databases' to avoid issues (if you use an appliance profile that doesn't include a MySQL DB then you won't need to worry).

When you are testing I would make sure that you try restoring to a fresh instance of PostgreSQL appliance as well (as you would have to if you had a hardware failure).

I'd love to hear how you go and it would be great if you could document your findings thus helping others in a similar position (just post back here to this thread if you want). Also if you have any issues ask here too. I can't guarantee that I will have the answers but more than happy to try to help! :)

L. Arnold's picture

If TKLAPP profile won't run through TKLBAM start w/ Core

I think some of the instructions above will install Posgres so if started with CORE one could run TKLBAM and all should work.

I thought you could backup TKLAPP by itself though (I understand about the database).

Jeremy's picture

AFAIK the TKL LAPP appliance will error on backup

See the error message posted above. And yes you could use Core instead, but I think LAPP is ok, just need to --force-profile to avoid the error.

L. Arnold's picture

Version Control for the Project?

I am in the early stages of building one.  Just installed TKLPatch over a fresh TKLLapp install.

The TKLPatch instructions says best to use a Version control system and I'm wondering if Launchpad or GitHub would be best.  As OpenERP has been using Launchpad it would seem logical to go that way.

http://www.turnkeylinux.org/docs/tklpatch/publishing

Any thoughts and would anyone else want to participate?  I've never worked w/ Version control systems.

Jeremy's picture

GitHub FTW IMO!

Personally I love GitHub and have been using it for all patches that i have worked on for a while now. Launchpad is probably fine too, but I am now familiar with git (and AFAIK Launchpad uses bazaar which I have no experience with).

Here is why I would suggest GitHub:

  • Nicer and more intuative UI which allows easier viewing of code (personal opinion)
  • Well documented set up on GitHub site (again personal opinion)
  • TKL devs use GitHub (makes it easier for them to include your code)
  • Git is already installed in all TKL appliance by default (means no extra packages to install to upload/download patch code)
  • Applying patches hosted on GitHub is already documented in TKL docs (by me :D)
  • I know a bit about git (although not an expert by any stretch of the imagination) so can probably give you some pointers.

At the end of the day, though it probably doesn't matter that much. As long as you are using some sort of version control so you can tweak/adjust your code with facility to backtrack if you muck something up.

L. Arnold's picture

Thank you Jeremy... note though that

TKL BugTracker is on Launch Pad.  I am not really sure why. 

Off on a Tangent now, but if you go to OpenERP on LauncPad it seems the whole confusing system is there which at least gives you some comfort.

Jeremy's picture

LaunchPad is provided by Canonical

So with TKL starting out as Ubuntu based it probably seemed like the thing to do (makes linking bugs in TKL that actually relate to upstream software very easy). Now TKL is Debian based, that rationale is less relevant. However we need to have a bug tracker and it works quite well, so no point moving it elsewhere IMO (until something radically better comes along).

AFAIK though LaunchPad has never been used to host TKL code. I think Alon and Liraz use git exclusively (and now have some it hosted on GitHub) and LaunchPad uses Bazaar...

L. Arnold's picture

Apache vs LightTPD is likely irrelevant.

I found

etc/lighttpd/lighttpd.conf

but I would like to set up a separat Port for the OpenERP stuff.

Really I should go to Apache and try this again, but while this is all here....

----------

my recollection now is that the index.html (in /var/www/) should be modified to give Ported Links to OpenERP

OpenERP seems to be its own WebServer / NetServer.

Needs to be controlled on its own, with a few Ports specified and started and stopped as  Service.

I believe we have it in the system but question of a good load is there, and question of how to Control is next.

L. Arnold's picture

openerp-server - h is supposed to give list of options

I am getting the error:

"Unable to locate package PIL"

openerp-server   (command by itself)  starts to run but again returns the same.

Seems to be a package file as part of OpenERP / Python that perhaps was not imported properly.

L. Arnold's picture

Will try with Lapp Next

I went to shutdown the Appliance and I find Apache and LightTpd fighting for Port 80.

I will bring this down and look again at the 6.03 Patch.  As OpenERP changed all the sources I mostly gave up on it, but under neath that is, I am sure, the skeleton of the correct Ap structure and different Port Calls etc.

I am not seeing how I can Post the Patch Modification I did (added magentoerpconnect mainly) but there is alot in the config to look at.

L. Arnold's picture

Old Patch File and path towards modification

Was installed on TKL Lapp  (my modification seemed to have been around magento erp connect. 

Patch Text (conf-la)  (pwds should be changed) and likely were post install.  Never really went live but did function (and is functioning now).  This Patch however will no longer install as the source files have changed.  Should be able to redefine these two lines to aim for version 7.0 in the Nightly Directories cited above.

WebClient drives off Port 8080 in http.  Does not drive off of TKL SSL which is a problem.

http://(domain-or-ip):8080

OpenERP client (python standalone) drives off of 8070 looking like this.

Socket://(domain-or-ip):8070

(Disfunctioning links for PATCH)

wget http://www.openerp.com/download/stable/source/$SERVERSRC.tar.gz
wget http://www.openerp.com/download/stable/source/$WEBSRC.tar.gz

and one set futher down:
wget http://apps.openerp.com/addon/get_module_as_zip/1067/l10n_chart_us_gener...
#!/bin/bash -ex
#adopted from :
# http://www.theopensourcerer.com/2011/04/19/how-to-install-openerp-6-on-u...
#Caution : please stop any instance of running postgres daemon


PSQLRELEASE=8.4
PYTHONRELEASE=python2.6
UBUNTURELEASE=10.04.1
SERVERSRC=openerp-server-6.0.3
WEBSRC=openerp-web-6.0.3
INSTALLPATH=/opt/openerp
PASSWVAR="openerp"
HOSTNAME=openerp

# set hostname
echo "$HOSTNAME" > /etc/hostname
sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts


echo "------------------------------------"
echo "Enabling ubuntu multiverse repository"
echo "------------------------------------"
APTSOURCES=/etc/apt/sources.list.d/sources.list

COMMENT=`grep 'lucid multiverse' $APTSOURCES`
UNCOMMENT=$(echo $COMMENT | sed 's|#||')
sed -i "s|$COMMENT|$UNCOMMENT|" $APTSOURCES

COMMENT=`grep 'lucid-updates multiverse' $APTSOURCES`
UNCOMMENT=$(echo $COMMENT | sed 's|#||')
UNCOMMENT=$(echo $COMMENT | sed 's|#||')
sed -i "s|$COMMENT|$UNCOMMENT|" $APTSOURCES

apt-get update
echo "------------------------------------"
echo "installing needed packages"
echo "------------------------------------"

apt-get -y install sudo python python-psycopg2 python-reportlab \
python-egenix-mxdatetime python-tz python-pychart python-mako \
python-pydot python-lxml python-vobject python-yaml python-dateutil \
python-pychart python-pydot python-webdav python-cherrypy3 \
python-formencode python-pybabel python-simplejson python-pyparsing

apt-get install bzr

#Create openerp as system user
/usr/sbin/adduser --system --home=/opt/openerp --group openerp

#create pgsql user called openerp
#/etc/init.d/postgresql-$PSQLRELEASE stop

/etc/init.d/postgresql-$PSQLRELEASE start
sudo -u postgres createuser openerp --no-superuser --createdb --no-createrole
#Alter user open erp with defined password
sudo -u postgres psql template1 -U postgres -c "alter user openerp with password '$PASSWVAR'"

###-----Seting up OpenErp Server
#------Core OpenErp Server
cd /opt/openerp
wget http://www.openerp.com/download/stable/source/$SERVERSRC.tar.gz
wget http://www.openerp.com/download/stable/source/$WEBSRC.tar.gz
tar zxvf $SERVERSRC.tar.gz
tar zxvf $WEBSRC.tar.gz
rm -f  *.tar.gz
chown -R openerp: *
mv  $SERVERSRC server
mv $WEBSRC web

#-------Include US chart of accounts addon
wget http://apps.openerp.com/addon/get_module_as_zip/1067/l10n_chart_us_gener...
unzip l10n_chart_us_general.zip
rm l10n_chart_us_general.zip
mv l10n_chart_us_general server/bin/addons
chown -R openerp: server/bin/addons/l10n_chart_us_general

#-------Include magentoerpconnect
cd /opt/openerp/server/bin/addons
bzr branch lp:magentoerpconnect
chown -R openerp: magentoerpconnect

bzr branch lp:magentoerpconnect/openerp6-module
chown -R openerp: openerp6-module

cd /opt/openerp/server/bin
md extra-addons
cd extra-addons
bzr branch lp:openobject-addons/6.0


#------Creating /etc/openerp-server.conf
cat > /tmp/openerp-server.conf <<"EOF"
[options]
; This is the password that allows database operations
; Will be written to by the server when password is changed
; !! Keep this file secure !!
; admin_passwd = admin

root_path = /opt/openerp/server/bin

without_demo = False
verbose = False

; Database settings
db_user = openerp
db_password = openerp
; Please uncomment the following line *after* you have created the
; database. It activates the auto module check on startup.
; db_name = False
db_port = False
db_host = False
db_maxconn = 64

; Networking Settings
xmlrpc = True
xmlrpc_interface =
xmlrpc_port = 8069

netrpc = True
netrpc_interface =
netrpc_port = 8070

; Uncomment these for xml-rpc over SSL
;xmlrpcs = True
;xmlrpcs_interface =
;xmlrpcs_port = 8071
;secure_pkey_file = /etc/ssl/openerp/server.pkey
;secure_cert_file = /etc/ssl/openerp/server.crt

; Log settings
logfile = /var/log/openerp/openerp-server.log
syslog = False
logrotate = True
log_level = info

; False prevents the client displaying the list of databases
list_db = True
addons_path = /opt/openerp/server/bin/addons
demo = {}
soap = False
reportgz = False
translate_modules = ['all']

; Static http parameters
static_http_enable = False
static_http_document_root = /var/www/html
static_http_url_prefix = /

; Outbound email configuration
;smtp_user = info@example.com
;email_from = "OpenERP Support" <info@example.com>
;smtp_port = 25
;smtp_password = ********
;smtp_ssl = True
;smtp_server = mail.example.com
EOF

mv /tmp/openerp-server.conf /etc/openerp-server.conf
chown openerp:root /etc/openerp-server.conf
chmod 640 /etc/openerp-server.conf

#------End creating /etc/openerp-server.conf

#------Creating init.d script
cat > /tmp/openerp-server <<"EOF"
#!/bin/sh

### BEGIN INIT INFO
# Provides:             openerp-server
# Required-Start:       $remote_fs $syslog
# Required-Stop:        $remote_fs $syslog
# Should-Start:         $network
# Should-Stop:          $network
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    Enterprise Resource Management software
# Description:          Open ERP is a complete ERP and CRM software.
### END INIT INFO

PATH=/bin:/sbin:/usr/bin
DAEMON=/opt/openerp/server/bin/openerp-server.py
NAME=openerp-server
DESC=openerp-server

# Specify the user name (Default: openerp).
USER=openerp

# Specify an alternate config file (Default: /etc/openerp-server.conf).
CONFIGFILE="/etc/openerp-server.conf"

# pidfile
PIDFILE=/var/run/$NAME.pid

# Additional options that are passed to the Daemon.
DAEMON_OPTS="-c $CONFIGFILE"

[ -x $DAEMON ] || exit 0
[ -f $CONFIGFILE ] || exit 0

checkpid() {
    [ -f $PIDFILE ] || return 1
    pid=`cat $PIDFILE`
    [ -d /proc/$pid ] && return 0
    return 1
}

case "${1}" in
        start)
                echo -n "Starting ${DESC}: "

                start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
                        --chuid ${USER} --background --make-pidfile \
                        --exec ${DAEMON} -- ${DAEMON_OPTS}

                echo "${NAME}."
                ;;

        stop)
                echo -n "Stopping ${DESC}: "

                start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
                        --oknodo

                echo "${NAME}."
                ;;

        restart|force-reload)
                echo -n "Restarting ${DESC}: "

                start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
                        --oknodo
      
                sleep 1

                start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
                        --chuid ${USER} --background --make-pidfile \
                        --exec ${DAEMON} -- ${DAEMON_OPTS}

                echo "${NAME}."
                ;;

        *)
                N=/etc/init.d/${NAME}
                echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
                exit 1
                ;;
esac

exit 0
EOF

mv /tmp/openerp-server /etc/init.d/
chmod 755 /etc/init.d/openerp-server
chown root: /etc/init.d/openerp-server
update-rc.d openerp-server defaults
#---------End creating init.d script


#Create /var/log/openerp with proper ownership:
mkdir -p /var/log/openerp
chown -R openerp.root /var/log/openerp/



###--------Setting up openerp  web client
#------Creating /etc/openerp-web.conf
cat > /tmp/openerp-web.conf <<"EOF"
[global]
server.environment = "development"

# Some server parameters that you may want to tweak
server.socket_host = "0.0.0.0"
server.socket_port = 8080

# Sets the number of threads the server uses
server.thread_pool = 10

tools.sessions.on = True
tools.sessions.persistent = False

# Simple code profiling
server.profile_on = False
server.profile_dir = "profile"

# if this is part of a larger site, you can set the path
# to the TurboGears instance here
#server.webpath = ""

# Set to True if you are deploying your App behind a proxy
# e.g. Apache using mod_proxy
#tools.proxy.on = True

# If your proxy does not add the X-Forwarded-Host header, set
# the following to the *public* host url.
#tools.proxy.base = 'http://mydomain.com'

# logging
#log.access_file = "/var/log/openerp-web/access.log"
log.error_file = "/var/log/openerp/openerp-web-error.log"
log.access_level = "INFO"
log.error_level = "INFO"

# Set to false to disable CSRF checks
tools.csrf.on = True

# replace builtin traceback tools by cgitb
tools.log_tracebacks.on: False
tools.cgitb.on: True
# a default install can probably avoid logging those via cgitb as they're
# available in the server log
tools.cgitb.ignore=(
    openobject.errors.Concurrency,
    openobject.errors.TinyException)

# OpenERP Server
openerp.server.host = 'localhost'
openerp.server.port = '8070'
openerp.server.protocol = 'socket'
openerp.server.timeout = 450

# Web client settings
[openerp-web]
# filter dblists based on url pattern?
# NONE: No Filter
# EXACT: Exact Hostname
# UNDERSCORE: Hostname_
# BOTH: Exact Hostname or Hostname_

dblist.filter = 'NONE'

# whether to show Databases button on Login screen or not
dbbutton.visible = True

# will be applied on company logo
company.url = ''
EOF

mv /tmp/openerp-web.conf /etc/
chown openerp:root /etc/openerp-web.conf
sudo chmod 640 /etc/openerp-web.conf

#--------End creating /etc/openerp-web.conf

#------Creating /etc/init.d/openerp-web
cat > /tmp/openerp-web <<"EOF"
#!/bin/sh

### BEGIN INIT INFO
# Provides:             openerp-web
# Required-Start:       $remote_fs $syslog
# Required-Stop:        $remote_fs $syslog
# Should-Start:         $network
# Should-Stop:          $network
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    OpenERP Web - the Web Client of the OpenERP
# Description:          Open ERP is a complete ERP and CRM software.
### END INIT INFO

PATH="/sbin:/bin:/usr/sbin:/usr/bin"
DAEMON="/opt/openerp/web/openerp-web.py"
NAME="openerp-web"
DESC="openerp-web"

# Specify the user name (Default: openerp).
USER=openerp

# Specify an alternate config file (Default: /etc/openerp-web.conf).
CONFIGFILE="/etc/openerp-web.conf"

# pidfile
PIDFILE=/var/run/$NAME.pid

# Additional options that are passed to the Daemon.
DAEMON_OPTS="-c $CONFIGFILE"

[ -x $DAEMON ] || exit 0
[ -f $CONFIGFILE ] || exit 0

checkpid() {
    [ -f $PIDFILE ] || return 1
    pid=`cat $PIDFILE`
    [ -d /proc/$pid ] && return 0
    return 1
}

case "${1}" in
        start)
                echo -n "Starting ${DESC}: "

                start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
                        --chuid ${USER} --background --make-pidfile \
                        --exec ${DAEMON} -- ${DAEMON_OPTS}

                echo "${NAME}."
                ;;

        stop)
                echo -n "Stopping ${DESC}: "

                start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
                        --oknodo

                echo "${NAME}."
                ;;

        restart|force-reload)
                echo -n "Restarting ${DESC}: "

                start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
                        --oknodo

                sleep 1

                start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
                        --chuid ${USER} --background --make-pidfile \
                        --exec ${DAEMON} -- ${DAEMON_OPTS}

                echo "${NAME}."
                ;;

        *)
                N=/etc/init.d/${NAME}
                echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
                exit 1
                ;;
esac

exit 0
EOF

mv /tmp/openerp-web /etc/init.d/
chmod 755 /etc/init.d/openerp-web
chown root: /etc/init.d/openerp-web
update-rc.d openerp-web defaults

#--------End creating /etc/init.d/openerp-web


apt-get clean
cd /opt

#add services information
SERVICES=/etc/confconsole/services.txt
echo 'Openerp:    http://$ipaddr:8080' >> $SERVICES

exit 0


 

I will confirm, when I go into Apache, none of the OPENERP POrts are called out so Apache Proper is not Serving this.  Seems could be installed on Core or PostGre just as well.  Still need to disect how the OpenERP service is being controlled.... though I am sure it is Pointed to in the Text above.

 

as a side note:

I also had these notes along side..  seemingly learning notes about Bazaar (bzr)...  I don't think real relavent to this.

Notes Installing Magentoerpconnect

(first on Core Appliance)
apt-get update
apt-get install bzr

apt-get install zip (do download modules as zips)

md addbzr

apt-get updatate
apt-get install bzr

cd addbzr  (root/bzr)

bzr branch lp:magentoerpconnect

bzr branch lp:magentoerpconnect/openerp6-module

---
do

addons

do dependencies



L. Arnold's picture

I see this is New from

I see this is New from OpenSourcerer for version 7.0

http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/

Likely can be modified towards Debian

Also Version 6 Official Reference for Configuration is here which explains the building blocks perhaps.

http://doc.openerp.com/v6.0/developer/1_1_Introduction/3_configuration.html

I don't think there is much documentation yet for version 7.0 so this may or may not be completely relavent.  Version callouts for 6.0 and 6.1 even jump around quite a bit.

As far as I can see they don't want this to be easy, while not completely breaking the idea of Open Source (they really want to host your systems I think)

L. Arnold's picture

DO NOT RUN BZR on OPENERP unless you have a day to kill

I have made great progress till I took the BZR route.  Looks like not having Logged In to Launchpad was a mistake.  Taking more than forever to get the addons downloaded.

If we can control Apt-get or just use WGET it is the better path it seems to me.

---------------

Log till now on this attempt:

-----

(I think I forgot to install TKLPATCH) REAL SOON after STARTUP

apt-get update
apt-get upgrade   (starts a very long process.  I normally just run update. What is the difference? is this the same as

apt-get dist-upgrade, cited by opensourcerer?)

reboot  (easy with Webmin)...(my idea given my windows expeirence.
    and also opensourcer suggests)
    note: (I run Webmin in Firefox, Webshell in Chrome)

adduser --system --home=/opt/openerp --group openerp

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: ********
Enter it again: ********

(#####)

(I did not do this, maybe should have before "create user")

sudo su - postgres  (I went back to do this, but got an error that role openerp already exists

exit

sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata \
python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid \
python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing \
python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject \
python-webdav python-werkzeug python-xlwt python-yaml python-zsi

(yes to continue)  (long process)

(Snapshot VM now after Python installed)

added (late in the game)
apt-get install tklpatch

(next a Fork)

http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ub...
WGET or BZR...  trying BZR (from Jerome comment)

apt-get install bzr
su - openerp
cd /opt/openerp
bzr branch lp:openobject-server/7.0 server  (write to Launchpad or access private data.  See                     

    "bzr help launchpad-login".                   
                        Branched 4807 revision(s).)
bzr branch lp:openobject-addons/7.0 addons  

#(Webshell may have hung -- taking forever to fin)
 #   (has put a huge drain on the system)  Gigabytes of Data are Loading NOW I can See!  It would seem
  #     good to minimize how much comes in as "addons". 
   # System is gagging as seen from other remote login slowness.  Moved again after a while... now stopped again 52745KB)
#NOTE
#AFAIU if you’ve got a Launchpad account, uploaded your SSH public key, and used bzr lp-login, bzr will use it’s smart protocol over ssh, which will be much faster than the dumb HTTP protocol it uses otherwise with Launchpad.

#There’s an open bug somewhere about making Launchpad support the smart bzr protocol for anonymous repository access too.

#NEXT IN LINE but still waiting for the last BZR to finish
bzr branch lp:openerp-web/7.0 web  
#Wanting to Integrate but may have to wait
# magentoerpconnect  

---------------


L. Arnold's picture

Almost.. perhaps.. Is it worth the effort ?

I get this when I follow the OpenSourcer guidance when I finally (after additionally apt-get installing both python-pil and python-imaging)

su - openerp -s /bin/bash

then

/opt/openerp/server/openerp/server


openerp: OpenERP version 7.0-20120127-000101
openerp: addons ppaths: /opt/openerp/server/openerp/addons
openerp: database hostname: localhost
openerp: database port: 5432
openerp:  database user: openerp
openerp.service.wsgi)server: HTTP service (werkzeug) running)
openerp: OpenERP server is running, waiting for connections


But I can't connect yet via the Web.  Somewhere I saw a indication of IP 0.0.0.0 but I can't find that now.

I am going for a HALT:  System is shutting down.

I am tired.

L. Arnold's picture

START file wierd but an OpenERP response in Browser

As usual, wrangling with this.  I actually got an Error from OPENERP rather than blank pages.

Wrestling with controlling the start script, but likely permissions underneath that.

This Guidance has been most helpful:

http://www.vionblog.com/install-openerp-7-0-from-trunk/

The Start script is like a dog chasing its tail.

Root can invoke the script then is told it is a security risk to do so (aborting)

Openerp (via -su) does not see a script

Bin/Bash under -su Openerp actually starts the server and no errors are seen in SHELL

Once There, I run first Start

http://(mydomain):40069  (from within my Firewall to eliminate anything there) and I get some Graphics, the possibility of database creation and the following Error:  (Authentication Fails for USER OPENERP...  which brings us back to comparing OpenSourcerer (who calls out a Password) and the link above (which seemingly makes a --system user that should work, but so far is not)

Psyched to get an error actually.

 
		OpenERP Server Error

Client Traceback (most recent call last):
  File "/opt/openerp/web/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/web/addons/web/controllers/main.py", line 708, in get_list
    return db_list(req)
  File "/opt/openerp/web/addons/web/controllers/main.py", line 87, in db_list
    dbs = proxy.list()
  File "/opt/openerp/web/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/web/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last):
  File "/opt/openerp/web/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 289, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 122, in dispatch
    return fn(*params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 351, in exp_list
    cr = db.cursor()
  File "/opt/openerp/server/openerp/sql_db.py", line 477, in cursor
    return Cursor(self._pool, self.dbname, serialized=serialized)
  File "/opt/openerp/server/openerp/sql_db.py", line 183, in __init__
    self._cnx = pool.borrow(dsn(dbname))
  File "/opt/openerp/server/openerp/sql_db.py", line 378, in _locked
    return fun(self, *args, **kwargs)
  File "/opt/openerp/server/openerp/sql_db.py", line 433, in borrow
    result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
OperationalError: FATAL:  Ident authentication failed for user "openerp"

 


 my tact from here is going to be in comparing the two Script methods (that are very different) from "The Open Sourcerer" and  "VionBlog". 

I also need to compare how Users and Postgres Users are definied in the two methods.

Slow as it is, BZR seems the best so far at briniging code in.

L. Arnold's picture

Reran (or missed) Posgres Create User (Session Running!)

su - postgres -c "createuser -s openerp" 2> /dev/null || true

Creating first Database as we speak.  (Ok, made it)

I need to get my hands around the "Super password" which I don't recall creating in this iteration.  It was filled in and I went with it....

I have a "first build" running.

What about using : wget

What about using :
wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz
or better replace wget with axel .

The package is complete package, including addons .. etc etc.
ref : http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ub...

Not Accessible over Network

Hi All,

I have installed openerp 6.1 on windows xp. It is workin well and good on port 8069.Whenever i type from another computer 192.168.1.5:8069 its not accessible . Kindly help me with this.

 

I have made necessary changes in config file.

 

Regards, 

Pavan

Pavan, I have no idea how you

Pavan,

I have no idea how you ended up here but this is a forum dedicted to Trunkey Linux - you won't get much help regarding Win XP over here ! I suggest you post your question in the openERP forum in the install section: http://forum.openerp.com/forum/forum5.html


L. Arnold's picture

I had some trouble with wget, but bzr works..

BZR works quite well for getting their Trunk Folders, however best to always have some options.  Even better to understand it all.

This is a pretty good link vis a vis version 7.0

http://doc.openerp.com/trunk/developers/server/01_getting_started/

I've been really happy so far with OpenERP.  It is not well documented but works great.  We should document it somehow on the TKL site.

Jeremy's picture

Cool

My suggestion would be to either start a fresh thread and edit the top post (rather than making new posts) and any new info keep adding/editing the top post. That way the info is all at the top instead of users having to crawl through a whole thread...

L. Arnold's picture

But then Zero followers. also just "replying" in the right place

Yesterday got a email message:  Followed the link, Posted a comment.  Saw then that it was at the bottom (for me) when it should have been connected to the "What about using WGET" comment a few back.

I agree that threads can get long.

Perhaps we could set a "following tag" so if a subject on OpenERP shows itself an email would come in.  I am not on the Forums as much as I could but the email notes often bring me back.

The email link should reference the comment location, not just the thread perhaps also.

OpenERP 7.0 and TKL 12

I have sucessfully installed OpenERP 7.0 on TKL 12 (LAMP + Postgres 9.x) several times since december 2012, using a TKLPatch script that I have developed.

I tryed to read all this long thread but did not undestand its porpouse. Are you just trying to intall OpenERP and use it or are you trying to  develop a TKLPatch script that will be published to help people to create a TKL OpenERP appliance?

I could help on both options. Just let me know what do you want.

Regards,

Carlos Vercelino

L. Arnold's picture

Best to give reference on Devlopment sites and reference here.

I documented how I built an install (but have not patched)

https://blueprints.launchpad.net/turnkeylinux/+spec/openerp-appliance

Also a number of Patches are posted here.  It would be great if you could post yours and background about it both on the blueprints, and the patches site below:  (Patches takes Code it seems, or at least allows a good link to Code)

http://wiki.turnkeylinux.org/TKLPatch/Patches

I agree that Forums tend to meander.  Many of my posts were "on the way to a build"...  It is a great system for me but we really need a TKL Patch, then a TKL Build to get some more transportability and optimization in.

If you post a patch I'll bet that can promote a full build.

Thank you!

L. Arnold's picture

Lets build a TKLDEV - OpenERP ISO

To answer you, Carlos directly (Patch or Build?)

It would be great to have your help to build a TKLDEV ISO for OpenERP.

OpenERP is working well now and it would be nice to have it in the Stable.

We could work w/ a Team over on GitHub or in the other Devo areas at TKL.  Can you ping in on that side?  I will ping back.

 

Lets build a TKLDEV - OpenERP ISO

Arnold, as I mentioned before, I have successfully installed OpenERP 7.0 on TKL 13 (LAMP + Postgres 9.x) several times since November 2013 using a TKLPatch script that I have developed.

In fact I have been thinking on sharing those scripts via my new project OeHealth (https://github.com/OeHealth), an OpenERP health solution.

Usually I don’t build an ISO file but just pick an Tunkey Appliance (mostly LAMP), install it an aply some TKLPatch scripts. I think it would be ease to merge those scripts in one that could generate the ISO installation.

We can start a team work on GitHub and I would be very glad on participate on it. Please contact me directly using email "carlos@vercelino.com" or skype "carlos.eduardo.vercelino".

Arnold, as I mentioned before, I have successfully installed OpenERP 7.0 on TKL 13 (LAMP + Postgres 9.x) several times since November 2013 using a TKLPatch script that I have developed.

In fact I have been thinking on sharing those scripts via my new project OeHealth (https://github.com/OeHealth), an OpenERP health solution.

Usually I don’t build an ISO file but just pick an Tunkey Appliance (mostly LAMP), install it an aply some TKLPatch scripts. I think it would be ease to merge those scripts in one that could generate the ISO installation.

We can start a team work on GitHub and I would be very glad on participate on it. Please contact me directly using email "carlos.vercelino@clvsol.com" or skype "carlos.eduardo.vercelino".

 

Jeremy's picture

This sounds fantastic! :)

It'd be great to see a OpenERP appliance. If you use TKLDev to build it and host your (TKLDev) build (instructions) on GitHub then we could see it integrated into the TKL library! :)

L. Arnold's picture

see email

Carlos, I think we should move forward with this.  I have been making some general notes but it would be good to "get er done".

See my Fork of Postgres Git at:

https://github.com/l-arnold/postgresql---openerp

 

Thank you for following up.  Jeremy, please also Join in!

tk-openerp-aws-on-lapp

Arnold,

I have been making some tests on GitHtb regarding the OpenERP installation over the AWS (Amazon Web Services). Please see this link on GitHub:

https://github.com/CLVsol/tk-openerp-aws-on-lapp

I did not forked any TK appliance for now, I am just testing some TKLPath scripts.

I woud sugest you to use the LAPP Turnkey Appliance as a reference insted of the pure PostgreSQL Appliance. OpenERP has its own webserver but for http protocol only. In an web eviroment I think that it is recomended to use a https connection instead.

Right now I am testing only over the AWS as I said, but I will go forward to an ISO version of it as soon as possible. I am in a hury here implementing two diferent forks for this project:

https://github.com/OeHealth/oehealth

Jeremy, I am considering your sugestion on TKLDev to implemet this, but I do not have the skill do to it right now.

 

 

L. Arnold's picture

Lapp uses Apache and Postgres, while Postgres App is more trim.

Hi Carlos,

I will definitely look.  We are both in the same place about TKLDEV..  just not knowing how to use it.

Lets look at both and choose a path.  

You are correct that you don't need a webserver, but my thoughts are that Database maintenance should be a good addition.  I would only recomend having OpenERP run over ports 80 and 443 and Postgres Admin run over a different port.

In a sense the Postgres approach could be cleaner than Lapp (but perhaps you are using Apache to serve OpenERP with Lapp (though I don't know how).

thanks for working ont this.   I will check the Branch.

best to you

Arnould, The LAPP appliance

Arnould,

The LAPP appliance has the same PostgreSQL admin features as the pure PostgreSQL. Additionally it has the APP stack that is used to implement the HTTPS features.

On AWS usually  I disable all ports except 443 (SSH) and 12325 (OpenERP over https) as described on the README of my GitHub branch. To access the PostgreSQL server You canb stablish an SSH tunnel and use a tool like PGAdmin III. Also I configure the apliance do accept sessions for root only via SSH an Private keys.

 

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)