Uploaded by Samir Hassan

Install Odoo 15 on Ubuntu 18

advertisement
Install Odoo 15 on Ubuntu 18.04
** MT Software **
1-
2-
sudo apt update
sudo apt upgrade
3sudo 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
############## if ubuntu 22 ######
sudo apt install python3-pip wget python3-dev python3-venv python3-wheel libxml2-dev libpqdev libjpeg8-dev liblcms2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential git
libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libblas-dev libatlas-base-dev -y
########################################
**Create Odoo user **
sudo useradd -m -d /opt/odoo15 -U -r -s /bin/bash odoo15
*Install PostgreSQL **
4sudo apt install postgresql
5sudo su - postgres -c "createuser -s odoo15"
** Install Wkhtmltopdf **
wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo apt install ./wkhtmltox_0.12.1.3-1~bionic_amd64.deb
** Install Odoo **
sudo su - odoo15
6git clone https://www.github.com/odoo/odoo --depth 1 --branch 15.0 /opt/odoo15/odoo
cd /opt/odoo15
python3 -m venv odoo15-venv
source odoo15-venv/bin/activate
pip3 install wheel
7- dependencies pip python if there probelms
sudo apt-get install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffidev
8pip3 install -r odoo/requirements.txt
deactivate
9-
mkdir /opt/odoo15/odoo-extra-addons
exit
10sudo cp /opt/odoo15/odoo/debian/odoo.conf /etc/odoo15.conf
11 sudo nano /etc/odoo15.conf
---------------------------------------------------------[options]
; This is the password that allows database operations:
admin_passwd = admin_passwd
db_host = False
db_port = False
db_user = Odoo15
db_password = False
addons_path = /opt/odoo15/odoo/addons,/opt/odoo15/odoo-extra-addons
---------------------------------** Service Odoo **
sudo nano /etc/systemd/system/odoo15.service
----------------------------[Unit]
Description=odoo15
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
SyslogIdentifier=odoo15
PermissionsStartOnly=true
User=odoo15
Group=odoo15
ExecStart=/opt/odoo15/odoo15-venv/bin/python3 /opt/odoo15/odoo/odoo-bin -c
/etc/odoo15.conf
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
----------------------------------------------sudo systemctl daemon-reload
sudo systemctl start odoo15
sudo systemctl status odoo15
sudo systemctl enable odoo15
Run Browser
==> http://<domain_or_IP_address>:8069
//setting nginx
sudo apt-get install nginx
Open the Nginx default configuration file as shown below:
nano /etc/nginx/nginx.conf
Add the following line below the line http {:
server_names_hash_bucket_size 64;
Save and close the file. Then, check Nginx for any syntax errors with the following command:
nginx -t
Cd /etc/nginx/sites-available
Sudo nano default
location / {
proxy_pass http://127.0.0.1:8069;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
# by default, do not forward anything
proxy_redirect off;
}
And uncomment the previous location .
--------------------------------------------------------------------------------------------------------------------------
https://www.youtube.com/watch?v=JRmXLDnJbjI
In this video : when i run odoo13 or odoo14 from pycharm occurs problems as the following :
-- peer authentication for user odoo13 or odoo14
-- the solution is as the following :
Go to cd /etc/postgresql
cd main / pg_hba.conf
Add after local all postgres -local all odoo15 trust
sudo service postgresql restart
---------------------------------------------------------------------------------------------------------------------------
--- create config odoo file
./odoo/odoo-bin -s --stop-after-init -c /opt/odoo15/odoo/odoo.conf
-----------------------------------------------------------------------------------------------------------------------------###################################
uninstall wkhtmltopdf
sudo apt-get remove --purge wkhtmltopdf
###################################
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.61.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb
sudo apt-get install -f
chown -R halem:odoo /odoo/
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
#########################################################################
Download