Project

General

Profile

Support #955

Updated by Daniel Curtis over 3 years ago

This is a guide on setting up Odoo 13 from source on FreeBSD 12.2-RELEASE. 

 h2. Prepare the Environment 

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

 h2. Install PostgreSQL 12 

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

 * Enable PostgreSQL at boot: 
 <pre> 
 sysrc postgresql_enable=YES 
 </pre> 

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

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

 h2. Create a new user and database 

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

 CREATE DATABASE odoodb OWNER odoouser ENCODING 'UTF8'; 

 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 13 

 * Install Odoo: 
 <pre> 
 pkg install py37-odoo 
 </pre> 

 * Copy the original config to a new working config: 
 <pre> 
 cp /usr/local/etc/odoo/odoo.conf /usr/local/etc/odoo.conf 
 chmod o+w /usr/local/etc/odoo.conf 
 </pre> 

 * Edit the Odoo config: 
 <pre> 
 vi /usr/local/etc/odoo.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 
 database = odoodb 
 db_user = odoouser 
 db_password = SuperSecretPassword 
 ;addons_path = /usr/local/lib/python3.7/site-packages/odoo/addons/ 
 logfile = /var/log/odoo.log 
 log_level = error  
 </pre> 

 * Create the odoo log: log folder: 
 <pre> 
 touch /var/log/odoo.log 
 chmod 644 /var/log/odoo.log 
 chown -R odoo:wheel /var/log/odoo.log 
 </pre> 

 * Initialize the database: 
 <pre> 
 su -m odoo -c 'odoo -i base -d odoodb --stop-after-init --without-demo=all --db_host=localhost -r odoouser -w SuperSecretPassword SuperSecretPassword' 
 </pre> 

 * Start and enable odoo at boot: 
 <pre> 
 sysrc odoo_enable=YES 
 service odoo start 
 </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. Install Custom Addon 

 *NOTE*: Make sure to install at least one app in order to access _Activate developer mode_ in +Settings+. 

 h3. App Store Zip 

 This provides an example of installing the field service module by downloading the zip from the Odoo app store. 

 * Install geos: 
 <pre> 
 pkg install geos 
 </pre> 

 * Download a copy of the "fieldservice":https://apps.odoo.com/apps/modules/13.0/fieldservice/ module, then upload the zip to the Odoo server 

 * Unzip and install the module: 
 <pre> 
 cd /var/lib/odoo/addons/13.0 
 unzip fieldservice-13.0.1.1.0.zip 
 chown -R odoo:odoo * 
 </pre> 

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

 * From the Web interface, go to +Apps+ and click on *Update Apps List* then *Update*. 
 * *NOTE*: If fieldservice app is not listed in the web interface, press *CTRL+F5* to refresh the browser cache. 



 h2. Resources 

 * https://github.com/odoo/odoo

Back