0924.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Install Odoo - Open Source Business Application Suite - on Linux</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Browser Based,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Business Application Suite,Debian,Homelab,Linux,Odoo,PostgreSQL,Ubuntu,Odoo Business Suite,Python,Python Based Business Suite,Install Odoo On Linux,Odoo On Linux,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Install Odoo - Open Source Business Application Suite - on Linux">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="04/21/2024 01:13:44 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Install Odoo - Open Source Business Application Suite - on Linux</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is Odoo?</h2>
  26. <blockquote>Odoo is a suite of web based open source business apps. The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing &amp; Accounting, Point of Sale, Human Resources, Marketing, Manufacturing. Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.<i> - <a href="https://github.com/odoo/odoo" target="_blank">https://github.com/odoo/odoo</a></i></blockquote>
  27. <h2>Installation</h2>
  28. <ol>
  29. <li>Log into the Linux device</li>
  30. <li>Run the following commands in terminal
  31. <div class="codeBlock"># update software repositories<br />
  32. sudo apt update<br />
  33. # install available software updates<br />
  34. sudo apt upgrade<br />
  35. # install prerequisites<br />
  36. sudo apt install wget git apt-transport-https -y<br />
  37. # install postgresql<br />
  38. sudo apt install postgresql postgresql-client -y<br />
  39. # enable the postgresql service and start it<br />
  40. sudo systemctl enable postgresql --now<br />
  41. # connect to postgresql<br />
  42. sudo -u postgres psql postgres<br />
  43. # create odoo database user<br />
  44. create user odoo_rw with password &#39;0dooDB_rw$&#39;;<br />
  45. # create odoo database<br />
  46. create database odoo with encoding=&#39;UTF8&#39; template=&#39;template0&#39; owner=&#39;odoo_rw&#39;;<br />
  47. # close postgresql connection<br />
  48. exit<br />
  49. # install python<br />
  50. sudo apt install python3-full python3-pip libldap2-dev libpq-dev libsasl2-dev -y<br />
  51. # create odoo user<br />
  52. sudo useradd -M odoo<br />
  53. # create /opt/odoo directory<br />
  54. sudo mkdir /opt/odoo -p<br />
  55. # set owner of /opt/odoo<br />
  56. sudo chown odoo /opt/odoo -R &amp;&amp; sudo chgrp odoo /opt/odoo -R &amp;&amp; sudo usermod -d /opt/odoo odoo<br />
  57. # switch to odoo user<br />
  58. sudo su - odoo<br />
  59. # clone odoo from github<br />
  60. git clone https://github.com/odoo/odoo.git .<br />
  61. # prepare the working directory<br />
  62. python3 -m venv odoo-venv<br />
  63. . odoo-venv/bin/activate<br />
  64. # install wheel<br />
  65. pip3 install wheel<br />
  66. # install odoo<br />
  67. pip install -r requirements.txt<br />
  68. # create a config file<br />
  69. touch ./odoo.conf<br />
  70. # write database config to config file<br />
  71. echo &quot;[options]\ndb_user = odoo_rw\ndb_password = 0dooDB_rw$\ndb_name = odoo\ndb_host = localhost&quot; &gt; ./odoo.conf<br />
  72. # run odoo<br />
  73. ./odoo-bin --config ./odoo.conf -i base</div>
  74. </li>
  75. <li>Open a web browser and navigate to http://DNSorIP:8069</li>
  76. <li>Login with the username admin and password admin</li>
  77. <li>Click the user icon at the top right corner of the screen &gt; Preferences</li>
  78. <li>Update the Email and Email Signature &gt; Click Save</li>
  79. <li>Click the Account Security tab &gt; Click the Change Password button</li>
  80. <li>Enter admin as the current password &gt; Click Confirm Password</li>
  81. <li>Enter and confirm a new password &gt; Click Change Password</li>
  82. <li>Login using the updated email address and password</li>
  83. <li>Welcome to Odoo</li>
  84. </ol>
  85. <h2>Running Odoo as a Service</h2>
  86. <ol>
  87. <li>Back in the Terminal, press CTRL+C to kill the running Odoo process</li>
  88. <li>Continue with the following commands in terminal
  89. <div class="codeBlock"># exit the odoo user shell<br />
  90. exit<br />
  91. # create odoo service file<br />
  92. sudo nano /etc/systemd/system/odoo.service</div>
  93. </li>
  94. <li>Paste the following into odoo.service
  95. <p>[Unit]<br />
  96. Description=Odoo<br />
  97. Requires=postgresql.service<br />
  98. After=network.target postgresql.service</p>
  99. <p>[Service]<br />
  100. User=odoo<br />
  101. Group=odoo<br />
  102. ExecStart=/opt/odoo/odoo-venv/bin/python3 /opt/odoo/odoo-bin -c /opt/odoo/odoo.conf</p>
  103. <p>[Install]<br />
  104. WantedBy=multi-user.target</p>
  105. </li>
  106. <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
  107. <li>Continue with the following commands
  108. <div class="codeBlock"># reload systemd services<br />
  109. sudo systemctl daemon-reload<br />
  110. # start odoo service on boot and now<br />
  111. sudo systemctl enable odoo --now</div>
  112. </li>
  113. <li>Back in the web browser, refresh the Odoo tab</li>
  114. <li>If prompted, log back in using the updated email address and password</li>
  115. </ol>
  116. <p>Source: <a href="https://www.odoo.com/documentation/17.0/administration/on_premise/source.html" target="_blank">https://www.odoo.com/documentation/17.0/administration/on_premise/source.html</a></p> </div>
  117. </div>
  118. </body>
  119. </html>