Odoo12源码安装流程(参考)

请提前准备:Linux(ubuntu 14.04)、Anaconda3、Git

  1. Linux安装基础组建:
    sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

  2. 获取Odoo源码
    git clone https://github.com/odoo/odoo.git

  3. 用anaconda安装一个python3.5的虚拟环境
    conda create -n py35 python=3.5

  4. 切换到对应的虚拟环境
    source activate py35

  5. 创建odoo用户
    adduser odoo
    passwd odoo
    连续两次输入密码(例如:odoo)

  6. 切换到pull下的odoo文件夹,安装odoo提供的requirements
    pip install -r requirements.txt

  7. 如果报错:

Found existing installation: pytz 2017.2
Cannot uninstall 'pytz'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

手动删除pytz库,举个栗子:
cd /home/root/anaconda3/envs/py35/lib/python3.5/site-packages
rm -rf pytz*

  1. 然后在安装一次依赖:
    pip install -r requirements.txt

  2. 运行./odoo-bin -s
    如果报错: ValueError: unknown locale: UTF-8
    解决:sudo vim ~/.zshrc
    正文输入:export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8
    保存后编译:source ~/.zshrc

  3. 找到-s自动生成的配置文件
    odoo: Using configuration file at /home/odoo/.odoorc

    image.png

  4. 修改并移动配置文件
    mv /home/odoo/.odoorc /home/odoo/odoo12.conf
    vim /home/odoo/odoo12.conf
    大致修改一下几个参数来配置psql数据库:


    image.png
  1. ./odoo-bin -c odoo12.conf
    如果启动没有问题,访问localhost:8069,创建数据库,如果出现scss的界面报错,请安装:
    pip3 install libsass
    再次重启 ./odoo-bin -c odoo12.conf

启动后样式请参看:Demo环境访问测试 admin/admin

你可能感兴趣的:(Odoo12源码安装流程(参考))