Centos7.4源安装odoo10.0步骤以及常见问题解决

1.使用用户登录操作,不使用root超级用户

使用linxi用户进行操作(用户自定义创建,本文采用linxi用户作为示范)

# su - linxi

安装基本依赖

$ sudo yum update && sudo apt-get upgrade             #安装系统更新
$ sudo yum install git                                #安装Git
$ sudo yum install gcc                                #安装gcc编译器
$ sudo yum install npm                                #安装npm包管理器
$ sudo npm install -g less less-plugin-clean-css      #安装less编译器

 在odoo-dev文件加下安装odoo方便管理

$ mkdir ~/odoo-dev                                             #创建一个工作目录
$ cd ~/odoo-dev                                                #进入我们的工作目录
$ git clone https://github.com/odoo/odoo.git -b 10.0 --depth=1 #获取Odoo10源代码

2.给普通用户添加sudo权限

进入超级用户root模式

$ su

添加写权限

# chmod u+w /etc/sudoers

编辑文件,在root ALL=(ALL) ALL下添加   linxi ALL=(ALL) ALL

# vim /etc/sudoers

关闭写权限

# chmod u-w /etc/sudoers

返回用户

# su - linxi

3.安装系统以及工具

$ sudo yum update && sudo yum upgrade#安装系统更新

1)安装并升级pip

首先安装epel扩展源:

$ sudo yum -y install epel-release

更新完成之后,就可安装pip:

$ sudo yum -y install python-pip

 更新升级pip避免setuptools1.4不可用,因为setuptools0.9使用不了

$ sudo pip install --upgrade pip

安装完成之后清除cache: 

$ sudo yum clean all

2)启动安装系统依赖

安装libxslt开发包以及lxml 

$ sudo yum install libxslt-devel
$ sudo pip install lxml

安装pythono-devel以及penldap-devel

$ sudo yum install python-devel
$ sudo yum install openldap-devel

所以使用以下代码进行安装odoo系统依赖   

$ sudo pip install -r requirements.txt

出现setuptools安装报错,进行升级setuptools到1.4 

$ sudo pip install --upgrade setuptools

重新继续安装 

$ sudo pip install -r requirements.txt

4.启动odoo时,数据库报错,解决用户权限问题

用posgres超级用户进行创建数据库用户

postgres=# create role linxi;

普通用户并非为postgresql的超级用户,无创建数据库的权限等等

Could not create database `linxi`. (permission denied to create database)

 进入postgresql查看用户列表

postgres=# \du
List of roles

 Role name |                   Attributes                   | Member of

-----------+------------------------------------------------+-----------

 linxi     |                                                | {}

 postgres  | Superuser, Create role, Create DB, Replication | {}

 给指定用户添加权限,最简洁的方法就是直接设为超级用户

postgres=#alter user linxi superuser;
List of roles

 Role name |                   Attributes                   | Member of

-----------+------------------------------------------------+-----------

 linxi     | Superuser                                      | {}

 postgres  | Superuser, Create role, Create DB, Replication | {}

 退出psql

postgres=# \q

5.启动odoo

从odoo-bin进行启动

$ ~/odoo-dev/odoo/odoo-bin start

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值