於 CentOS 7.0 安裝 odoo 9.0(遠端資料庫)- 安裝篇

You are here:
  • Main
  • 於 CentOS 7.0 安裝 odoo 9.0(遠端資料庫)- 安裝篇
< All Topics

此篇教學是使用 CentOS 7.0 Minimal ISO – CentOS-7-x86_64-Minimal-1611.iso 安裝初始系統

yum -y update
yum install -y wget vim open-vm-tools epel-release unzip python2-pip gcc python-psutil python-ldap
調整防火牆規則
firewall-cmd --zone=public --permanent --add-port=8069/tcp && firewall-cmd --reload
安裝 postgresql 9.6.9 版(遠端 PostgreSQL Server 使用 9.6.9 版)
yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/postgresql96-9.6.9-1PGDG.rhel7.x86_64.rpm https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/postgresql96-libs-9.6.9-1PGDG.rhel7.x86_64.rpm
安裝 Python 相依性模組
wget https://raw.githubusercontent.com/odoo/odoo/9.0/requirements.txt
pip install --upgrade pip && pip install --upgrade setuptools
pip install xlrd xlsxwriter
pip install pillow greenlet lxml
sed
pip install -r requirements.txt
 >= pillow greenlet lxml pyparsing reportlab
remove psutil ldap 
建立 Odoo 9.0 的 yum repo
wget https://nightly.odoo.com/9.0/nightly/rpm/odoo.repo -P /etc/yum.repos.d/
安裝 Odoo 9.0
yum update && yum install -y odoo
編輯 config 檔
vim /etc/odoo/openerp.conf

[options]
; This is the password that allows database operations:
admin_passwd = 要使用的密碼
db_host = 遠端資料庫 IP
db_port = 5432
db_user = 遠端資料庫用戶名稱
db_password = 遠端資料庫用戶密碼
;dbfilter = ^%d$
addons_path = /opt/odoo10_apps,/usr/lib/python2.7/site-packages/openerp/addons
logfile = /var/log/odoo/odoo-server.log
workers = 8
;limit_memory_hard = 805306368
;limit_memory_soft = 671088640
;limit_request = 8192
;limit_time_cpu = 600
;limit_time_real = 1200
max_cron_threads = 1
安裝 wkhtmltopdf(用於產生 PDF 報表)
yum install -y https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
安裝中文字型
mv /home/cewolf/dejavu.tar.gz /usr/share/fonts/ && cd /usr/share/fonts/
tar zxvf dejavu.tar.gz
fc-cache -fv
啟動 odoo 並設定為開機服務
systemctl start odoo && systemctl enable odoo

就有一個完整的 Odoo 系統了

Table of Contents