Skip to content

fahmifareed/Odoo-Install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Odoo Installation Guide

GitHub repo size GitHub contributors GitHub last commit License

Welcome to the Odoo Installation repository. This guide provides detailed instructions for installing Odoo on various environments, ensuring a smooth setup for developers and system administrators.

Table of Contents

Introduction Introduction

This repository contains scripts and instructions for installing Odoo on a Linux-based server. Odoo is a comprehensive suite of business applications including CRM, e-Commerce, accounting, inventory, point of sale, project management, and more. This guide is intended to simplify the setup process, providing clear and concise steps to get your Odoo instance up and running.

Prerequisites Prerequisites

Before you begin the installation, ensure that your server meets the following requirements:

  • Operating System: Ubuntu 20.04 LTS or later (Recommended) or other Linux distributions.
  • Processor: Dual-core processor or better.
  • RAM: Minimum 2 GB (4 GB or more recommended for production).
  • Disk Space: Minimum 20 GB of free space.
  • Python Version: Python 3.6 or higher.
  • PostgreSQL: Version 10 or higher.

Ensure you have sudo privileges on the server.

Installation Installation

Step 1: System Update System Update

Before starting the installation, update your system to the latest packages:

sudo apt-get update
sudo apt-get upgrade -y

Step 2: Install Dependencies Dependencies

Install the required dependencies for Odoo:

sudo apt-get install -y git python3-pip build-essential wget
sudo apt-get install -y python3-dev python3-venv libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev libssl-dev libjpeg-dev libpq-dev

Step 3: Install PostgreSQL PostgreSQL

Odoo uses PostgreSQL as its database backend. Install it using:

sudo apt-get install -y postgresql postgresql-server-dev-all

Once installed, create a PostgreSQL user for Odoo:

sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
exit

Step 4: Install Odoo Install Odoo

Clone the Odoo source code from the official repository:

git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 --single-branch odoo

Create a Python virtual environment and install Odoo dependencies:

cd odoo
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Step 5: Configure Odoo Configure Odoo

Copy the sample configuration file and adjust it to your environment:

cp odoo/debian/odoo.conf /etc/odoo.conf
nano /etc/odoo.conf

Edit the configuration file to match your setup, particularly the database settings.

Step 6: Run Odoo Run Odoo

Start the Odoo server using the following command:

./odoo/odoo-bin -c /etc/odoo.conf

You should now be able to access Odoo at http://your-server-ip:8069.

Configuration Parameters Parameters

Before running the installation script, you can modify several parameters to customize the setup according to your needs. Below is a list of the most commonly used parameters:

  • OE_USER: This parameter specifies the username for the system user that will be created for running Odoo. You can set this to any preferred username.

  • GENERATE_RANDOM_PASSWORD: If set to True, the script will generate a random and secure password for the Odoo admin user. If set to False, the password will be set to the value configured in OE_SUPERADMIN. The default value is True.

  • OE_PORT: This parameter defines the port on which Odoo will run. The default Odoo port is 8069, but you can set it to any available port on your server.

  • OE_VERSION: Specifies the version of Odoo to be installed. For example, set this to 14.0 for installing Odoo version 14.

  • IS_ENTERPRISE: Set this to True to install the Odoo Enterprise version on top of version 16.0. If you want to install the community version of Odoo 16, set this to False.

  • OE_SUPERADMIN: This is the master password for the Odoo installation. It is crucial to set this parameter to a secure password if GENERATE_RANDOM_PASSWORD is set to False.

  • INSTALL_NGINX: This parameter is set to True by default, meaning that Nginx will be installed and configured as a reverse proxy for Odoo. Set it to False if you do not want to install Nginx.

  • **`

WEBSITE_NAME`**: If you are installing Nginx, set this parameter to define the website name used in the Nginx configuration.

  • ENABLE_SSL: Set this parameter to True if you wish to install certbot and configure Nginx to use HTTPS with a free Let's Encrypt SSL certificate.

  • ADMIN_EMAIL: This is required for Let's Encrypt registration when ENABLE_SSL is set to True. Replace the default placeholder with your organization's email address.

Important Notes

  • Both INSTALL_NGINX and ENABLE_SSL must be set to True and ADMIN_EMAIL must be replaced with a valid email address to enable SSL through Let's Encrypt.

    By enabling SSL through Let's Encrypt, you agree to the following policies.

Make sure to modify these parameters in the script before running the installation to fit your specific setup requirements.

Advanced Configuration Advanced Configuration

Nginx as a Reverse Proxy Nginx

To serve Odoo over the default HTTP/HTTPS ports, set up Nginx as a reverse proxy:

sudo apt-get install nginx

Configure Nginx to forward requests to Odoo:

sudo nano /etc/nginx/sites-available/odoo

Add the necessary server configuration and then enable the site:

sudo ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/
sudo systemctl restart nginx

SSL Configuration SSL

For secure HTTPS access, you can use Let's Encrypt:

sudo apt-get install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com

Automatic Backups Backups

Set up automatic backups to ensure data safety:

sudo nano /etc/cron.daily/odoo_backup

Add a script to perform daily backups and make it executable:

sudo chmod +x /etc/cron.daily/odoo_backup

Common Issues and Troubleshooting Troubleshooting

If you encounter issues during installation or running Odoo, please refer to the Odoo documentation or visit the Odoo community forums.

Contributing Contributing

Contributions to this repository are welcome. Please fork the repository, create a feature branch, and submit a pull request for review.

License License

This repository is licensed under the MIT License. See the LICENSE file for more details.

Contact Contact

Feel free to reach out to me via the following platforms:

LinkedIn Twitter Email