{"id":8639,"date":"2024-06-21T08:03:27","date_gmt":"2024-06-21T08:03:27","guid":{"rendered":"https:\/\/www.infinitivehost.com\/knowledge-base\/?p=8639"},"modified":"2024-08-05T07:36:22","modified_gmt":"2024-08-05T07:36:22","slug":"install-web-layer-in-openerp-8-as-stand-alone-server","status":"publish","type":"post","link":"https:\/\/www.infinitivehost.com\/knowledge-base\/install-web-layer-in-openerp-8-as-stand-alone-server\/","title":{"rendered":"Install Web Layer in OpenERP 8 as Stand-Alone Server"},"content":{"rendered":"<div class='epvc-post-count'><span class='epvc-eye'><\/span>  <span class=\"epvc-count\"> 1,113<\/span><span class='epvc-label'> Views<\/span><\/div>\n<p>Installing the web layer for OpenERP 8 (now known as Odoo 8) as a stand-alone HTTP server involves setting up the system to handle HTTP requests directly. This is useful for development environments or specific production setups where you want to run Odoo without relying on a separate web server like Nginx or Apache.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step-by-Step Guide to Set Up OpenERP 8 (Odoo 8) as a Stand-Alone HTTP Server<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Prerequisites<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>System Requirements<\/strong>:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A machine with a Unix-based OS (like Ubuntu, CentOS, Debian) or Windows.<\/li>\n\n\n\n<li>Python 2.7 installed.<\/li>\n\n\n\n<li>PostgreSQL database server installed and running.<\/li>\n<\/ul>\n\n\n\n<p>    2. <strong>Dependencies<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure you have all necessary Python dependencies.<\/li>\n\n\n\n<li>Have Odoo 8 source code or package ready for installation.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Install Python and Dependencies<\/h3>\n\n\n\n<p>Ensure Python 2.7 and necessary libraries are installed. This guide assumes you&#8217;re using a Unix-based system.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Update and Install Essential Packages<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-8b55d4f2b0aa7ddb699d3b0aa5aa625e\"><code>   <code>sudo apt-get update\n   sudo apt-get install python-dev python-pip build-essential<\/code><\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Install Python Packages<\/strong>: Odoo 8 requires several Python packages. Install them using <code>pip<\/code>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-a3b97db10a5a75621188cbf73c3b5b23\"><code>   <code>sudo pip install babel decorator docutils feedparser gevent \\\n                    jinja2 lxml mako MarkupSafe mock passlib psutil \\\n                    psycopg2-binary pydot pyparsing pyPdf python-dateutil \\\n                    pytz pywebdav pyyaml reportlab requests six suds-jurko \\\n                    vobject werkzeug wsgiref xlwt pillow<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Install PostgreSQL<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Install PostgreSQL<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-69ed494a99d63cb893e4c1600973a30a\"><code>   <code>sudo apt-get install postgresql postgresql-contrib<\/code><\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Create a PostgreSQL User for Odoo<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-f4876fcb7c78f0a694f0d12dc312ac44\"><code>   <code>sudo su - postgres\n   createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo<\/code><\/code><\/pre>\n\n\n\n<p>Enter a password when prompted and then exit the <code>postgres<\/code> user shell:<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-0af0a48528330c8f9d89d700e97f0d5a\"><code>   <code>exit<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Download and Install OpenERP 8 (Odoo 8)<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Download Odoo 8<\/strong>: Download the source code from GitHub:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-67a6b4488e62aed5ccbfb58a34761f28\"><code>   <code>cd \/opt\n   sudo git clone --depth=1 --branch=8.0 https:\/\/www.github.com\/odoo\/odoo.git\n   cd odoo<\/code><\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Install Odoo<\/strong>: No specific installation is needed since you will run it directly from the source directory. However, make sure to install remaining dependencies and prepare the configuration.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Configure Odoo as a Stand-Alone HTTP Server<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Create a Configuration File<\/strong>: Create a configuration file <code>odoo.conf<\/code> in the <code>\/etc<\/code> directory:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-9e8a0ad948b759c6666484d961bd1128\"><code>   <code>sudo nano \/etc\/odoo.conf<\/code><\/code><\/pre>\n\n\n\n<p>Add the following content to the file (customize the paths and settings as needed):<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-b52cd3a63d4c8946d187dd6ef877d842\"><code>   <code>&#91;options]\n   ; This is the password that allows database operations:\n   admin_passwd = your_admin_password\n   db_host = False\n   db_port = False\n   db_user = odoo\n   db_password = your_postgres_password\n   addons_path = \/opt\/odoo\/addons,\/opt\/odoo\/your_custom_addons_path\n   logfile = \/var\/log\/odoo\/odoo.log\n   xmlrpc_port = 8069<\/code><\/code><\/pre>\n\n\n\n<p>Save and close the file.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Create Log Directory<\/strong>: Ensure the log directory exists and set the appropriate permissions:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-be0ddd8903694bed4f11b5eebf16883b\"><code>   <code>sudo mkdir \/var\/log\/odoo\n   sudo chown odoo:odoo \/var\/log\/odoo<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Start Odoo Server<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Run Odoo as Stand-Alone HTTP Server<\/strong>: Navigate to the Odoo directory and start the server with the configuration file:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-1c0899d566135a9752807b077de420cf\"><code>   <code>cd \/opt\/odoo\n   .\/odoo.py --config=\/etc\/odoo.conf<\/code><\/code><\/pre>\n\n\n\n<p>This command starts Odoo and it will be accessible via HTTP on port 8069 by default.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Test Odoo<\/strong>: Open a web browser and navigate to:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-2ebfa6a98771702a8cd2425c3d206a5e\"><code>   <code>http:\/\/your_server_ip:8069<\/code><\/code><\/pre>\n\n\n\n<p>You should see the Odoo 8 login screen or the initial setup screen if it&#8217;s the first time you are running Odoo.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: (Optional) Run Odoo as a Background Service<\/h3>\n\n\n\n<p>For production environments, you typically want Odoo to run as a service, so it starts automatically on system boot and runs in the background.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Create an Init Script<\/strong>: Create a script in <code>\/etc\/init.d<\/code>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-0823abb4102a78a9f48519c712852b57\"><code>   <code>sudo nano \/etc\/init.d\/odoo<\/code><\/code><\/pre>\n\n\n\n<p>Add the following script:<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-7aad26aa67fb40d48ca03f267df46175\"><code>   <code>#!\/bin\/sh\n   ### BEGIN INIT INFO\n   # Provides:          odoo\n   # Required-Start:    $remote_fs $syslog\n   # Required-Stop:     $remote_fs $syslog\n   # Default-Start:     2 3 4 5\n   # Default-Stop:      0 1 6\n   # Short-Description: Odoo ERP\n   # Description:       Odoo ERP Business Application\n   ### END INIT INFO\n\n   PATH=\/sbin:\/usr\/sbin:\/bin:\/usr\/bin\n   DAEMON=\/opt\/odoo\/odoo.py\n   NAME=odoo\n   DESC=odoo\n   USER=odoo\n   CONFIG=\/etc\/odoo.conf\n   LOGFILE=\/var\/log\/odoo\/odoo.log\n\n   test -x $DAEMON || exit 0\n\n   set -e\n\n   case \"$1\" in\n     start)\n       echo -n \"Starting $DESC: \"\n       start-stop-daemon --start --quiet --pidfile \/var\/run\/$NAME.pid --chuid $USER --background --make-pidfile --exec $DAEMON -- --config=$CONFIG --logfile=$LOGFILE\n       echo \"$NAME.\"\n       ;;\n     stop)\n       echo -n \"Stopping $DESC: \"\n       start-stop-daemon --stop --quiet --pidfile \/var\/run\/$NAME.pid --oknodo\n       echo \"$NAME.\"\n       ;;\n     restart)\n       echo -n \"Restarting $DESC: \"\n       start-stop-daemon --stop --quiet --pidfile \/var\/run\/$NAME.pid --oknodo\n       sleep 1\n       start-stop-daemon --start --quiet --pidfile \/var\/run\/$NAME.pid --chuid $USER --background --make-pidfile --exec $DAEMON -- --config=$CONFIG --logfile=$LOGFILE\n       echo \"$NAME.\"\n       ;;\n     *)\n       N=\/etc\/init.d\/$NAME\n       echo \"Usage: $N {start|stop|restart}\" &gt;&amp;2\n       exit 1\n       ;;\n   esac\n\n   exit 0<\/code><\/code><\/pre>\n\n\n\n<p>Save and close the file.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Make the Script Executable<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-57c8820d18e30c422f7ba070b07c1695\"><code>   <code>sudo chmod +x \/etc\/init.d\/odoo<\/code><\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Register the Script to Run at Startup<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-e109f1894d195e25c3d154e247642485\"><code>   <code>sudo update-rc.d odoo defaults<\/code><\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Start Odoo Service<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-efff2f59e296f31e9224555d726924c4\"><code>   <code>sudo service odoo start<\/code><\/code><\/pre>\n\n\n\n<p>You can now manage Odoo as a service with commands like <code>start<\/code>, <code>stop<\/code>, <code>restart<\/code>, etc.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Summary<\/h3>\n\n\n\n<p>Installing Web Layer in OpenERP 8 as a stand-alone server involves configuring the system to handle HTTP requests directly. By following these steps, you can set up OpenERP 8 to run as a stand-alone HTTP server on port 8069. You enable Odoo to run using Nginx or Apache as a front-end server to handle web traffic and proxy requests to the Odoo server. This ensures a more robust <a href=\"https:\/\/www.infinitivehost.com\/managed-odoo-server-solutions\"><strong><mark style=\"background-color:#8ed1fc\" class=\"has-inline-color\">Odoo server solution<\/mark><\/strong><\/a> with enhanced performance and security features.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1,113 Views Installing the web layer for OpenERP 8 (now known as Odoo 8) as a stand-alone HTTP server involves setting up the system to handle HTTP requests directly. This is useful for development environments or specific production setups where you want to run Odoo without relying on a separate web server like Nginx or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[203],"tags":[],"class_list":["post-8639","post","type-post","status-publish","format-standard","hentry","category-odoo"],"_links":{"self":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/8639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=8639"}],"version-history":[{"count":2,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/8639\/revisions"}],"predecessor-version":[{"id":8828,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/8639\/revisions\/8828"}],"wp:attachment":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=8639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=8639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=8639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}