Skip to content

Latest commit

 

History

History
293 lines (215 loc) · 6.38 KB

install_odoo.md

File metadata and controls

293 lines (215 loc) · 6.38 KB

🛠 Install Odoo

ℹ️ 𝚃𝚑𝚒𝚜 𝚜𝚌𝚛𝚒𝚙𝚝 𝚑𝚎𝚕𝚙𝚜 𝚞𝚜𝚎𝚛𝚜 𝚝𝚘 𝚎𝚊𝚜𝚒𝚕𝚢 𝚒𝚗𝚜𝚝𝚊𝚕𝚕 𝙾𝚍𝚘𝚘 𝚘𝚗 𝚕𝚘𝚌𝚊𝚕 𝚜𝚎𝚛𝚟𝚎𝚛.

Documentation

Documentation, If you wants to create and run Odoo with service file check this Documentation

Step 1

Update apt source list
sudo apt-get update

Step 2

Install Updates
sudo apt-get -y upgrade

Step 3

Install Python Dependencies for Odoo
sudo apt install git python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less
INSTALL DEPENDENCIES USING PIP3
pip3 install Babel decorator docutils ebaysdk feedparser gevent greenlet html2text Jinja2 lxml Mako MarkupSafe mock num2words ofxparse passlib Pillow psutil psycogreen pydot pyparsing pyserial python-dateutil python-openid pytz pyusb PyYAML qrcode reportlab requests six suds-jurko vatnumber vobject XlsxWriter xlwt xlrd

Step 4

Odoo 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 node-less
sudo python3 -m pip install libsass

Step 5

Install PostgreSQL
sudo apt-get install python3-software-properties
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql-12

Step 6

Create Database user for Odoo
sudo su postgres
cd
createuser -s odoo
createuser -s ubuntu_user_name
exit

Step 7

Create Odoo user and group
sudo adduser --system --home=/opt/odoo --group odoo

Step 8

Clone Odoo Branch (Replace 16.0 with specific branch that you wants to clone)
git clone https://www.github.com/odoo/odoo --depth 1 --branch 16.0 --single-branch

Step 9

Create Odoo Log File
sudo apt-get update
sudo mkdir /var/log/odoo
sudo chown -R odoo:root /var/log/odoo

Step 10

Edit Odoo configuration file
sudo gedit /etc/odoo.conf

Step 11

Copy and paste below content in the config file, and write the correct addons paths in needed
[options]

; This is the password that allows database operations:

; admin_passwd = admin

db_host = False

db_port = False

db_user = odoo

db_password = False

logfile = /var/log/odoo/odoo-server.log
Save and Exit the file. Now you can run the below command on terminal to grant ownership.
sudo chown odoo: /etc/odoo.conf

Step 12

Install WKHTMLTOPDF
sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb
sudo apt install -f
sudo cp /usr/local/bin/wkhtmltoimage  /usr/bin/wkhtmltoimage
sudo cp /usr/local/bin/wkhtmltopdf  /usr/bin/wkhtmltopdf
If getting issue with wkhtmltopdf
sudo apt-get --assume-yes install xfonts-75dpi xfonts-base
sudo -i
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb

🚀 Launch Odoo

http://localhost:8069

Install Requirements

sudo python3.8 -m pip install -r requirements.txt
sudo python3.8 -m pip install --upgrade --force-reinstall -r requirements.txt

Install Missing Packages

pip install psycopg2-binary
sudo python3.8 -m pip install pyopenssl
python3.8 -m pip install PyPDF2==1.26.0
Check Werkzeug Version
pip freeze | grep Werkzeug
sudo python3.8 -m pip install Werkzeug==0.16.1
CSS Style Error
pip3 install libsass==0.17.0
Web Module Not find
pip3 install Jinja2==2.10.1
pip3 install MarkupSafe==0.23
Useful Commands
sudo apt autoremove
sudo apt purge package_name
sudo dpkg --configure -a
pip install pip --upgrade
pip install pyopenssl --upgrade

Support

For support, email hello.rahul@aol.com 😊

Authors

  • @pandyarahul (𝓟𝓪𝓷𝓭𝔂𝓪 𝓡𝓪𝓱𝓾𝓵 )

Facebook Twitter Instagram LinkedIn Pinterest YouTube Stack Overflow

GitHub WidgetBox

Value my work? Fuel my motivation with a cup of coffee! ☕