Howto install Odoo 11

crm

(Markus Neuberger) #1

Hi,

Odoo 11 is working on Nethserver. :sunglasses:
Git is used now to download odoo and python35 needs to be installed.

Installation

To use a more secure postgresql password change “SECRET” to whatever you like. Don’t forget to change it in the configuration part below too.

# install dependencies
yum -y install nethserver-postgresql rh-python35 git gcc wget nodejs-less libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel postgresql-devel https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-centos7-amd64.rpm

# create odoo user
useradd -m -U -r -d /opt/odoo -s /bin/bash odoo

# create odoo db and db user
su - postgres
psql
CREATE ROLE odoo WITH LOGIN password 'SECRET';
CREATE DATABASE odoo ENCODING 'UTF8' OWNER odoo TEMPLATE template0;
\q
exit

# open firewall port 8069
config set fw_odoo service status enabled TCPPort 8069 access green
signal-event firewall-adjust

# install odoo from git as user odoo
su - odoo
git clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 /opt/odoo/odoo11
scl enable rh-python35 bash
cd /opt/odoo

# create and activate virtual environment for odoo
python3 -m venv odoo11-venv
source odoo11-venv/bin/activate

# install odoo requirements
pip3 install -r odoo11/requirements.txt

# exit virtual environment
deactivate && exit
exit

Configuration

You may change the admin_passwd, it’s set to admin here:

# create odoo config file
cat << EOL > /etc/odoo11.conf
[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo
db_password = SECRET
addons_path = /opt/odoo/odoo11/addons
; If you are using custom modules
; addons_path = /opt/odoo/odoo11/addons,/opt/odoo/odoo11-custom-addons
EOL

# create odoo service
cat << EOL > /etc/systemd/system/odoo11.service
[Unit]
Description=Odoo11
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
SyslogIdentifier=odoo11
PermissionsStartOnly=true
User=odoo
Group=odoo
ExecStart=/usr/bin/scl enable rh-python35 -- /opt/odoo/odoo11-venv/bin/python3 /opt/odoo/odoo11/odoo-bin -c /etc/odoo11.conf
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target
EOL

# apply/enable service and start odoo
systemctl daemon-reload
systemctl enable odoo11 --now

Odoo is now reachable at http://YOURNETHSERVER:8069. Username and password is admin, if you didn’t change.

Source:


Howto install Odoo 10