Install Odoo 11 on CentOS 7
2019独角兽企业重金招聘Python工程师标准>>>
Odoo is the most popular all-in-one business software in the world. It offers a range of business applications including CRM, website, e-Commerce, billing, accounting, manufacturing, warehouse, project management, inventory and much more, all seamlessly integrated.
Odoo 11 requires Python 3.5 which is not available in the CentOS repositories. Because of that, we cannot install the Odoo package via yum from the Odoo repository.
We either run Odoo in a docker container or install it in a Python virtual environment.
In this tutorial, we’ll walk you through how to install Odoo 11 using Git source and Python virtual environment on a CentOS 7 machine.
Before you begin
Log in to you CentOS machine as a sudo user and update the system to the latest packages:
sudo yum update
Enable the EPEL repository by typing:
sudo yum install epel-release
We will install Python 3.5 packages from the Software Collections (SCL) repository.
By enabling SCL you will gain access to the newer versions of programming languages and services which are not available in the core repositories. Enable the SCL repository with the following command:
sudo yum install centos-release-scl
Install Python 3.5 packages, with the following command:
sudo yum install rh-python35
Finally install git
, pip
and all the tools required to build Odoo dependencies:
sudo yum install git gcc wget nodejs-less libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel postgresql-devel
Create Odoo user
Create a new system user and group with home directory /opt/odoo
that will run the Odoo service:
sudo useradd -m -U -r -d /opt/odoo -s /bin/bash odoo
You can name the user whatever you like, just make sure you create a PostgreSQL user with the same name.
Install and configure PostgreSQL
Install the PostgreSQL server and create a new PostgreSQL database cluster:
sudo yum install postgresql-serversudo postgresql-setup initdb
Once the installation is completed, enable and start the PostgreSQL service:
sudo systemctl enable postgresqlsudo systemctl start postgresql
Create a PostgreSQL user with the same name as the previously created system user, in our case odoo
:
sudo su - postgres -c "createuser -s odoo"
Install Wkhtmltopdf
The wkhtmltox
package provides a set of open source command line tools which can render HTML into PDF and various image formats. In order to print PDF reports, you will need the wkhtmltopdf
tool. The recommended version for Odoo is 0.12.1
which is not available in the official CentOS 7 repositories.
To download and install the recommended version run the following commands:
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-centos7-amd64.rpmsudo yum localinstall wkhtmltox-0.12.1_linux-centos7-amd64.rpm
Install and configure Odoo 11
We will install Odoo from the GitHub repository so we can have more control over versions and updates. We will also use virtualenv which is a tool to create isolated Python environments.
Before starting with the installation process, make sure you switch to the odoo
user.
sudo su - odoo
To confirm that you are logged-in as odoo
user you can use the following command:
whoami
Now we can start with the installation process, first clone the odoo from the GitHub repository:
git clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 /opt/odoo/odoo11
Enable software collections so we can access the python 3.5 binaries:
scl enable rh-python35 bash
Create a new virtual environment for our Odoo installation with:
cd /opt/odoopython3 -m venv odoo11-venv
activate the environment:
source odoo11-venv/bin/activate
and install all required Python modules:
pip3 install -r odoo11/requirements.txt
If you encounter any compilation errors during the installation, make sure that you installed all of the required dependencies listed in the Before you begin
section.
Once the installation is completed deactivate the environment and switch back to your sudo user using the following commands:
deactivate
exit
If you plan to install custom modules it is best to install those modules in a separate directory. To create a new directory for the custom modules run:
sudo mkdir /opt/odoo/odoo11-custom-addonssudo chown odoo: /opt/odoo/odoo11-custom-addons
Next, we need to create a configuration file:
/etc/odoo11.conf
[options]
; This is the password that allows database operations:
admin_passwd = superadmin_passwd
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /opt/odoo/odoo11/addons
; If you are using custom modules
; addons_path = /opt/odoo/odoo11/addons,/opt/odoo/odoo11-custom-addons
Do not forget to change the superadmin_passwd
to something more secure and adjust the addons_path
if you’re using custom modules.
Create a systemd unit file
To run odoo as a service we will create a odoo11.service
unit file in the /etc/systemd/system/
directory with the following contents:
/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
Notify systemd
that we have created a new unit file and start the Odoo service by executing:
sudo systemctl daemon-reloadsudo systemctl start odoo11
You can check the service status with the following command:
sudo systemctl status odoo11
● odoo11.service - Odoo11Loaded: loaded (/etc/systemd/system/odoo11.service; disabled; vendor preset: disabled)Active: active (running) since Wed 2018-03-28 20:13:30 UTC; 6s agoMain PID: 16174 (scl)CGroup: /system.slice/odoo11.service├─16174 /usr/bin/scl enable rh-python35 -- /opt/odoo/odoo11-venv/bin/python3 /opt/odoo/odoo11/odoo-bin -c /etc/odoo11.conf├─16175 /bin/bash /var/tmp/sclihoNjg└─16178 /opt/odoo/odoo11-venv/bin/python3 /opt/odoo/odoo11/odoo-bin -c /etc/odoo11.conf
and if there are no errors you can enable the Odoo service to be automatically started at boot time:
sudo systemctl enable odoo11
If you want to see the messages logged by the Odoo service you can use the command below:
sudo journalctl -u odoo11
Test the Installation
Open your browser and type: http://<your_domain_or_IP_address>:8069
Assuming the installation is successful, a screen similar to the following will appear:
If you can’t access the page then probably your firewall is blocking port 8069.
Conclusion
This tutorial walked you through the installation of Odoo 11 on CentOS 7 in a Python virtual environment.
You may also want to check our tutorial about how to create automatic daily backups of your Odoo databases.
If you hit a problem or have feedback, leave a comment below.
也可以参考这里:https://alanhou.org/centos-7-odoo-11/
转载于:https://my.oschina.net/ethanleellj/blog/3033320
Install Odoo 11 on CentOS 7相关推荐
- 在Ubuntu上安装Odoo 11(企业版)
2019独角兽企业重金招聘Python工程师标准>>> 在Ubuntu上安装Odoo 11(企业版) 2017年10月8日YENTHE666 在本教程中,我将学习如何在Ubuntu ...
- QIIME 2教程. 01简介和安装 Introduction Install(2020.11开始更新)
写在前面 QIIME是微生物组领域最广泛使用的分析流程,10年来引用20000+次,2019年Nature杂志评为近70年来人体菌群研究的25个里程碑事件--里程碑16:生物信息学工具助力菌群测序数据 ...
- 转载--How to Install VMware Tools on CentOS 6.3
源地址:http://www.ehowstuff.com/how-to-install-vmware-tools-on-centos-6-3/ VMware Tools is a group of u ...
- QIIME 2教程. 01简介和安装 Introduction Install(2020.11)
文章目录 写在前面 QIIME 2的优势 QIIME 2用户文档(版本:2020.11) 视频:QIIME 2用户文档01.1 简介 入门指南 什么是QIIME 2? 核心概念 数据文件: QIIME ...
- How to Install MariaDB 10 on CentOS 6.7
为什么80%的码农都做不了架构师?>>> 1. Add the Official MariaDB Yum Repository First off, we need to ad ...
- 20190503(cmake安装,利用libwebsockets库去实现http服务器,websocket服务器,虚拟机安装)
目录 1.libwebsockets简介安装 2.libwebsockets实现简易http服务器 3.实现简易websocket服务器 4.websocket介绍 5.虚拟机安装 1.libwebs ...
- centos 6.8 编译安装git 2.11.0
系统环境:CentOS release 6.8 (Final) 默认Git :1.7.1 需求git :2.11 卸载centos自带的git:yum remove git -y 下载git-2.11 ...
- How to Install Snapd and Snap applications on CentOS 7
转载来源:https://computingforgeeks.com/install-snapd-snap-applications-centos-7/ How to Install Snapd an ...
- 在CentOS 7.7 x86_64上安装python3.11.0实录
整个安装过程基本上参照原来的博文 https://blog.csdn.net/tao_627/article/details/105674448 但是这里有新的注意点就是,ssl使用了新的openss ...
最新文章
- QMutex pointer is misaligned的问题
- MySQL创建视图的语法格式
- Web前端人员如何面试?常见vue面试题有哪些?
- Nginx负载均衡的原理及流程分析
- TensorFlow和ML前5名的课程
- A Story of One Country (Hard)(中途相遇法/启发式分裂)
- C|C++中的静态全局变量,静态局部变量,全局变量,局部变量的区别
- 【SQL】找出行数与自增标识值不相等的表(即有缺行)
- Run-time error “70“:Permission denied
- matlab求微分方程精确解,matlab求微分方程精确解及近似解.ppt
- 兴业银行研发中心笔试题_2021国考笔试成绩即将发布,面试重点考什么?
- 虚拟机的安装中遇到的问题(WIN10主机)
- 手机号识别轻松对着号码扫一扫就录入了
- WinDbg 蓝屏分析 Windows Dump 文件教程
- Java SE基础教程——Eclipse开发工具的安装与使用
- Win7+vmware+xpsp3+vs2010驱动开发环境搭建及调试方法
- Linux下使用USB转串口转换器
- FreeImage通用图像加载实现
- 金蝶旗舰版固定资产计提折旧报错‘费用分配表所引用的*是非明细的核算项目’,如何解决?
- ajax poker,《使命召唤15》大逃杀模式介绍 人物解锁方法一览
热门文章
- 1 睡眠唤醒_一劳永逸解决WIN10所有睡眠问题
- python 栈【测试题】
- 你不知道的 Node.js 工具函数
- 阿里云服务器购买该如何选择?阿里云服务器购买步骤流程介绍...
- 线程管理(九)使用本地线程变量
- 解决Qt5 Creator无法切换输入法(fcitx),Ubuntu中不能使用搜狗输入法录入汉字问题...
- 4个常用的awk统计命令
- Exchange Connector 访问报错解决方法一
- JavaScript中encodeURI,encodeURIComponent与escape的注意
- 基于dnn的车牌识别_自然场景中文文字识别,身份证火车票都能识别