Skip to content

Instantly share code, notes, and snippets.

@aorborc
Forked from altuzar/gist:5876873
Created January 28, 2014 22:44
Show Gist options
  • Save aorborc/8678214 to your computer and use it in GitHub Desktop.
Save aorborc/8678214 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Install OpenERP 7 on Digital Ocean
# Fernando Altuzar
# Modified script from Carlos E. Fonseca Zorrilla & Mario Gielissen
# First: Create a Droplet with CentOS 32 bits
# Then:
yum -y install wget unzip
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh http://yum.pgrpms.org/9.2/redhat/rhel-6-i386/pgdg-centos92-9.2-6.noarch.rpm
yum -y install python-psycopg2 python-lxml PyXML python-setuptools libxslt-python pytz \
python-matplotlib python-babel python-mako python-dateutil python-psycopg2 \
pychart pydot python-reportlab python-devel python-imaging python-vobject \
hippo-canvas-python mx python-gdata python-ldap python-openid \
python-werkzeug python-vatnumber pygtk2 glade3 pydot python-dateutil \
python-matplotlib pygtk2 glade3 pydot python-dateutil python-matplotlib \
python python-devel python-psutil python-docutils make\
automake gcc gcc-c++ kernel-devel byacc flashplugin-nonfree poppler-utils pywebdav\
yum -y install postgresql92-libs postgresql92-server postgresql92
service postgresql-9.2 initdb
chkconfig postgresql-9.2 on
service postgresql-9.2 start
su - postgres -c "createuser --superuser openerp"
cd /tmp
wget http://gdata-python-client.googlecode.com/files/gdata-2.0.17.zip
unzip gdata-2.0.17.zip
rm -rf gdata-2.0.17.zip
cd gdata*
python setup.py install
cd /tmp
adduser openerp
mkdir /var/run/openerp
chown openerp.openerp /var/run/openerp
mkdir /var/log/openerp
chown openerp.openerp /var/log/openerp
rm -rf openerp*
wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz
tar -zxvf openerp-7.0-latest.tar.gz --transform 's!^[^/]\+\($\|/\)!openerp\1!'
cd openerp
python setup.py install
rm -rf /usr/local/bin/openerp-server
cp openerp-server /usr/local/bin
cp install/openerp-server.init /etc/init.d/openerp
cp install/openerp-server.conf /etc
chown openerp:openerp /etc/openerp-server.conf
chmod u+x /etc/init.d/openerp
chkconfig openerp on
service openerp start
# The Server should be online at localhost:8069
# If there is an error about a encoding UTF8 template when creating the company at OpenErp, use the following:
# sudo su - postgres
# psql -U postgres
# update pg_database set datallowconn = TRUE where datname = 'template0';
# \c template0
# update pg_database set datistemplate = FALSE where datname = 'template1';
# drop database template1;
# create database template1 with template = template0 encoding = 'UTF8';
# update pg_database set datistemplate = TRUE where datname = 'template1';
# \c template1
# update pg_database set datallowconn = FALSE where datname = 'template0';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment