Last active
December 16, 2025 08:47
-
-
Save Sinnnnak/0f8565ba85105d65d48e68e76e9e6ade to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| i.) Update & Upgrade Ubuntu Packages | |
| sudo apt update | |
| sudo apt upgrade | |
| sudo apt install software-properties-common -y | |
| sudo add-apt-repository ppa:deadsnakes/ppa | |
| sudo apt update | |
| sudo apt install python3.11 python3.11-dev python3.11-venv | |
| ii.) Install python dependencies and create new user | |
| sudo apt install build-essential wget git python3.11-dev python3.11-venv libfreetype-dev libxml2-dev libzip-dev libsasl2-dev node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libopenjp2-7-dev libcap-dev | |
| iv.) Create new system user for Odoo | |
| /usr/sbin/adduser --system --shell /bin/bash --gecos 'Odoo' --group --home /opt/odoo odoo | |
| v.) Install Postgresql and create new user for postgresql | |
| sudo apt install postgresql | |
| su - postgres -c "createuser -s odoo" | |
| We need to install wkhtml for converting html data to pdf format | |
| sudo apt install wkhtmltopdf | |
| vi.) Download Odoo Files and create python venv | |
| su - odoo | |
| git clone https://www.github.com/odoo/odoo --depth 1 --branch 17.0 odoo | |
| python3.11 -m venv odoo-venv | |
| source odoo-venv/bin/activate | |
| vii.) Install Odoo and configure odoo files | |
| pip3 install wheel setuptools pip --upgrade | |
| pip3 install -r odoo/requirements.txt | |
| Then we create a new directory for the custom odoo addons and log file: | |
| mkdir /opt/odoo/odoo/custom | |
| Exit from user odoo by typing: exit | |
| mkdir /var/log/odoo | |
| sudo touch /var/log/odoo/odoo.log | |
| viii.) Create odoo config file | |
| nano /etc/odoo.conf | |
| [options] | |
| admin_passwd = admin1234 | |
| db_host = False | |
| db_port = False | |
| db_user = odoo | |
| db_password = False | |
| addons_path = /opt/odoo/odoo/addons,/opt/odoo/odoo/custom | |
| logfile=/var/log/odoo/odoo.log | |
| ix.) Create odoo service | |
| nano /etc/systemd/system/odoo.service | |
| [Unit] | |
| Description=odoo | |
| Requires=postgresql.service | |
| After=network.target postgresql.service | |
| [Service] | |
| Type=simple | |
| SyslogIdentifier=odoo | |
| PermissionsStartOnly=true | |
| User=odoo | |
| Group=odoo | |
| ExecStart=/opt/odoo/odoo-venv/bin/python3 /opt/odoo/odoo/odoo-bin -c /etc/odoo.conf | |
| StandardOutput=journal+console | |
| [Install] | |
| WantedBy=multi-user.target | |
| x.) Enable odoo service | |
| systemctl daemon-reload | |
| systemctl enable odoo | |
| sudo systemctl enable odoo | |
| sudo systemctl status odoo | |
| xi.) Open Odoo | |
| http://publicip:8069 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment