Install Odoo 8 on CentOS 7
# yum install centos-release-scl
# yum install python27
# source scl_source enable python27
# pip install --upgrade pip
(If no pip, install it by runnig: # yum install python2-pip)
# easy_install -U setuptools
- Install Latest PostgreSQL
yum install pidentd
chkconfig –list|grep post
service rh-postgresql95-postgresql restart su – openerp
vi /var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_hba.conf
service rh-postgresql95-postgresql restart
service xinetd start
chkconfig xinetd on
yum install python27
- Copy Odoo Packages or git clone.
vi /etc/init.d/odoo
chkconfig –add odoo
chkconfig odoo on
service odoo start
- Install all related Modules
# #####
yum install python-werkzeug python-lxml python-decorator python-dateutil
pip install -U pytz
ln -s /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64
pip install lxml
pip install decorator
pip install python-dateutil –upgrade
# yum install libpq-dev python-dev
pip install psycopg2
yum install python27-python-psycopg2
pip install pyyaml pillow unittest2 reportlab mako
pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
pip install psutil requests greenlet gevent
pip install psycogreen
pip install psutils –upgrade
pip install python-openid
pip install pyPdf
yum install cups
yum install cups-devel
pip install pycups
pip install wrapt
pip install xlwt
pip install tinyurl
pip install flanker
pip install passlib
pip install pyldap
yum install python-ldap
yum install openldap-devel
pip install pyldap
pip install googleads
pip install retry
yum install python27-MySQL-python
pip install MySQL-python
pip install egenix-mxodbc
yum install unixODBC-devel
pip install pyodbc
(如果遇到“gcc: error trying to exec ‘cc1plus’: execvp: No such file or directory”,需要 yum install gcc-c++)
pip install egenix-mx-base egenix-mxodbc-connect-client
echo ok|pip install egenix-pyopenssl
pip install ofxparse
yum install python-lesscpy
yum install nodejs
yum install npm
npm install less -g
npm install -g less-plugin-clean-css
# rpm -ivh /var/tmp/wkhtmltox-0.12.1_linux-centos6-amd64.rpm
# This one line command will download the binary and install to /usr/local, strip the first level wkhtmltox dirname.
# directly install to /usr/local
# cd /usr/local; wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz -O – |xzcat – |tar xvf – –strip
===============================
2017.12.12 后记:
在 Anaconda 环境下,安装 Odoo 8 ,需要先创建 Python 2.7 环境:
# conda create -n py27 python=2.7
创建完毕后,# activate py27
然后再重新用 pip install 或者 conda install 安装以上的软件包。
再把 /etc/init.d/odoo 文件里的 python 指向 /opt/anaconda3/envs/py27/bin/python