Cài đặt Odoo Trên Ubuntu 20.04 - CLOUD VIỆT - CloudViet

Để dễ hình dung hơn, một doanh nghiệp sẽ có nhiều bộ phận cần được quản lý như: quản lý kho (inventory), quản lý bán hàng (sale), quản lý nhân viên (employeee), điểm bán hàng (point of sale – POS), … và các module này được tích hợp vào một phần mềm quản lý đó là Odoo, thay vì mỗi bộ phận dùng một phần mềm.

Hướng dẫn cài đặt:

Cài đặt  PostgresSQL Server dùng lệnh sau:

# sudo apt install postgresql

Cài đặt odoo trên ubuntu 20.04

Bấm ‘ y’ để tiếp tục

Khởi động các dịch vụ của PostgresSQL :

# systemctl status postgresql

cài đặt odoo trên Ubuntu 20.04

# systemctl is-enabled postgresql

cài đặt odoo trên ubuntu 20.04

Cài đặt Wkhtmltopdf  tiện ích nhỏ để chuyển trang html sang PDF:

# wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb

Cài đặt odoo trên ubuntu 20.04

# sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb

Cài đặt odoo trên ubuntu 20.04

# sudo apt -f install

Cài đặt odoo trên ubuntu 20.04

Bấm ‘y’ để tiếp tục

Xác minh Wkhtmltopdf  đã được cài đặt

# which wkhtmltopdf

# which wkhtmltoimage

Tải gói cài đặt Odoo bằng các lệnh sau:

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

# sudo echo "deb http://nightly.odoo.com/13.0/nightly/deb/ ./" | sudo tee -a /etc/apt/sources.list.d/odoo.list

# sudo apt-get update && apt-get install odoo

Xác minh và kích hoạt dịch vụ của Odoo:

# systemctl status odoo

# systemctl is-enabled odoo

Xác nhận odoo đang học động  trên port 8069

# sudo ss -tpln

Cài đặt Nginx cho Ubuntu:

# sudo apt install nginx

Kiểm tra xem dịch vụ Nginx có hoạt động không:

# systemctl status nginx

# systemctl is-enabled nginx

Tạo server Nginx cho Odoo:

# sudo vi /etc/nginx/conf.d/odoo.conf

Đoạn mã code cấu hình máy chủ:

server { listen 80; server_name odoo.tecmint.lan; access_log /var/log/nginx/odoo_access.log; error_log /var/log/nginx/odoo_error.log; proxy_buffers 16 64k; proxy_buffer_size 128k; location / { proxy_pass http://127.0.0.1:8069; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; } location ~* /web/static/ { proxy_cache_valid 200 60m; proxy_buffering on; expires 864000; proxy_pass http://127.0.0.1:8069; } gzip on; gzip_min_length 1000; }

Kiểm tra lỗi:

# sudo nginx -t

Khởi động lại nginx:

# sudo systemctl restart nginx

Chạy dịch vụ fileWall:

# sudo ufw allow http

# sudo ufw allow https

# sudo ufw reload

Truy cập vào Web Administration :(http://Ip_server:8069)

Tạo cơ sở dữ liệu

Giao diện của odoo:

Từ khóa » Cài đặt Odoo Trên Ubuntu