how-to-install-odoo-12-in-EC2-ubuntu(arm)

Step 1 : Update Server

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get upgrade -y

Step 2 : Create Odoo User in Ubuntu

sudo adduser — system — quiet — shell=/bin/bash — home=/home/odoo — gecos ‘ODOO’ — group odoo

Step 3 : Install PostgreSQL Server

sudo apt-get install postgresql -y

Step 4 :Create odoo user for postgreSQL

sudo su — postgres -c “createuser -s odoo” 2> /dev/null || true

Step 5 :Install Wkhtmltopdf

download: wkhtmltox_0.12.6–1.focal_amd64.deb from website.
Copy it to EC2 m/c: C:\Users\Anshu\Downloads>scp -i atul_iquanti_poc.pem wkhtmltox_0.12.6–1.focal_arm64.deb ubuntu@18.221.101.201:/home/ubuntu/

or
sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb

sudo dpkg -i wkhtmltox_0.12.6–1.focal_arm64.deb — install

sudo apt-get install -f

sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin

sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

Step 6:Install Python Dependencies

sudo apt-get install python3 python3-pip python3-suds -y

sudo apt-get install wget git bzr python-pip gdebi-core -y

sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev -y

sudo apt-get install libsasl2-dev libldap2-dev libssl-dev -y

sudo apt-get install python-pypdf2 python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil -y

sudo apt-get install python3-pypdf2 python3-dateutil python3-feedparser python3-ldap python3-lxml python3-mako python3-openid python3-psycopg2 python3-pydot python3-pyparsing python3-reportlab python3-simplejson python3-tz python3-vatnumber python3-vobject python3-webdav python3-werkzeug python3-xlwt python3-yaml python3-docutils python3-psutil python3-mock python3-unittest2 python3-jinja2 python3-decorator python3-requests python3-passlib python3-pil -y

Step 7 :Install Python PIP Dependencies

sudo pip3 install pypdf2 Babel passlib Werkzeug decorator python-dateutil pyyaml psycopg2 psutil html2text docutils lxml pillow reportlab ninja2 requests gdata XlsxWriter vobject python-openid pyparsing pydot mock mako Jinja2 ebaysdk feedparser xlwt psycogreen suds-jurko pytz pyusb greenlet xlrd chardet libsass

Step 8 :Install other required packages

sudo apt-get install node-clean-css -y
sudo apt-get install node-less -y
sudo apt-get install python-gevent -y

Step 9 :Create Log directory

sudo mkdir /var/log/odoo sudo chown odoo:odoo /var/log/odoo

Step 10 : Install ODOO

sudo apt-get install git
sudo git clone — depth 1 — branch 12.0 https://www.github.com/odoo/odoo /odoo/odoo-server

Step 11 :Setting permissions on home folder

sudo chown -R odoo:odoo /odoo/*

Step 12 : Create server config file

sudo touch /etc/odoo-server.conf

sudo su root -c “printf ‘[options] \n; This is the password that allows database operations:\n’ >> /etc/odoo-server.conf”

sudo su root -c “printf ‘admin_passwd = admin\n’ >> /etc/odoo-server.conf”

sudo su root -c “printf ‘xmlrpc_port = 8069\n’ >> /etc/odoo-server.conf”

sudo su root -c “printf ‘logfile = /var/log/odoo/odoo-server.log\n’ >> /etc/odoo-server.conf”

sudo su root -c “printf ‘addons_path=/odoo/odoo-server/addons\n’ >> /etc/odoo-server.conf”

sudo chown odoo:odoo /etc/odoo-server.conf

sudo chmod 640 /etc/odoo-server.conf

Step 13 :

Now Start Odoo

Go to /odoo/odoo-server ./odoo-bin -c /etc/odoo-server.conf Your odoo instance is up and running. Go to browser and access your odoo at localhost:8069

Shell Script

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get upgrade -y

mkdir /home/odoo
sudo adduser — system — quiet — shell=/bin/bash — home=/home/odoo — gecos ‘ODOO’ — group odoo
sudo apt-get install postgresql -y
sudo su — postgres -c “createuser -s odoo” 2> /dev/null || true

sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_arm64.deb
#if above cmd dont work, try downloading from website
# copy from local lapi to EC2
# C:\Users\Anshu\Downloads>scp -i ***.pem wkhtmltox_0.12.6–1.focal_arm64.deb ubuntu@ec2–3–134–79–222.us-east-2.compute.amazonaws.com:/home/ubuntu

sudo dpkg -i wkhtmltox_0.12.6–1.focal_arm64.deb — install
sudo apt-get install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

sudo apt-get install python3 python3-pip python3-suds -y
sudo apt-get install wget git bzr python-pip gdebi-core -y
sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev -y
sudo apt-get install libsasl2-dev libldap2-dev libssl-dev -y
#sudo apt-get install python-pypdf2 python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil -y
#sudo pip3 install pypdf2 Babel passlib Werkzeug decorator python-dateutil pyyaml psycopg2 psutil html2text docutils lxml pillow reportlab ninja2 requests gdata XlsxWriter vobject python-openid pyparsing pydot mock mako Jinja2 ebaysdk feedparser xlwt psycogreen suds-jurko pytz pyusb greenlet xlrd chardet libsass
sudo apt-get install python3-pypdf2 python3-dateutil python3-feedparser python3-ldap python3-lxml python3-mako python3-openid python3-psycopg2 python3-pydot python3-pyparsing python3-reportlab python3-simplejson python3-tz python3-vatnumber python3-vobject python3-webdav python3-werkzeug python3-xlwt python3-yaml python3-docutils python3-psutil python3-mock python3-unittest2 python3-jinja2 python3-decorator python3-requests python3-passlib python3-pil -y
sudo pip3 install pypdf2 Babel passlib Werkzeug decorator python-dateutil pyyaml psycopg2 psutil html2text docutils lxml pillow reportlab ninja2 requests gdata XlsxWriter vobject python-openid pyparsing pydot mock mako Jinja2 ebaysdk feedparser xlwt psycogreen suds-jurko pytz pyusb greenlet xlrd chardet libsass

sudo apt-get install node-clean-css -y
sudo apt-get install node-less -y
sudo apt-get install python-gevent -y

sudo mkdir /var/log/odoo sudo chown odoo:odoo /var/log/odoo
sudo apt-get install git
sudo git clone — depth 1 — branch 12.0 https://www.github.com/odoo/odoo /odoo/odoo-server

sudo chown -R odoo:odoo /odoo/*

sudo touch /etc/odoo-server.conf
sudo su root -c “printf ‘[options] \n; This is the password that allows database operations:\n’ >> /etc/odoo-server.conf”
sudo su root -c “printf ‘admin_passwd = admin\n’ >> /etc/odoo-server.conf”
sudo su root -c “printf ‘xmlrpc_port = 8069\n’ >> /etc/odoo-server.conf”
sudo su root -c “printf ‘logfile = /var/log/odoo/odoo-server.log\n’ >> /etc/odoo-server.conf”
sudo su root -c “printf ‘addons_path=/odoo/odoo-server/addons\n’ >> /etc/odoo-server.conf”
sudo chown odoo:odoo /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf

cd /odoo/odoo-server
./odoo-bin -c /etc/odoo-server.conf -s

#77 sudo vi /etc/odoo-server.conf
#79 sudo vi /odoo/odoo-server/odoo/tools/misc.py
#81 sudo vi /odoo/odoo-server/odoo/fields.py
#84 sudo vi /odoo/odoo-server/odoo/addons/base/models/res_config.py

fix DB user issue

sudo su — postgres

psql template1
CREATE ROLE ubuntu superuser;
CREATE USER ubuntu;
GRANT ROOT TO ubuntu;
ALTER ROLE ubuntu WITH LOGIN;
exit();
logout

Next Read:
1: https://www.odoo.com/slides/ecommerce-26
2: https://www.odoo.com/slides/invoicing-18

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store