ubuntu 20.04.3如何安装odoo15.0社区版

环景:

Ubuntu 20.04.3-live-server
Odoo 15.0-20220214 (社区版)

问题描述:

ubuntu 20.04.3如何安装odoo15.0
ubuntu 20.04.3如何安装odoo15.0社区版_第1张图片

解决方案:

1.通过 apt-get 安装postgres

以 root 用户下依次执行如下命令

安装postgresql 12.9

 apt-get install postgresql

ubuntu 20.04.3如何安装odoo15.0社区版_第2张图片
2.查看数据库服务是否正常运行

service postgresql status

ubuntu 20.04.3如何安装odoo15.0社区版_第3张图片

3.创建一个odoo15用户
也可直接创建一个与接下来的用户名相同的用户
su - postgres

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo15

设置密码

进入数据库

psql
ALTER USER odoo15 WITH SUPERUSER;

退出

\q

ubuntu 20.04.3如何安装odoo15.0社区版_第4张图片
建系统用户

 adduser --system --home=/opt/odoo --group odoo

4.通过 apt-get 安装odoo15

wget -O - https://nightly.odoo.com/odoo.key | apt-key add -

echo "deb http://nightly.odoo.com/15.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list

更新软件源 并安装odoo15

apt-get update && apt-get install odoo

在线下载odoo时间较长
ubuntu 20.04.3如何安装odoo15.0社区版_第5张图片
通过apt-get install 的odoo 会自动安装Python一些依赖,完成如上的步骤后,odoo已经可以成功启动了

5.查看odoo服务

查看运行状态
systemctl status odoo.service

● odoo.service - Odoo Open Source ERP and CRM
     Loaded: loaded (/lib/systemd/system/odoo.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-02-15 14:33:51 CST; 54min ago
   Main PID: 698 (python3)
      Tasks: 4 (limit: 9369)
     Memory: 247.6M
     CGroup: /system.slice/odoo.service
             └─698 python3 /usr/bin/odoo --config /etc/odoo/odoo.conf --logfile /var/log/odoo/odoo-server.log

Feb 15 14:37:55 lang odoo[698]:         Is the server running locally and accepting
Feb 15 14:37:55 lang odoo[698]:         connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Feb 15 14:37:55 lang odoo[698]:     return fun(self, *args, **kwargs)
Feb 15 14:37:55 lang odoo[698]:   File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 655, in borrow
Feb 15 14:37:55 lang odoo[698]:     result = psycopg2.connect(
Feb 15 14:37:55 lang odoo[698]:   File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 126, in connect
Feb 15 14:37:55 lang odoo[698]:     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
Feb 15 14:37:55 lang odoo[698]: psycopg2.OperationalError: could not connect to server: No such file or directory
Feb 15 14:37:55 lang odoo[698]:         Is the server running locally and accepting
Feb 15 14:37:55 lang odoo[698]:         connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"

查看运行日志

tail -f  /var/log/odoo/odoo-server.log
2022-02-15 15:23:50,271 698 INFO oddo15 werkzeug: 192.168.1.54 - - [15/Feb/2022 15:23:50] "POST /longpolling/poll HTTP/1.1" 200 - 3 0.001 50.007
2022-02-15 15:24:40,287 698 INFO oddo15 werkzeug: 192.168.1.54 - - [15/Feb/2022 15:24:40] "POST /longpolling/poll HTTP/1.1" 200 - 3 0.001 50.007
2022-02-15 15:25:30,303 698 INFO oddo15 werkzeug: 192.168.1.54 - - [15/Feb/2022 15:25:30] "POST /longpolling/poll HTTP/1.1" 200 - 3 0.001 50.007
2022-02-15 15:26:20,318 698 INFO oddo15 werkzeug: 192.168.1.54 - - [15/Feb/2022 15:26:20] "POST /longpolling/poll HTTP/1.1" 200 - 3 0.001 50.006
2022-02-15 15:27:10,332 698 INFO oddo15 werkzeug: 192.168.1.54 - - [15/Feb/2022 15:27:10] "POST /longpolling/poll HTTP/1.1" 200 - 3 0.001 50.006

7.web登录配置测试

IP:8069
Demo Date打钩 进去先看看
ubuntu 20.04.3如何安装odoo15.0社区版_第6张图片
ubuntu 20.04.3如何安装odoo15.0社区版_第7张图片

你可能感兴趣的:(Ubuntu,ubuntu,linux,运维)