"Ubuntu сервер дээр Odoo суулгах"-ны өөр хувилбарууд

Дусал нэвтэрхий толь-с
(Шинэ хуудас: Option 0: Odoo V8 is a major upgrade. With Odoo V8 OpenERP is moving into new territories, beyond ERP. Odoo V8 released an open source CMS, a disruptive eCommerce and a Busin…)
 
(Step 10 :Install Odoo)
 
(Хэрэглэгчид 5 дундын хувилбарууд харагдахгүй)
1-р мөр: 1-р мөр:
Option 0:
+
Steps To Install Odoo 15 On Ubuntu 20.04 
  
Odoo V8 is a major upgrade. With Odoo V8 OpenERP is moving into new territories, beyond ERP. Odoo V8 released an open source CMS, a disruptive eCommerce and a Business Intelligence.
+
Odoo is the most popular all-in-one business software in the world.To Install Odoo 15 on Ubuntu 20.04 you just need to follow the below steps.
  
ir_attachment_535106
+
There are many ways to install Odoo depending on the requirements and the easy and quick way to install Odoo by using APT repositories.
  
In this blog I will show you how easily you can install Odoo V8.
+
If you want to work with running multiple Odoo versions on the same system then you can either use docker compose or docker Install Odoo in a virtual environment.
Step 1: Setup your Ubuntu server
 
  
After the server started for the first time you need to update the package list of the server.
+
This blog is to provide steps for installation and configuration of Odoo for production environment using Git source and Python environment on an Ubuntu 20.04 system.
  
    sudo apt-get update
+
Odoo Installation For Free !!
  
Above command will downloads the package lists from the repositories and “updates” them to get information on the newest versions of packages and their dependencies.
 
  
Now you are ready to start odoo installation.
+
To install Odoo 15 on Ubuntu 20.04 LTS you just follow the below steps.
Step 2: PostgreSQL Server Installation and Configuration
 
  
Install PostgreSQL Server using following command.
 
  
    sudo apt-get install postgresql
+
== Step 1 : Update Server ==
  
Setup a PostgreSQL user for Odoo. You may need to login as postgres user first.
+
<pre>
 +
sudo apt-get update                   
 +
sudo apt-get upgrade -y
 +
</pre>
  
    odoo@swapnil-laptop:/$ sudo su postgres
 
  
    password: XXXXXXXXXX
+
== Step 2 : Create Odoo User in Ubuntu ==
  
Now create PostgreSQL user Odoo using the following command:
+
<pre>                       
 +
sudo adduser -system -home=/opt/odoo -group odoo
 +
</pre>
  
    postgres@swapnil-laptop:/$ createuser --createdb --username postgres --no-createrole
 
    --pwprompt odoo
 
    Enter password for new role: XXXXXXXXXX
 
    Enter it again: XXXXXXXXXX
 
    Shall the new role be a superuser? (y/n) y
 
    CREATE ROLE
 
  
Option explanations:
 
  
    --createdb : the new user will be able to create new databases
+
== Step 3 : Install PostgreSQL Server ==
    --username postgres : createuser will use the postgres user (superuser)
 
    --no-createrole : the new user will not be able to create new users
 
    --pwprompt : createuser will ask you the new user's password
 
    odoo : the new user's name
 
  
Step 3: Odoo Server Installation
 
  
Installing the required packages. Use following single commands to install all required python libraries.
+
<pre>
 +
sudo apt-get install postgresql -y
 +
</pre>
  
    sudo apt-get install python-lxml python-mako python-dateutil python-psycopg2 python-pychart python-pydot python-tz python-reportlab python-yaml python-vobject python python-dev build-essential python-setuptools python-pip python-babel python-mock python-docutils python-Jinja2 python3-jinja2 python-decorator python-psutil python-pyPdf
 
  
Download the latest odoo server source using the following command.
 
  
    cd /opt/
+
== Step 4 : Create Odoo user for postgreSQL ==
  
    sudo wget http://nightly.openerp.com/8.0/nightly/src/odoo_8.0-latest.tar.gz
+
<pre>
 +
sudo su - postgres -c "createuser -s odoo" 2> /dev/null || true
 +
</pre>
  
    sudo tar -xvzf odoo_8.0-latest.tar.gz
 
  
Rename the extracted folder
 
  
    sudo mv openerp-8.0-1b53469 odoo
+
== Step 5 : Install Python Dependencies ==
  
Setup odoo using following command
+
<pre>
 +
sudo apt-get install git python3 python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev gdebi -y
 +
</pre>
 +
                   
  
    cd /opt/odoo
+
== Step 6 : Install Python PIP Dependencies ==
  
    sudo python setup.py install
+
<pre>
 +
sudo apt-get install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev
 +
</pre>
  
Step 4: Creating a configuration file for Odoo Server
 
  
Copy odoo-server.config file to /etc we need to change it’s ownership and permissions use your system user name in my case its odoo.
+
== Step 7 : Install other required packages ==
  
    sudo nano /etc/odoo-server.conf
 
  
    sudo chown odoo: /etc/odoo-server.conf
+
<pre>
 +
sudo apt-get install nodejs npm -y
 +
sudo npm install -g rtlcss
 +
</pre>
 +
  
    sudo chmod 640 /etc/odoo-server.conf
 
  
The above commands make the file owned and writable only by the odoo user and group and only readable by odoo and root.
+
== Step 8 : Install Wkhtmltopdf ==
  
To allow the Odoo server to run initially, you should only need to change one line in this file. Toward to the top of the file change the
 
  
     db_host = localhost
+
<pre>
 +
sudo apt-get install xfonts-75dpi
 +
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 cp /usr/local/bin/wkhtmltoimage  /usr/bin/wkhtmltoimage             
 +
sudo cp /usr/local/bin/wkhtmltopdf  /usr/bin/wkhtmltopdf
 +
</pre>
  
    db_port = 5432
 
  
    db_user = odoo  // user created in postgres for odoo
+
== Step 9 : Create Log directory ==
  
    db_password = odoo
+
<pre>
 +
sudo mkdir /var/log/odoo
 +
sudo chown odoo:odoo /var/log/odoo
 +
</pre>
  
One other line we might as well add to the configuration file now, is to tell Odoo where to write its log file. To complement my suggested location below add the following line to the odoo-server.conf file:
 
  
    logfile = /var/log/odoo/odoo-server.log
+
== Step 10 :Install Odoo ==
  
Once the configuration file is edited and saved, you can start the server manually just to check if it actually runs. You might get some errors because of some missing packages, just install the missing packages and move on.
 
Step 5: Installing the boot script
 
  
For the final step we need to install a script which will be used to start-up and shut down the server automatically and also run the application as the correct user.
+
<pre>
 +
sudo apt-get install git
 +
sudo git clone --depth 1 --branch 15.0 https://www.github.com/odoo/odoo /opt/odoo/odoo-server
 +
</pre>
  
Similar to the configuration file, you need to either copy it or paste the contents of this script to a file in /etc/init.d/ and call it odoo-server.
+
== Step 11 : Setting permissions on home folder ==
  
Copy content of  [odoo-server] to your odoo server boot script.
 
  
Do following changes in /etc/init.d/odoo-server file
+
<pre>
 +
sudo chown -R odoo:odoo /opt/odoo/
 +
</pre>
  
    DAEMON=/opt/odoo/openerp-server
+
== Step 12 : Create server config file ==
  
    USER= odoo
 
  
Once it is in the right place you will need to make it executable and owned by root:
+
<pre>
 +
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=/opt/odoo/odoo-server/addons\n' >> /etc/odoo-server.conf"
 +
sudo chown odoo:odoo /etc/odoo-server.conf
 +
sudo chmod 640 /etc/odoo-server.conf
 +
</pre>
  
    sudo chmod 755 /etc/init.d/odoo-server
+
== Step 13 : Now Start Odoo ==
  
    sudo chown root: /etc/init.d/odoo-server
 
  
In the configuration file there’s an entry for the server’s log file. We need to create that directory first so that the server has somewhere to log to and also we must make it writeable by the odoo user:
+
<pre>
 +
sudo su - odoo -s /bin/bash
 +
cd /opt/odoo/odoo-server
 +
./odoo-bin -c /etc/odoo-server.conf
 +
</pre>
  
    sudo mkdir /var/log/odoo
+
Now your odoo instance is up and running. 
  
    sudo chown odoo:root /var/log/odoo
+
Go to web browser and access your odoo at localhost:8069
  
Step 6 : Testing the server
 
  
To start the Odoo server type:
 
  
    sudo /etc/init.d/odoo-server start
+
[[Ангилал:Odoo]]
 
+
[[Ангилал:Linux]]
You should now be able to view the logfile and see that the server has started.
+
[[Ангилал:Сисадмин]]
 
 
    sudo tail -f /var/log/odoo/odoo-server.log
 
 
 
If the log file looks OK, now point your web browser at the domain or IP address of your Odoo server (or localhost if you are on the same machine) and use port 8069. The url will look something like this:
 
 
 
    http://IP_or_domain:8069
 
 
 
Step 7: Automating Odoo startup and shutdown
 
 
 
If everything above seems to be working OK, the final step is make the script start and stop automatically with the Ubuntu Server. To do this type:
 
 
 
    sudo update-rc.d odoo-server defaults
 
 
 
You can now try rebooting you server if you like. Odoo should be running by the time you log back in.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Option 1:
 
 
 
    sudo wget bit.ly/odoo_v8 && bash odoo_v8
 
 
 
Option 2:
 
 
 
1.Create Odoo user into the system
 
 
 
    sudo adduser --system --quiet --shell=/bin/bash --home=/opt/odoo --gecos 'odoo' --group odoo
 
 
 
2.Make a directory for storing config file and logs
 
 
 
    sudo mkdir /etc/odoo && mkdir /var/log/odoo/
 
 
 
3.Installing necessary packages required for using Odoo
 
 
 
    sudo apt-get update && apt-get upgrade -y && apt-get install postgresql postgresql-server-dev-9.3 build-essential python-imaging python-lxml python-ldap python-dev libldap2-dev libsasl2-dev npm nodejs git python-setuptools libxml2-dev libxslt1-dev libjpeg-dev python-pip gdebi -y
 
 
 
4.Cloning Odoo from Github with minimal change history
 
 
 
    git clone --depth=1 --branch=8.0 https://github.com/odoo/odoo.git /opt/odoo/odoo
 
 
 
5.Installing python packages required for Odoo
 
 
 
    sudo chown odoo:odoo /opt/odoo/ -R && chown odoo:odoo /var/log/odoo/ -R && cd /opt/odoo/odoo && pip install -r requirements.txt
 
 
 
6. Nodejs and related packages to run Odoo Website
 
 
 
    sudo npm install -g less less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node
 
 
 
7. wkhtltopdf library required to print reports from Odoo
 
 
 
    cd /tmp && wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && sudo gdebi -n wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && rm wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
 
 
 
    ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && ln -s /usr/local/bin/wkhtmltoimage /usr/bin/
 
 
 
8. Optional GeoIP database to identify Origin of User in case of Website
 
 
 
    wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz && gunzip GeoLiteCity.dat.gz && mkdir /usr/share/GeoIP/ && mv GeoLiteCity.dat /usr/share/GeoIP/
 
 
 
9. User creation for Postgresql
 
 
 
    sudo su - postgres -c "createuser -s odoo"
 
 
 
10. Generating Odoo config file
 
 
 
    sudo su - odoo -c "/opt/odoo/odoo/odoo.py --addons-path=/opt/odoo/odoo/addons -s --stop-after-init"
 
 
 
    sudo mv /opt/odoo/.openerp_serverrc /etc/odoo/openerp-server.conf
 
 
 
11. Making Odoo as a service
 
 
 
    sudo cp /opt/odoo/odoo/debian/init /etc/init.d/odoo && chmod +x /etc/init.d/odoo
 
 
 
    sudo ln -s /opt/odoo/odoo/odoo.py /usr/bin/odoo.py
 
 
 
    sudo update-rc.d -f odoo start 20 2 3 4 5 .
 
 
 
12. Start Odoo server
 
 
 
    sudo service odoo start
 
 
 
Open your browser and go to : http://localhost:8069 to access your Odoo instance
 
 
 
Don't forget to give your valuable feedback in comments
 

01:21, 11 Нэгдүгээр сар 2023-ий байдлаарх одоогийн засвар

Steps To Install Odoo 15 On Ubuntu 20.04 

Odoo is the most popular all-in-one business software in the world.To Install Odoo 15 on Ubuntu 20.04 you just need to follow the below steps.

There are many ways to install Odoo depending on the requirements and the easy and quick way to install Odoo by using APT repositories.

If you want to work with running multiple Odoo versions on the same system then you can either use docker compose or docker Install Odoo in a virtual environment.

This blog is to provide steps for installation and configuration of Odoo for production environment using Git source and Python environment on an Ubuntu 20.04 system.

Odoo Installation For Free !!


To install Odoo 15 on Ubuntu 20.04 LTS you just follow the below steps.


Step 1 : Update Server

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


Step 2 : Create Odoo User in Ubuntu

                        
sudo adduser -system -home=/opt/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 Python Dependencies

sudo apt-get install git python3 python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev gdebi -y


Step 6 : Install Python PIP Dependencies

sudo apt-get install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev


Step 7 : Install other required packages

sudo apt-get install nodejs npm -y
sudo npm install -g rtlcss


Step 8 : Install Wkhtmltopdf

sudo apt-get install xfonts-75dpi
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 cp /usr/local/bin/wkhtmltoimage  /usr/bin/wkhtmltoimage               
sudo cp /usr/local/bin/wkhtmltopdf  /usr/bin/wkhtmltopdf


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 15.0 https://www.github.com/odoo/odoo /opt/odoo/odoo-server

Step 11 : Setting permissions on home folder

sudo chown -R odoo:odoo /opt/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=/opt/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

sudo su - odoo -s /bin/bash 
cd /opt/odoo/odoo-server
./odoo-bin -c /etc/odoo-server.conf

Now your odoo instance is up and running. 

Go to web browser and access your odoo at localhost:8069