Project

General

Profile

Support #722

Updated by Daniel Curtis almost 9 years ago

This is a guide on how I installed Odoo 9 on FreeBSD 9. 

 h2. Prepare the Environment 

 * Make sure the system is up to date: 
 <pre> 
 pkg update && pkg upgrade 
 </pre> 

 * Add the Odoo user 
 <pre> 
 pw add user -n odoo -m -s /bin/sh -c "Odoo" 
 </pre>  

 * Edit the Odoo user .profile script: 
 <pre> 
 vi /home/odoo/.profile 
 </pre> 
 #* And add the LANG line: 
 <pre> 
 LANG=en_US.UTF8; export LANG 
 </pre> 

 * Install the dependencies using pkgng: 
 <pre> 
 pkg install py27-Jinja2 py27-libxml2 py27-xlwt py27-pytz py27-mx-base py27-psycopg2 py27-chart py27-pydot py27-libxslt py27-lxml py27-yaml py27-mako py27-dateutil py27-reportlab py27-werkzeug py27-vobject py27-vatnumber py27-unittest2 py27-simplejson py27-requests py27-qrcode py27-usb py27-openid py27-ldap py27-serial py27-pdf py27-pyparsing py27-psycogreen py27-psycopg2 py27-psutil py27-pillow py27-passlib py27-mock py27-gevent py27-feedparser py27-decorator py27-docutils wkhtmltopdf node npm 
 </pre> 

 * h1. Install less nodejs package: 
 <pre> 
 npm install -g less 
 </pre> 

 h2. Install PostgreSQL 9.4 

 * Install PostgreSQL: 
 <pre> 
 pkg install postgresql94-{server,client} 
 </pre> 

 * Enable PostgreSQL at boot: 
 <pre> 
 echo 'postgresql_enable="YES"' >> /etc/rc.conf 
 </pre> 

 * Initialize the database: 
 <pre> 
 service postgresql initdb 
 </pre> 

 * Start PostgreSQL: 
 <pre> 
 service postgresql start 
 </pre> 

 * Edit the postgres config file: 
 <pre> 
 vi /usr/local/pgsql/data/postgresql.conf 
 </pre> 
 #* And modify the following: 
 <pre> 
 listen_addresses = '*' 
 </pre> 

 * Edit the pg_hba config file: 
 <pre> 
 vi /usr/local/etc/pgsql/data/pg_hba.conf 
 </pre> 
 #* And modify the following: 
 <pre> 
 # TYPE    DATABASE      USER          CIDR-ADDRESS            METHOD only 

 # Local connections 
 local     all           all                                 trust 

 # IPv4 local connections: 
 host      all           all           127.0.0.1/32            trust 

 # IPv6 local connections: 
 host      all           all           ::1/128                 trust 

 # IPv4 connections: 
 host      all           all           192.168.10.0/24         md5 

 # IPv6 local connections: 
 host      all           all           1234::abcd/64           md5 
 </pre> 

 * Restart postgresql: 
 <pre> 
 service postgresql restart 
 </pre> 

 h2. Create a new user and database 

 * Switch to the pgsql user and enter into the psql prompt: 
 <pre> 
 su pgsql 
 psql -d template1 
 </pre> 
 #* Create the *odoouser* user and *odoodb* database: 
 <pre> 
 CREATE USER odoouser WITH PASSWORD 'SuperSecretPuppetmasterPassword'; 

 CREATE DATABASE odoodb OWNER odoouser; 

 GRANT ALL PRIVILEGES ON DATABASE "odoodb" to odoouser; 
 </pre> 

 * Exit from the postgres user 
 <pre> 
 \q 
 exit 
 </pre> 

 * Test the connection on a remote host: 
 <pre> 
 psql -h pg.example.com -U odoouser -W odoodb 
 </pre> 

 h2. Install Odoo 9 

 * Switch to the Odoo user folder: 
 <pre> 
 cd /home/odoo 
 </pre> 

 * Clone the latest Odoo 9 code from GitHub: 
 <pre> 
 git clone https://www.github.com/odoo/odoo --depth 1 --branch 9.0 --single-branch 
 chown -R odoo:odoo odoo 
 </pre> 

 * Create a folder for custom addons: 
 <pre> 
 mkdir -p odoo/custom/addons 
 chown -R odoo:odoo odoo/custom 
 </pre> 

 * Create the odoo log folder: 
 <pre> 
 mkdir /var/log/odoo 
 touch /var/log/odoo/odoo-server-log 
 chmod 755 /var/log/odoo 
 chown -R odoo:root /var/log/odoo 
 </pre> 

 * Create the odoo config file from the sample: Odoo config: 
 <pre> 
 mkdir /usr/local/etc/odoo 
 cp odoo/debian/openerp-server.conf /usr/local/etc /home/odoo/odoo/debian/openerp-server.conf /usr/local/etc/odoo 
 chown -R odoo /usr/local/etc/openerp-server.conf /usr/local/etc/odoo 
 </pre> 

 * Edit the Odoo config: 
 <pre> 
 vi /usr/local/etc/openerp-server.conf 
 </pre> 
 #* And Modify the following parameters: 
 <pre> 
 [options] 
 ; This is the password that allows database operations: 
 ; admin_passwd = admin 
 db_host = localhost 
 db_port = 5432 
 db_user = odoouser 
 db_password = SuperSecretPassword 
 addons_path = /home/odoo/odoo/addons 
 logfile = /var/log/odoo/openerp-server.log 
 log_level = error  
 </pre> 

 * Edit the openerp-server script: 
 <pre> 
 vi /home/odoo/odoo/openerp-server 
 </pre> 
 #* And change the env from python to python2 
 <pre> 
 #!/usr/bin/env python2 
 </pre> 

 * Now test run the Odoo server: 
 <pre> 
 su - odoo 
 cd odoo 
 ./openerp-server --config=/usr/local/etc/openerp-server.conf 
 </pre> 

 * Open a web browser and go to http://odoo.example.com:8069 and go to *manage databases*. 
 * Set a new master password 
 * Go back to http://odoo.example.com:8069 and log in, the default username is *admin* and password is *admin* 



 h2. Resources 

 * https://github.com/odoo/odoo 
 * https://www.getopenerp.com/install-odoo-9-on-ubuntu/

Back