Do You know Hidden Risks of Poor ERP Implementation? Download Free E-Book

A script for one-click installation of OpenERP 7.0 server instances!

January 27, 2013 by
A script for one-click installation of OpenERP 7.0 server instances!

Hello Community,
   A script for one-click installation of OpenERP 7.0 server instances    
Here we present a script which installs OpenERP 7.0 server for you in just one click! This one-line installer script has been written by Daniel Reis, IT manager at Securitas. You can find it at GitHub.               Some highlights ! #!/bin/bash

yes | 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


 





echo -e "n---- Install python libraries ----"

 

sudo pip install gdata







echo -e "n---- Create system user ----"

sudo adduser --system --quiet --shell=/bin/bash --home=$OEADMIN_HOME --gecos 'OpenERP' --group $OEADMIN_USER

sudo mkdir /var/log/$OEADMIN_USER

sudo chown $OEADMIN_USER:$OEADMIN_USER /var/log/$OEADMIN_USER

sudo mkdir -p $OEADMIN_HOME/$OEADMIN_USER

sudo chown $OEADMIN_USER:$OEADMIN_USER $OEADMIN_HOME/$OEADMIN_USER

fi


 





#--------------------------------------------------

 

# Create a new instance

 

#--------------------------------------------------

==============

#bzr co lp:openerp-web/7.0 $OEADMIN_HOME/$INSTANCE/web

 

#bzr co lp:openobject-server/7.0 $OEADMIN_HOME/$INSTANCE/server

 

#bzr co lp:openobject-addons/7.0 $OEADMIN_HOME/$INSTANCE/addons

 

fi







echo -e "* Create server config file"

cp $OEADMIN_HOME/$INSTANCE/server/install/openerp-server.conf $OEADMIN_HOME/$INSTANCE --backup=numbered

sed -i s/"db_user = .*"/"db_user = openerp-$INSTANCE"/g $OEADMIN_HOME/$INSTANCE/openerp-server.conf

#echo "logfile = /var/log/openerp/openerp-$INSTANCE.log" >> $OEADMIN_HOME/$INSTANCE/openerp-server.conf

#echo "addons_path=/opt/openerp/$INSTANCE/addons,/opt/openerp/$INSTANCE/web/addons" >> $OEADMIN_HOME/$INSTANCE/openerp-server.conf

echo "#!/bin/sh

sudo -u $OEADMIN_USER $OEADMIN_HOME/$INSTANCE/server/openerp-server --config=$OEADMIN_HOME/$INSTANCE/openerp-server.conf $*

" > $OEADMIN_HOME/$INSTANCE/start.sh

chmod 755 $OEADMIN_HOME/$INSTANCE/start.sh

;;

start)

INSTANCE=$2

shift 2

$OEADMIN_HOME/$INSTANCE/start.sh $*

;;







esac

echo "Done!"