การติดตั้ง Openerp 7 บน Ubuntu Server 14.04
โพสต์แล้ว: พฤหัสฯ. 18 ก.ย. 2014 10:18 pm
คำสั่งที่ใช้ครับ
โค้ด: เลือกทั้งหมด
sudo su apt-get update
โค้ด: เลือกทั้งหมด
sudo su apt-get upgrade
โค้ด: เลือกทั้งหมด
echo "deb http://nightly.openerp.com/7.0/nightly/deb/ ./" >> /etc/apt/sources.list
โค้ด: เลือกทั้งหมด
sudo su apt-get update
โค้ด: เลือกทั้งหมด
sudo su apt-get install openerp
เสร็จแล้วครับ
ถ้าติดตั้งฐานข้อมูลไม่ผ่าน run คำสั่งจัดการ user PG
โค้ด: เลือกทั้งหมด
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
เพิ่มเติม การติดตั้งจาก Github
Step 1: Update server packages.
โค้ด: เลือกทั้งหมด
# apt-get update
Step 2: Install Git, PostgreSQL, Python และอื่นๆ
โค้ด: เลือกทั้งหมด
# apt-get install git postgresql python-dateutil python-feedparser python-gdata python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil wget python-unittest2 python-mock python-jinja2 python-dev libpq-dev poppler-utils python-pdftools antiword python-pypdf python-setuptools python-pybabel
Step 3: ติดตั้ง PostgreSQL user สำหรับ Odoo.
โค้ด: เลือกทั้งหมด
# su - postgres -c "createuser -s odoo" 2> /dev/null || true
Step 4: Download Odoo.
version 8.0:
โค้ด: เลือกทั้งหมด
# git clone https://github.com/odoo/odoo.git --branch 8.0
version 7.0:
โค้ด: เลือกทั้งหมด
# git clone https://github.com/odoo/odoo.git --branch 7.0
Step 5: ติดตั้ง GData.
โค้ด: เลือกทั้งหมด
# cd ~/
# wget http://gdata-python-client.googlecode.com/files/gdata-2.0.18.tar.gz
# tar zxvf gdata-2.0.18.tar.gz
# cd gdata-2.0.18/
# python setup.py install
Step 6:ติดตั้ง Odoo Server.
โค้ด: เลือกทั้งหมด
#cd /home/odoo/
#python setup.py install
สร้าง odoo-server.conf ที่ directiry /etc.
โค้ด: เลือกทั้งหมด
# nano /etc/odoo-server.conf
[options]
; This is the password that allows database operations:
; admin_passwd = admin
; db_host = False
; db_port = False
; db_user = postgres
; db_password = admin
[options]
## Server startup config - Common options
# Admin password for creating, restoring and backing up databases
admin_passwd = admin
# specify additional addons paths (separated by commas)
addons_path = /home/odoo/addons
## XML-RPC / HTTP - XML-RPC Configuration
# disable the XML-RPC protocol
xmlrpc = True
# Specify the TCP IP address for the XML-RPC protocol. The empty string binds to all interfaces.
xmlrpc_interface = 0.0.0.0
# specify the TCP port for the XML-RPC protocol
xmlrpc_port = 8069
# Enable correct behavior when behind a reverse proxy
proxy_mode = True
## XML-RPC / HTTPS - XML-RPC Secure Configuration
# disable the XML-RPC Secure protocol
xmlrpcs = True
# Specify the TCP IP address for the XML-RPC Secure protocol. The empty string binds to all interfaces.
xmlrpcs_interface =
# specify the TCP port for the XML-RPC Secure protocol
xmlrpcs_port = 8071
# specify the certificate file for the SSL connection
secure_cert_file = server.cert
# specify the private key file for the SSL connection
secure_pkey_file = server.pkey
## NET-RPC - NET-RPC Configuration
# enable the NETRPC protocol
netrpc = False
# specify the TCP IP address for the NETRPC protocol
netrpc_interface = 127.0.0.1
# specify the TCP port for the NETRPC protocol
netrpc_port = 8070
## WEB - Web interface Configuration
# Filter listed database REGEXP
dbfilter = .*
## Static HTTP - Static HTTP service
# enable static HTTP service for serving plain HTML files
static_http_enable = False
# specify the directory containing your static HTML files (e.g '/var/www/')
static_http_document_root = None
# specify the URL root prefix where you want web browsers to access your static HTML files (e.g '/')
static_http_url_prefix = None
## Testing Group - Testing Configuration
# Launch a YML test file.
test_file = False
# If set, will save sample of all reports in this directory.
test_report_directory = False
# Enable YAML and unit tests.
test_disable = False
# Commit database changes performed by YAML or XML tests.
test_commit = False
## Logging Group - Logging Configuration
# file where the server log will be stored (default = None)
logfile = /var/log/odoo/odoo-server.log
# do not rotate the logfile
logrotate = True
# Send the log to the syslog server
syslog = False
# setup a handler at LEVEL for a given PREFIX. An empty PREFIX indicates the root logger. This option can be repeated. Example: "openerp.orm:DEBUG" or "werkzeug:CRITICAL" (default: ":INFO")
log_handler = ["[':INFO']"]
# specify the level of the logging. Accepted values: info, debug_rpc, warn, test, critical, debug_sql, error, debug, debug_rpc_answer, notset
#log_level = debug
log_level = info
เปิด Port ubuntu firewall.
โค้ด: เลือกทั้งหมด
# ufw allow 80
# ufw allow 8072
# ufw allow 8069
สร้าง User Odoo
โค้ด: เลือกทั้งหมด
# useradd -s /bin/sh odoo
# mkdir /var/log/odoo
# chown -R odoo /home/odoo /var/log/odoo
Step 7: ทดสอบ
start Odoo
โค้ด: เลือกทั้งหมด
# su odoo -c '/home/odoo/openerp-server -c /etc/odoo-server.conf'
ตรวจสอบ log ว่า server เริ่มการทำงานแล้ว
โค้ด: เลือกทั้งหมด
# tail -f /var/log/odoo/odoo-server.log
สุดท้าย http://your_IP_Address:8069
จบครับ