Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


ERP - Odoo Thảo luận chung về Vtiger CRM, Sugar CRM

Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 25-12-2021, 02:13 AM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
Installing high availability Odoo 11 on ubuntu 16.04
Installing high availability Odoo 11 on ubuntu 16.04








Note : There is no major difference for installing odoo community and odoo enterprise version.
Overall System Architecture

If python is already installed, make sure you have installed python version 3.5 or above. Previous versions of python are not compatible with odoo 11.
Installation Guide

In this tutorial, I assume that you have properly configured your network for the required servers and you have basic networking knowledge to replace/change ip addresses mentioned throughout this tutorial with the appropriate ip addresses.
Database Server(s) Installation

Step 1 : Installation
Before you proceed for the installation, make sure you have configured locale settings properly.
Copy to Clipboard

1

sudo apt-get -y install postgresql postgresql-contrib








Step 2 : Create user with password


Copy to Clipboard

1

sudo -u postgres createuser odoo11
2

sudo -u postgres psql
3

psql=# alter user odoo11 with encrypted password '';








Step 3 : Allow remote connection from application servers

All below lines in /etc/postgresql/9.5/main/pg_hba.conf file on top

Copy to Clipboard

1

host all odoo8 192.168.1.51/32 trust
2

host all odoo8 192.168.1.52/32 trust
3

host all odoo8 192.168.1.53/32 trust
4

host all odoo8 192.168.1.54/32 trust








Restart postgresql service


Copy to Clipboard

1

systemctl restart postgresql








Application Server(s) Installation

Follow mentioned steps on each of the application server(s) to install odoo application only. For simplicity I will be using the debian package to install the odoo server, you can also follow the manual installation process from other tutorials.
Step 1 : Download latest version


Copy to Clipboard

1

http://nightly.odoo.com/11.0/nightly...latest_all.deb








Step 2 : Install odoo

Before you proceed for this command make sure that your locale is setup properly if you are using VPS.

Copy to Clipboard

1

dpkg -i odoo_11.0.latest_all.deb








If you encounter the blow error during the installation.

Copy to Clipboard


1

# dpkg -i odoo_11.0.latest_all.deb
2

Selecting previously unselected package odoo.
3

(Reading database ... 26866 files and directories currently installed.)
4

Preparing to unpack odoo_11.0.latest_all.deb ...
5

Unpacking odoo (11.0.20171114) ...
6

dpkg: dependency problems prevent configuration of odoo:
7

odoo depends on python3-babel; however:
8

Package python3-babel is not installed.
9

odoo depends on python3-dateutil; however:
10

Package python3-dateutil is not installed.
11

odoo depends on python3-decorator; however:
12

Package python3-decorator is not installed.
13

odoo depends on python3-docutils; however:
14

Package python3-docutils is not installed.
15

odoo depends on python3-feedparser; however:
16

Package python3-feedparser is not installed.
17

odoo depends on python3-gevent; however:
18

Package python3-gevent is not installed.
19

odoo depends on python3-html2text; however:
20

Package python3-html2text is not installed.
21

odoo depends on python3-jinja2; however:
22

Package python3-jinja2 is not installed.
23

odoo depends on python3-lxml; however:
24

Package python3-lxml is not installed.
25

odoo depends on python3-mako; however:
26

Package python3-mako is not installed.
27

odoo depends on python3-mock; however:
28

Package python3-mock is not installed.
29

odoo depends on python
30

dpkg: error processing package odoo (--install):
31

dependency problems - leaving unconfigured
32

Processing triggers for systemd (229-4ubuntu12) ...
33

Errors were encountered while processing:
34

odoo
35










You can run,

Copy to Clipboard

1

apt-get install -f








This command will installed all the dependency libraries on the system.
Note : Debian package installer by default install postgresql as dependent package, we can stop the postgresql service and remove service from the system startup service list.
Copy to Clipboard

1

sudo systemctl stop postgresql
2

sudo update-rc.d postgresql disable








Step 3 : Database configurations

Let’s help application server to find the database from the configuration file. (/etc/odoo/openerp-server.conf)

Copy to Clipboard

1

db_host = 192.168.1.61
2

db_port = 5432
3

db_user = odoo11
4

db_password = xxxx







Note : Don’t forgot to replace your database name and database password with appropriate values.

Step 4 : Custom Modules

To install the custom modules on all application server, you need to configure NFS to share the directory which can be accessible from all the application and which should be mounted automatically on system startup.
After successful configuration of NFS on all application server you can add mount path in addons_path param(can be found on odoo configuration file)
Load Balancer Installation

Step 1 : Install nginx


Copy to Clipboard

1

sudo apt-get install nginx








Step 2 : Nginx site configuration

Create a configuration file under /etc/nginx/sites-enabled/xyz.com.conf with below content. Don’t forgot to change the domain name and SSL certificate path.

Copy to Clipboard
upstream backend { server 192.168.1.51:8069; server 192.168.1.52:8069; server 192.168.1.53:8069; server 192.168.1.54:8069; } upstream backend-longpolling { server 192.168.1.51:8072; server 192.168.1.52:8072; server 192.168.1.53:8072; server 192.168.1.54:8072; } server { server_name xyz.com www.xyz.com; location / { return 301 https://$server_name$request_uri; } } server { listen 443 ssl; server_name xyz.com www.xyz.com; proxy_connect_timeout 60000; proxy_send_timeout 60000; proxy_read_timeout 60000; send_timeout 60000; ssl_dhparam /etc/ssl/certs/dhparam.pem; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_intercept_errors on; location /longpolling { proxy_pass http://backend-longpolling; } location / { proxy_pass http://backend; } ssl_certificate /etc/nginx/ssl/www_xyz_com.crt; ssl_certificate_key /etc/nginx/ssl/www_xyz_com.key; }
1

upstream backend {
2

server 192.168.1.51:8069;
3

server 192.168.1.52:8069;
4

server 192.168.1.53:8069;
5

server 192.168.1.54:8069;
6

}
7


8

upstream backend-longpolling {
9

server 192.168.1.51:8072;
10

server 192.168.1.52:8072;
11

server 192.168.1.53:8072;
12

server 192.168.1.54:8072;
13

}
14


15

server {
16

server_name xyz.com www.xyz.com;
17


18

location / {
19

return 301 https://$server_name$request_uri;
20

}
21

}
22


23


24


25


26

server {
27

listen 443 ssl;
28


29

server_name xyz.com www.xyz.com;
30

proxy_connect_timeout 60000;
31

proxy_send_timeout 60000;
32

proxy_read_timeout 60000;
33

send_timeout 60000;
34


35

ssl_dhparam /etc/ssl/certs/dhparam.pem;
36

proxy_set_header Host $host;
37

proxy_set_header X-Real-IP $remote_addr;
38

proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
39

proxy_set_header X-Forwarded-Proto https;
40

proxy_intercept_errors on;
41


42

location /longpolling {
43

proxy_pass http://backend-longpolling;
44

}
45


46

location / {
47

proxy_pass http://backend;
48

}
49


50

ssl_certificate /etc/nginx/ssl/www_xyz_com.crt;
51

ssl_certificate_key /etc/nginx/ssl/www_xyz_com.key;
52

}
53










Step 3 : Restart nginx service


Copy to Clipboard

1

systemctl restart nginx.service








Step 4 : Access odoo application from the browser.

Navigate from your public ip address if port 80 and 443 are already forwarded from the firewall.


Tham khảo: https://silentinfotech.com/blog/inst...-ubuntu-16-04/
  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời



Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 04:32 PM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.