{"id":5886,"date":"2024-07-22T15:23:44","date_gmt":"2024-07-22T15:23:44","guid":{"rendered":"https:\/\/www.techit.ma\/digibrown\/?p=5886"},"modified":"2024-07-22T23:19:45","modified_gmt":"2024-07-22T23:19:45","slug":"odoo","status":"publish","type":"post","link":"https:\/\/www.techit.ma\/digibrown\/2024\/07\/22\/odoo\/","title":{"rendered":"Installation odoo 17 ubuntu 22.04"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"5886\" class=\"elementor elementor-5886\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4fa458e e-flex e-con-boxed e-con e-parent\" data-id=\"4fa458e\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b1a2485 elementor-widget elementor-widget-image\" data-id=\"b1a2485\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"267\" src=\"https:\/\/www.techit.ma\/digibrown\/wp-content\/uploads\/2024\/07\/odoo_maroc_installation-1024x267.jpg\" class=\"attachment-large size-large wp-image-5891\" alt=\"\" srcset=\"https:\/\/www.techit.ma\/digibrown\/wp-content\/uploads\/2024\/07\/odoo_maroc_installation-1024x267.jpg 1024w, https:\/\/www.techit.ma\/digibrown\/wp-content\/uploads\/2024\/07\/odoo_maroc_installation-300x78.jpg 300w, https:\/\/www.techit.ma\/digibrown\/wp-content\/uploads\/2024\/07\/odoo_maroc_installation-768x200.jpg 768w, https:\/\/www.techit.ma\/digibrown\/wp-content\/uploads\/2024\/07\/odoo_maroc_installation-1536x400.jpg 1536w, https:\/\/www.techit.ma\/digibrown\/wp-content\/uploads\/2024\/07\/odoo_maroc_installation.jpg 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-8898bf9 e-flex e-con-boxed e-con e-parent\" data-id=\"8898bf9\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4108b2a elementor-widget elementor-widget-text-editor\" data-id=\"4108b2a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div>Odoo 17 offers more performance enhancements, an enhanced user interface, and new functionality. PostgreSQL and Python 3.10 were needed for Odoo 17\u2019s database management system. This article will walk you through the process of installing <a href=\"https:\/\/www.cybrosys.com\/odoo\/odoo-erp\/\">Odoo 17<\/a> on an Ubuntu 20.04 LTS server step-by-step.<\/div><h2>Step -1: Login to the Ubuntu server via SSH<\/h2><pre>ssh username@IP_Address -p Port_number\u00a0<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Connect via SSH to your server.\u00a0<\/div><h2>Step-2: Update Server<\/h2><pre>sudo apt-get update<br \/>sudo apt-get upgrade<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Make sure the system is up to date.<\/div><h2>Step-3: Secure Server<\/h2><pre>sudo apt-get install openssh-server fail2ban<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>SSH assaults can be avoided by utilizing Fail2ban.<\/div><h2>Step-4: Install Packages and libraries<\/h2><div>Install Odoo\u2019s necessary Python packages. Set up pip3.<\/div><pre>sudo apt-get install -y python3-pip<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Use the methods below to install web dependencies and packages. Verify that every package has been installed correctly and without any problems.<\/div><pre>sudo apt-get install python-dev python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev<br \/>sudo apt-get install -y npm<br \/>sudo ln -s \/usr\/bin\/nodejs \/usr\/bin\/node<br \/>sudo npm install -g less less-plugin-clean-css<br \/>sudo apt-get install -y node-less<\/pre><div class=\"copy-btn\">\u00a0<\/div><h2>Step-5: Setup Database Server<\/h2><div>As previously mentioned, PostgreSQL is the database server used by Odoo.\u00a0<\/div><pre>sudo apt-get install postgresql<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Setup and install the database. Establish a user to manage the database<\/div><pre>sudo su - postgres<br \/>createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo17<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>The user and the password are needed for the conf file. Postgres uses a distinct system user to perform tasks. To switch between users, run sudo su -postgres. Next, create a database user for Odoo 17.<\/div><pre>psql<br \/>ALTER USER odoo17 WITH SUPERUSER;<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>If the user runs the aforementioned command, superuser access rights will be guaranteed. Next, log out of Postgres and PSQL.<\/div><pre>\\q<br \/>exit<\/pre><div class=\"copy-btn\">\u00a0<\/div><h2>Step-6: Create a system user<\/h2><pre>sudo adduser --system --home=\/opt\/odoo17 --group odoo17<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Make a system user for security and to carry out Odoo tasks. This user will only have limited access to all of Odoo\u2019s files and directories.<\/div><h2>Step-7: Get Odoo17 community from git<\/h2><div>The Odoo source file needs to be uploaded to our server right now. Install git on the server first.<\/div><pre>sudo apt-get install git<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>The file will then be added to the directory when you change the system user to Odoo17.<\/div><pre>sudo su - odoo17 -s \/bin\/bash<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>The operator dot(.) at the end of the command is used to clone the files to the current user\u2019s home directory, which is \/opt\/odoo and was specified at the time of user creation. The following command will clone the source directory.<\/div><pre>git clone https:\/\/www.github.com\/odoo\/odoo --depth 1 --branch 17.0 --single-branch .<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Proceed with the installation after logging out of the user now.<\/div><pre>exit<\/pre><div class=\"copy-btn\">\u00a0<\/div><h2>Step-8:Install Required Python Packages<\/h2><pre>sudo pip3 install -r \/opt\/odoo\/requirements.txt<\/pre><div class=\"copy-btn\">\u00a0<\/div><h2>Step-9:Install Wkhtmltopdf<\/h2><div>Reports can be printed from Odoo as PDF files. Wkhtmltopdf facilitates the creation of PDF reports from HTML data. Additionally, the report engine converts the Qweb template reports to HTML format, and Wkhtmltopdf creates the PDF report:<\/div><pre>sudo wget https:\/\/github.com\/wkhtmltopdf\/wkhtmltopdf\/releases\/download\/0.12.5\/wkhtmltox_0.12.5-1.bionic_amd64.deb<br \/>sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb<br \/>sudo apt install -f<\/pre><div class=\"copy-btn\">\u00a0<\/div><h2>Step-10:Setup Conf file<\/h2><div>Odoo requires certain information in order to function, such as the database user, password, locations of add-ons, etc. The configuration file will also have these available. Thus, the first thing we should do is create an Odoo configuration file. You can also find an example configuration file in the Odoo folder, which you can copy to the desired location. Configuration files are typically kept in \/etc.<\/div><div>The configuration file should be copied to \/etc.<\/div><pre>sudo cp \/opt\/odoo17\/debian\/odoo.conf \/etc\/odoo17.conf<br \/>sudo nano \/etc\/odoo17.conf<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Update the conf file same as shown in the code below.<\/div><pre>[options]<br \/>\u00a0 \u00a0; This is the password that allows database operations:<br \/>\u00a0 \u00a0admin_passwd = admin<br \/>\u00a0 \u00a0db_host = False<br \/>\u00a0 \u00a0db_port = False<br \/>\u00a0 \u00a0db_user = odoo17<br \/>\u00a0 \u00a0db_password = False<br \/>\u00a0 \u00a0addons_path = \/opt\/odoo17\/addons<br \/>\u00a0 \u00a0logfile = \/var\/log\/odoo\/odoo17.log<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Prior to conducting the operations, the following parameters need to be configured.<\/div><div>The master password for Odoo is admin_passwd, which can be used to create, delete, duplicate, and perform a variety of other database management operations.<\/div><div>the database host, or db_host.<\/div><div>Database port: db_port.<\/div><div>db_user: the name of the database user.<\/div><div>db_password: Enter the password that was entered when the database user was created.<\/div><div>addons_path: Provide the path to the directories containing the Odoo addon directories.<\/div><div>It is possible to list more than one directory, separated by commas:<\/div><div>Logfile: the path to the log file. For example, addons_path = \/opt\/odoo17\/addons, \/opt\/odoo17\/enterprise, \/opt\/odoo17\/custom.<\/div><div>Next, you need to grant system user Odoo access to the conf file.<\/div><pre>sudo chown odoo17: \/etc\/odoo17.conf<br \/>sudo chmod 640 \/etc\/odoo17.conf<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Additionally, create an Odoo log directory and set permissions for it to assist you in identifying Odoo-related problems.<\/div><pre>sudo mkdir \/var\/log\/odoo<br \/>sudo chown odoo17:root \/var\/log\/odoo<\/pre><div class=\"copy-btn\">\u00a0<\/div><h2>Step-11:Odoo service file<\/h2><div>We have to create a service to run Odoo. Let\u2019s create a service file \u2018odoo.service\u2019 in \/etc\/systemd\/system.<\/div><div>sudo nano \/etc\/systemd\/system\/odoo17.service<\/div><div>Add the following aspects to the newly created service file.<\/div><pre>[Unit]<br \/>\u00a0 \u00a0Description=Odoo17<br \/>\u00a0 \u00a0Documentation=http:\/\/www.odoo.com<br \/>\u00a0 \u00a0[Service]<br \/>\u00a0 \u00a0# Ubuntu\/Debian convention:<br \/>\u00a0 \u00a0Type=simple<br \/>\u00a0 \u00a0User=odoo17<br \/>\u00a0 \u00a0ExecStart=\/opt\/odoo17\/odoo-bin -c \/etc\/odoo17.conf<br \/>\u00a0 \u00a0[Install]<br \/>\u00a0 \u00a0WantedBy=default.target<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Finally, set the root user\u2019s permissions for this service file.<\/div><pre>sudo chmod 755 \/etc\/systemd\/system\/odoo17.service<br \/>sudo chown root: \/etc\/systemd\/system\/odoo17.service<\/pre><div class=\"copy-btn\">\u00a0<\/div><h2>Step-12:Run Odoo17<\/h2><pre>sudo systemctl start odoo17.service<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Use the above command to launch the Odoo instance. Then, use the following command to see the service\u2019s current status. Furthermore, the installation of Odoo was successful if it is shown as active.<\/div><pre>sudo systemctl status odoo17.service<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Now, you can access Odoo by entering the following URL. It will reroute to the database creation page.<\/div><pre>\"http:\/\/<your_domain_or_IP_address>:8069\"<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Check Odoo logs<\/div><div>If you are experiencing problems with the installation or for any other reason, you can use the following command to examine the logs of the Odoo platform that you have configured. You can view the real-time logs in the terminal by using this command.<\/div><pre>sudo tail -f \/var\/log\/odoo\/odoo.log<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Finally, use the following command to start the Odoo service automatically after restarting the server:<\/div><pre>sudo systemctl enable odoo17.service<\/pre><div class=\"copy-btn\">\u00a0<\/div><div>Use the following command to restart the Odoo service if you have made any modifications to the add-ons so that your instance will reflect the updates<\/div><pre>sudo systemctl restart odoo17.service<\/pre><div class=\"copy-btn\">\u00a0<\/div><p>After installing Odoo successfully, you can start your career in Odoo development and learn more about it by using our Odoo Development Tutorial App, which you can access from the Odoo Apps Page.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Odoo 17 offers more performance enhancements, an enhanced user interface, and new functionality. PostgreSQL and Python 3.10 were needed for Odoo 17\u2019s database management system. This article will walk you through the process of installing Odoo 17 on an Ubuntu 20.04 LTS server step-by-step. Step -1: Login to the Ubuntu server via SSH ssh username@IP_Address [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5917,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"elementor_canvas","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[81],"tags":[],"class_list":["post-5886","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-odoo"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/posts\/5886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/comments?post=5886"}],"version-history":[{"count":5,"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/posts\/5886\/revisions"}],"predecessor-version":[{"id":5894,"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/posts\/5886\/revisions\/5894"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/media\/5917"}],"wp:attachment":[{"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/media?parent=5886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/categories?post=5886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techit.ma\/digibrown\/wp-json\/wp\/v2\/tags?post=5886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}