• CentOS 7安装odoo 15


    想管理本部门的物品和库房,决定采用仓库软件来管理,开源的好像没有看到比较简单的,最后选择odoo和axelor来对比,发现后者在中国比较少,不支持中文,于是放弃。(axelor docker安装比较简单。)

    odoo是ERP软件,两年前安装过,今日再次安装,赶紧记录下来。装了两次:1,昨天网上找到centos 7安装odoo14(知乎上有兄弟专门介绍);2,今日开始结合多篇文章,安装odoo15.

    更新系统:

     yum update -y

     yum install -y epel-release

    安装python39: 有点困难的地方

    sudo yum install gcc gcc-c++ openssl-devel bzip2-devel libffi-devel libxml2-devel libxslt-devel libjpeg-turbo-devel openldap-devel -y

     wget https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz
     yum install -y wget

     tar xzf Python-3.9.9.tgz
     cd Python-3.9.9
     ./configure --enable-optimizations
     sudo make altinstall 
     python3.9 -V

    创建用户:

    sudo useradd -m -U -r -d /opt/odoo -s /bin/bash odoo
    sudo yum install git gcc wget nodejs libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel

    安装数据库:

     sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
     yum list postgresql
     sudo yum install -y postgresql14-server
     sudo /usr/pgsql-14/bin/postgresql-14-setup initdb
     sudo systemctl enable postgresql-14
     sudo systemctl start postgresql-14
     sudo systemctl status postgresql-14
     sudo su - postgres -c "createuser -s odoo"

     sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm
     sudo yum localinstall wkhtmltox-0.12.5-1.centos7.x86_64.rpm

    安装ODOO15:

    sudo su - odoo

    git clone https://github.com/odoo/odoo.git --depth 1 --branch 15.0 /opt/odoo/odoo15

    发现3小时没有动静,ctrl + c后再来就好了。

     cd /opt/odoo
     python3.9 -m venv odoo15-venv
     source odoo15-venv/bin/activate
     pip3 install -r odoo15/requirements.txt
     /opt/odoo/odoo15-venv/bin/python3.9 -m pip install --upgrade pip 上一步出错后需要更新一下pip
     pip3 install -r odoo15/requirements.txt 再来会报以下错:Error: pg_config executable not found.

     转到root然后执行:yum install postgresql postgresql-devel python-devel

     deactivate && exit


    sudo mkdir /opt/odoo/odoo15-custom-addons
    udo chown odoo: /opt/odoo/odoo15-custom-addons
    sudo mkdir /var/log/odoo15
    sudo touch /var/log/odoo15/odoo.log
    sudo chown -R odoo: /var/log/odoo15/
    vi /etc/odoo.conf

    [options]
    ; This is the password that allows database operations:
    admin_passwd = passwd
    db_host = False
    db_port = False
    db_user = odoo
    db_password = False
    xmlrpc_port = 8069
    ; longpolling_port = 8072
    logfile = /var/log/odoo15/odoo.log
    logrotate = True
    addons_path = /opt/odoo/odoo15/addons,/opt/odoo/odoo15-custom-addons

    sudo chown odoo:odoo /etc/odoo.conf

    sudo chmod 640 /etc/odoo.conf
     

    vi /etc/systemd/system/odoo15.service

    [Unit]
    Description=Odoo15
    Requires=postgresql-14.service
    After=network.target postgresql-14.service
    [Service]
    Type=simple
    SyslogIdentifier=odoo15
    PermissionsStartOnly=true
    User=odoo
    Group=odoo
    ExecStart=/opt/odoo/odoo15-venv/bin/python3.9 /opt/odoo/odoo15/odoo-bin -c /etc/odoo.conf
    StandardOutput=journal+console
    [Install]
    WantedBy=multi-user.target

     sudo systemctl daemon-reload
     sudo systemctl start odoo15.service
     sudo systemctl enable odoo15.service
     sudo systemctl status odoo15.service

    IP:8069

    最后就能看到界面了。

  • 相关阅读:
    jenkins+ant+jmeter实现自动化集成(详解)
    Android ADB命令 adb devices 出现error:protocol fault (no status)
    使用jmeter做接口测试
    估计新版本所需要的案例数量
    《将博客搬至CSDN》
    HDFS NN refreshNodes操作的可用性和效率的改进
    visudo: /etc/sudoers 忙,请稍后重试解决办法
    Java try与finally对返回值的影响
    Java中基本类型和包装类比较的问题
    Java中ArrayList去重方法
  • 原文地址:https://www.cnblogs.com/Beewolf/p/15771702.html
Copyright © 2020-2023  润新知