Odoo is a business management software, well more like a company management tool. You can use it to easily build a e-commerce website, setup a POS, manage payment gateways, bills, vendors etc (ITS got a TON of features).
Its so powerful i expected a Linux like install to be easy. However there is very little information on installing this on FreeBSD, so I decided to document my efforts.
This guide will help you get up running but it is NOT at all secure and is NOT production ready.
Use for testing purposes only, for now.
Grab a beer and lets go !
Installing Odoo FreeNAS 11:
Create the iocage Jail: (modify IP and router for your setup)
SSH into your FreeNAS and make an iocage jail with this cmd:
To access the jail:
For Scripted install:
cd /etc
pkg install -y nano
nano odoo.sh
<BEGIN FILE INDICATOR: COPY THE NEXT LINE< DO NOT COPY THIS INTO YOUR FILE>
#!/bin/sh
pkg install -y libxslt python36 postgresql96-server git nano curl bash wget libsass libxml2 py36-pip py36-pillow npm node libxslt libsass py36-ldap3 gcc wkhtmltopdf
python3.6 -m pip install --upgrade pip
python3.6 -m pip install phonenumbers
npm install -g less
sysrc postgresql_enable="YES"
service postgresql initdb
service postgresql start
if [ -z /usr/ports ]; then portsnap fetch extract; else portsnap auto; fi
make BATCH=yes distclean install -C /usr/ports/net/py-ldap
make BATCH=yes distclean install -C /usr/ports/x11-fonts/webfonts/
mkdir /usr/local/odoo
git clone https://github.com/odoo/odoo.git /usr/local/odoo
python3.6 -m pip install -r /usr/local/odoo/requirements.txt
su postgres -c "createuser root";
su postgres -c "createdb odoo -O root";
python3.6 /usr/local/odoo/odoo-bin --addons-path=/usr/local/odoo/addons --database=odoo
echo "end"
</END FILE INDICATOR DO NOT COPY THIS INTO YOUR FILE>
Paste this in :
net_py-ldap_SET+=SASL
net_py-ldap_SET+=GSSAPI
net_py-ldap_SET+=FETCH
options_set+=EXTRAFONTS
options_set+=CLEARTYPE
Make it executable:
chmod +x odoo.sh
Cross your fingers and run the install:
./odoo.sh
It will take a good amount of time. When its done it should be on port 8069
Once you see green text "info" on the console that means the script ran and started odoo successfully. Wait a bit more for its initial setup.
To quit press cntrl + C
If it worked, then scroll all the way down to the autostart part
Something doesn't work ? Build it manually. (Assumes you start from a fresh jail)
Manual Install :
Install Dependencies:
Install dependancies:
portsnap fetch extract
pkg install -y python36 postgresql96-server git nano curl bash wget libsass libxml2 py36-pip py36-pillow npm node libxslt libsass py36-ldap3 gcc wkhtmltopdf
python3.6 -m pip install --upgrade pip
python3.6 -m pip install phonenumbers
npm install -g less
make distclean install -C /usr/ports/net/py-ldap
1st - YES SASL
2nd - YES GSSAPI AND FETCH
Just press enter for other prompts
cd /usr/ports/x11-fonts/webfonts/ && make install clean
Tick first 2 options
sysrc postgresql_enable="YES"
service postgresql initdb
service postgresql start
Create users and databases : (this is not secure but im working on it)
su postgres
Create a PostgreSQL user account. Supply the -s flag if you want the user to be a superuser. The -P flag will prompt you for a password..
createuser root
createdb odoo -O root
exit
(dropuser to delete)
Installing odoo:
Choose your install location. I chose /usr/local
cd /usr/local
git clone https://github.com/odoo/odoo.git
cd odoo
python3.6 -m pip install -r requirements.txt
Everything SHOULD be setup at this point. Lets start odoo with:
python3.6 odoo-bin --addons-path=/usr/local/odoo/addons --database=odoo
IP:8069
For autostart:
setenv EDITOR /usr/local/bin/nano
crontab -e
Default Login:
email: admin
pass: admin
Its so powerful i expected a Linux like install to be easy. However there is very little information on installing this on FreeBSD, so I decided to document my efforts.
This guide will help you get up running but it is NOT at all secure and is NOT production ready.
Use for testing purposes only, for now.
Grab a beer and lets go !
Installing Odoo FreeNAS 11:
Create the iocage Jail: (modify IP and router for your setup)
SSH into your FreeNAS and make an iocage jail with this cmd:
Code:
iocage create -n odoo -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.19/24" defaultrouter="192.168.1.2" vnet="on" allow_raw_sockets="1" boot="on"
To access the jail:
Code:
iocage console odoo
For Scripted install:
cd /etc
pkg install -y nano
nano odoo.sh
<BEGIN FILE INDICATOR: COPY THE NEXT LINE< DO NOT COPY THIS INTO YOUR FILE>
#!/bin/sh
pkg install -y libxslt python36 postgresql96-server git nano curl bash wget libsass libxml2 py36-pip py36-pillow npm node libxslt libsass py36-ldap3 gcc wkhtmltopdf
python3.6 -m pip install --upgrade pip
python3.6 -m pip install phonenumbers
npm install -g less
sysrc postgresql_enable="YES"
service postgresql initdb
service postgresql start
if [ -z /usr/ports ]; then portsnap fetch extract; else portsnap auto; fi
make BATCH=yes distclean install -C /usr/ports/net/py-ldap
make BATCH=yes distclean install -C /usr/ports/x11-fonts/webfonts/
mkdir /usr/local/odoo
git clone https://github.com/odoo/odoo.git /usr/local/odoo
python3.6 -m pip install -r /usr/local/odoo/requirements.txt
su postgres -c "createuser root";
su postgres -c "createdb odoo -O root";
python3.6 /usr/local/odoo/odoo-bin --addons-path=/usr/local/odoo/addons --database=odoo
echo "end"
</END FILE INDICATOR DO NOT COPY THIS INTO YOUR FILE>
Code:
nano make.conf
Paste this in :
net_py-ldap_SET+=SASL
net_py-ldap_SET+=GSSAPI
net_py-ldap_SET+=FETCH
options_set+=EXTRAFONTS
options_set+=CLEARTYPE
Make it executable:
chmod +x odoo.sh
Cross your fingers and run the install:
./odoo.sh
It will take a good amount of time. When its done it should be on port 8069
Once you see green text "info" on the console that means the script ran and started odoo successfully. Wait a bit more for its initial setup.
To quit press cntrl + C
If it worked, then scroll all the way down to the autostart part
Something doesn't work ? Build it manually. (Assumes you start from a fresh jail)
Manual Install :
Install Dependencies:
Install dependancies:
portsnap fetch extract
pkg install -y python36 postgresql96-server git nano curl bash wget libsass libxml2 py36-pip py36-pillow npm node libxslt libsass py36-ldap3 gcc wkhtmltopdf
python3.6 -m pip install --upgrade pip
python3.6 -m pip install phonenumbers
npm install -g less
make distclean install -C /usr/ports/net/py-ldap
1st - YES SASL
2nd - YES GSSAPI AND FETCH
Just press enter for other prompts
cd /usr/ports/x11-fonts/webfonts/ && make install clean
Tick first 2 options
sysrc postgresql_enable="YES"
service postgresql initdb
service postgresql start
Create users and databases : (this is not secure but im working on it)
su postgres
Create a PostgreSQL user account. Supply the -s flag if you want the user to be a superuser. The -P flag will prompt you for a password..
createuser root
createdb odoo -O root
exit
(dropuser to delete)
Installing odoo:
Choose your install location. I chose /usr/local
cd /usr/local
git clone https://github.com/odoo/odoo.git
cd odoo
python3.6 -m pip install -r requirements.txt
Everything SHOULD be setup at this point. Lets start odoo with:
python3.6 odoo-bin --addons-path=/usr/local/odoo/addons --database=odoo
IP:8069
For autostart:
setenv EDITOR /usr/local/bin/nano
crontab -e
Code:
@reboot python3.6 /usr/local/odoo/odoo-bin --addons-path=/usr/local/odoo/addons --database=odoo
Default Login:
email: admin
pass: admin
Last edited: