Skip to content

Instantly share code, notes, and snippets.

@almas
Forked from hanovo/centos 6.5 install odoo
Last active April 4, 2017 03:19
Show Gist options
  • Save almas/ec430e716b17bc620f53e79861931d2b to your computer and use it in GitHub Desktop.
Save almas/ec430e716b17bc620f53e79861931d2b to your computer and use it in GitHub Desktop.
yum -y install postgresql postgresql-server postgresql-devel postgresql-libs
yum install -y python27-devel python27 python27-libs python27-setuptools python27-pip python27-virtualenv
# Dev tools for compile
yum -y install gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libffi-devel libxslt libxslt-devel libxml2 libxml2-devel openldap-devel libjpeg-turbo-devel openjpeg-devel libtiff-devel git libpng libXext libz.so.1 xorg-x11-fonts-Type1 curl cabextract
# wkhtmltopdf install
cd /tmp
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-centos6-amd64.rpm
rpm -ivh wkhtmltox-0.12.2_linux-centos6-amd64.rpm
service postgresql-9.3 start
export PATH=/usr/pgsql-9.3/bin:$PATH
su - postgres -c "createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo"
#
adduser odoo
DIR="/var/run/odoo /var/log/odoo /opt/odoo /opt/andromeda-addons"
for NAME in $DIR
do
if [ ! -d $NAME ]; then
mkdir $NAME
chown odoo.odoo $NAME
fi
done
su - odoo
virtualenv-2.7 odoo
source odoo/bin/activate
export PATH=/usr/pgsql-9.3/bin:$PATH
pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
pip install babel
pip install docutils
pip install feedparser
pip install gdata
pip install Jinja2
pip install mako
pip install mock
pip install psutil
pip install psycopg2
pip install pydot
pip install python-dateutil
pip install python-openid
pip install pytz
pip install pywebdav
pip install pyyaml
pip install reportlab
pip install simplejson
pip install unittest2
pip install vatnumber
pip install vobject
pip install werkzeug
pip install xlwt
pip install pyopenssl
pip install lxml
pip install python-ldap
pip install decorator
pip install requests
pip install pillow
pip install pyPdf
pip install passlib
pip install gengo
cd /opt
git clone https://github.com/odoo/odoo.git --branch 8.0
chown -R odoo.odoo odoo
exit
cat > /etc/odoo-server.conf << EOF
[options]
; This is the password that allows database operations:
admin_passwd = admin
; DATABASE OPTIONS
db_host = localhost
db_port = 5432
db_user = odoo
db_password = odoo
; MISC SETTINGS
addons_path = /opt/odoo/addons
data_dir = /opt/odoo/data
load = web
timezone = Asia/Ulaanbaatar
without-demo=all
;no-xmlrpc = True
;no-xmlrpcs = True
;no-netrpc = True
; LOG SETTINGS
logfile = /var/log/odoo/odoo-server.log
log_handler = werkzeug:WARNING
log_level = warn
;no-logrotate = True
EOF
chown root.odoo /etc/odoo-server.conf
chmod 640 /etc/odoo-server.conf
cat > /etc/logrotate.d/odoo-server << EOF
/var/log/odoo/*.log {
copytruncate
missingok
notifempty
}
EOF
wget -O /etc/init.d/odoo https://raw.githubusercontent.com/Johnzero/OE7/master/install/openerp-server.init
sed -i "s/openerp/odoo/g" /etc/init.d/odoo
sed -i "s/OpenERP/Odoo/g" /etc/init.d/odoo
sed -i "s/\/usr\/bin\/setsid \/usr\/bin\/odoo-server/~\/odoo\/bin\/python \/opt\/odoo\/openerp-server/" /etc/init.d/odoo
chmod +x /etc/init.d/odoo
/sbin/chkconfig --level 35 odoo on
service odoo start
#/etc/odoo-server.conf
#data_dir = /opt/odoo/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment