Chào mừng thành viên mới, khuyến mãi ngay 20% khi nạp tiền vào tài khoản.
IPv6 Tĩnh
IPv6 Xoay
IPv4 Tĩnh
Key Proxy Xoay
Giá Bán lẻ
Quốc gia
Việt Nam
Hàn Quốc
Thời hạn
3 Ngày
1 Tuần
1 Tháng
2 Tháng
3 Tháng
6 Tháng
Tóm tắt
IPv6 Tĩnh
4,000đ / 1 proxy
Quốc gia
Việt Nam
Thời hạn
1 Tháng
Số lượng

How to Install Odoo 16 on Ubuntu

Step-1: Update your Server

login to your server and make sure the server is up-to-date.
sudo apt-get update
sudo apt-get upgrade

Step 2: Secure your server.

Make sure the system is protected against ssh assaults; using Fail2ban will aid in ssh attack prevention.
sudo apt-get install openssh-server fail2ban

Step 3: Create a system user

Next, let’s create a system user for security and to fulfill Odoo roles.
This user will only have limited access to certain files and locations within Odoo.
After that, we’ll restrict this user’s access to all files and directories linked to Odoo.
sudo adduser --system --home=/opt/odoo16 --group odoo16

Step 4: Installing Packages and libraries

Install the necessary Odoo Python packages:
Install pip3:
sudo apt-get install -y python3-pip
Install Packages and libraries:
sudo apt-get install python-dev python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev
Install Web web dependencies:
sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
sudo apt-get install -y node-less

Step: 5: Configure Postgresql

PostgreSQL serves as the database server for Odoo. To install and configure the database server for Odoo, follow these steps:
sudo apt-get install postgresql
Create a Postgres user to manage the database in the following step. Later, the conf file requires the user and the provided password.
To carry out the tasks, Postgres utilizes a separate system user named “Postgres.” So the following command will change the Postgres user:
sudo su - postgres
Do the following to create the user Odoo16.
Additionally, you must change the password for the user Odoo16 at that time. You must enter the new password in the Odoo configuration file at the very end of the installation process.
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo16
The user must then be designated as a superuser in order to receive further privileges.
Exit from psql and Postgres user:

Step 6: Get Odoo 16 community from git

We now need to upload the Odoo source file to our server, We can directly clone the Community Edition source code from the Odoo GitHub repository.  Once the installation is complete, you can add the Enterprise edition add-ons.
First, install git to the server:
sudo apt-get install git
To make the Odoo system more secure, we must now change the system user to Odoo (which is created in Step 3), prior to cloning.
sudo su - odoo16 -s /bin/bash
The dot (.) operator is used at the end of the command to copy the files to the current user’s home directory, which is /opt/odoo and is the same home directory that was specified when the user was created:
git clone --depth 1 --branch 16.0 --single-branch .
After that, exit from the user and carry out the installation:

Step 7: Install Required Python Packages

Odoo utilizes a variety of Python packages and libraries for various tasks. We must use pip3 to install them in order to run Odoo. Additionally, the requirement.txt file included in the Odoo folder has a list of the necessary requirements. Consequently, we can pass this file as a parameter to the pip install command, which will cause each package listed in requirement.txt to be installed automatically.
sudo pip3 install -r /opt/odoo16/requirements.txt
All the packages must be correctly installed for Odoo to function properly, and you should make sure of that.
Install Wkhtmltopdf
Reports can be printed as PDF files using Odoo. Wkhtmltopdf makes it easier to create PDF reports from HTML data. The Qweb template reports are converted to HTML by the report engine, and the PDF report is produced by Wkhtmltopdf:
sudo wget
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install -f

Step 8: Setup Conf file

To operate the system, Odoo needs to know some details like the database user, password, add-on locations, etc. These will also be available in the configuration file. Therefore, creating an Odoo configuration file should be our first priority. Additionally, a configuration sample file is accessible in the Odoo folder and may be copied to the desired location. /etc is where configuration files are often stored.
To copy the configuration file to /etc:
sudo cp /opt/odoo16/debian/odoo.conf /etc/odoo16.conf
The following step is to add the required information to the file.
sudo nano /etc/odoo16.conf
Update conf file same as shown in the code below:
   ; This is the password that allows database operations:
   admin_passwd = admin
   db_host = False
   db_port = False
   db_user = odoo16
   db_password = False
   addons_path = /opt/odoo16/addons
   logfile = /var/log/odoo/odoo16.log
The following parameters should be configured before the operations are conducted:
admin_passwd: This is the master password for Odoo, and it may be used to create, remove, duplicate, and many other types of database operations in database management.
db_host: the database host.
db_port:  the database port.
db_user: the database user name.
db_password: supply the password for the database user that was specified when it was created.
addons_path: give the path to the directories that hold the directories for Odoo addons.
Multiple directories may be mentioned, separated by commas:
Eg: addons_path = /opt/odoo16/addons,  /opt/odoo16/enterprise, /opt/odoo16/custom
logfile: the log file path.
Next, you should set the access right of the conf file for the system user Odoo
sudo chown odoo16: /etc/odoo16.conf
sudo chmod 640 /etc/odoo16.conf
Also, create a log directory of Odoo, which will help you to find Odoo-related issues and set permission to the log directory.
sudo mkdir /var/log/odoo
sudo chown odoo16:root /var/log/odoo

Step 9: Odoo service file

After configuring the conf file, we have to create a service to run Odoo. Let’s create a service file ‘odoo16.service’ in /etc/systemd/system:
sudo nano /etc/systemd/system/odoo16.service
Add the following aspects to the newly created service file
   # Ubuntu/Debian convention:
   ExecStart=/opt/odoo16/odoo-bin -c /etc/odoo16.conf
Finally set the root user’s permissions for this service file.
sudo chmod 755 /etc/systemd/system/odoo16.service
sudo chown root: /etc/systemd/system/odoo16.service

Step 10: Run Odoo 16

After the successful completion of all the above steps, Let’s run the Odoo instance with the following command:
sudo systemctl start odoo16.service
Check the status of the Odoo service by using the following command
sudo systemctl status odoo16.service
You can access the Odoo through the following URL.
If everything is configured successfully, this will reroute you to the page where you can create a database.
Check Odoo Logs
If you are having problems with the installation or for any other reason, you can use the following command to check the logs of the Odoo platform that you have set up. The following command will display the terminal’s live logs:
sudo tail -f /var/log/odoo/odoo.log
Finally, use the following command to start the Odoo service automatically after restarting the server:
sudo systemctl enable odoo16.service
Use the following command to restart the Odoo service if you have made any modifications to the add-ons so that your instance will reflect the updates:
sudo systemctl restart odoo16.service
If you have successfully installed Odoo 16, you can access our Odoo Development Tutorial App from the Odoo Apps Page to learn more about Odoo Development and to launch a career in Odoo.

Related Posts

Upgrade MariaDB 5.5 to 10.1 on CentOS 7 Plesk Server

By default, CentOS 7 is shipped with MariaDB 5.5. MariaDB 10.x version is a drop-in replacement for MySQL 5.5-5.7. Automatic method Note: The script below is applicable…

Fix Ping Name or service not know linux centos ubuntu

Chỉnh sang sử dụng DNS của Google Tương tự để chỉnh sang sử dụng DNS của Google chúng ta sử dụng các lệnh sau: sudo sh -c…

Những phần mềm backup full Máy chủ vps server linux tốt nhất

Backup là một quá trình quan trọng trong hoạt động của một doanh nghiệp giúp cho quá trình hoạt động của doanh nghiệp mượt mà và an…

Cách nhận subnet /48 ipv6 Việt Nam Miễn Phí – Tạo proxy ipv6 Việt Nam Miễn Phí

Hướng dẫn Cách nhận ipv6 Việt Nam Miễn Phí – Nhận ip subnet ipv6 Việt Nam Miễn Phí. Bài viết trước mình hướng dẫn nhận /64…

Hướng dẫn cài đặt OpenVPN Access Server Nhiều User profile dùng đồng thời

OpenVPN AS bản mới nhất 20k user . hỗ trợ centos các phiên bản 7 trở lên . curl -Lso- | bash Sau khi cài xong…

Hướng dẫn đăng nhập vào VPS :Linux bằng SSH trên Windows

Nếu bạn đang sử dụng hệ điều hành Windows trên máy tính của mình và muốn đăng nhập vào máy chủ Linux thông qua SSH, bạn sẽ…

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *