This script does a solid job of setting up everything you need to get Odoo 10 up and running
I was able to customize it enough to use my existing database and a different port for odoo so I could run 2 instances on the same machine.
You can install Odoo from the Bitnami package but I wanted to have it from source so that I could make changes and get updates with the git commands.
I followed this guide to get started
Which got me most of the way there but I still had 2 problems.
1 creating the database gave me an error
DataError: encoding UTF8 does not match locale en_US DETAIL:
The chosen ****** setting requires encoding LATIN1.
To fix this I ran the following commands
sudo su postgres
update pg_database set datistemplate=false where datname='template1';
drop database Template1;
create database template1 with owner=postgres encoding='UTF-8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
update pg_database set datistemplate=true where datname='template1';
Then once I had created my database I got an error at the top of the page
/usr/bin/env : node: No such file or directory in ovoo v9
To fix follow the instructions from the NodeJS Website:
curl -sL https://deb.nodesource.com/setup_0.10 | sudo bash -
sudo apt-get install -y nodejs
sudo npm install -g npm
Then install Less and accessories:
sudo npm install -g less less-plugin-clean-css
Unfortunately Odoo has intentionally made their community edition a little on the difficult side to install. I can only assume this is to drive people to their paid SaaS model. To balance this I’ve put together a guide to getting Odoo up and running and I’ll add updates as I implement and deploy new functionality.
- Download Odoo from their website – You’ll want to pick Odoo 9 Community for Linux
The pick “Latest Debian 9.0” as your download
The install script does a pretty good job setting up new users and getting things installed and put into the correct place. One very critical step that it does leave out is getting Postgresql configured properly. So that’s step 2. You will see a 500 Internal Server Error if you try to access http://localhost:8069 at this point
- Setup Postgresql user
- Postgresql should have already been installed but if it wasn’t you can use this command to do it from the terminal “sudo apt-get install postgresql“
- if you get the message “No passwd entry for user postgres” you probably need to do t his
- Well need to create a new user and password that odoo can use to access the database – You can do that with these 2 commands
- Switch to postgresql user “sudo su – postgres”
- Execute the command “createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt odoo“
- You will be asked to create and confirm a password – This is the password that will protect your odoo database so make it something good and then remember it – you will need it again
- Type “exit” to get back to your previous user
- Edit the Odoo config file which is cryptically still called “openerp” even though they changed the name of the software quite some time ago
- the file is located in “/etc/odoo/openerp-server.conf“
- on Lubuntu the command would be “sudo leafpad /etc/odoo/openerp-server.conf” just replace leafpad with “gedit” if you are on ubuntu or your favorite text editor
- You need to change the 2 lines for “db_user” and “db_paspsword” to odoo and the password you chose before
- also add “logfile =/var/log/odoo/odoo-server.log” to the end of the config file so you can track down log files if you need to
- You should now have Odoo up and running at “http://localhost:8069“!
- You will get a first configuration screen to setup a new database for your instance
- Go ahead and pick your password which will be the default password for your administrator user
- The default user name (which it wont tell you) is “admin” with the password you picked
- Note: if you change the email address of the admin user you will then login with that email address instead of admin
Let me know if you run into trouble!