As today 2 Million Users are running their business with odoo, We know odoo is the most predominating business suit which makes your life easier.
Step First -Prepare your server
Now Open your terminal (Ctrl+Alt+T) and you will most likely need to run sudo in front of the apt-get commands since you probably have logged in as your user.
sudo apt-get upgrade
After that you have to upgrade your dist.
sudo apt-get dist-upgrade
Typically there is not need to reboot your system unless there is a major update, But personally i like to reboot at this point anyway since the server is not in production and it just ensures everything comes as backup.
If you want to work on server and wants to connect it remotely then you have to execute
"sudo apt-get install openssh - server" .
"sudo apt-get install openssh - server" .
Step Second - Users and accesses
Typically for the security reasons you have to run applications as users rather than root user (Super user). This makes it significantly more difficult for the application to be used for nefarious action. Isolating the application by running it as a user also reduces the chances that the application can do harm to the system itself.
So we should to create a user for the odoo. i also create a user directory for the odoo installation rather then placing it in Home directory. Generally /opt is the place where non-system applications are installed.
sudo adduser --system --home=/opt/odoo --group odoo
If you want to install the odoo into your home directory and with the system user then no need to run the above command.
If you want to run the odoo server as the odoo system user from the command line then you have to give the system rights to your user with "sudo su odoo"
Step Third - Installing database
Now we have to install the supporting applications that are required to run Odoo.
Since Odoo is depended on PostgreSQL database, we have to install it first and then configure it according to the users.
sudo apt-get install postgresql
Now the postgreSQL has been installed we should to change to the postgres user , so that it can be able to configure the database.
sudo su - postgres
Now we have to create a database user for odoo (if you didn't create odoo then use your system user through which you want to configure your database.)
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
Enter password for new role: ***********
Enter it again: ***********
You will need to remember the password as you will need it later when Odoo to connect to the database.
You are now done creating the database so you can logout with "exit"
Step Four- Installing the supporting packages
In order to run Odoo we have to install some python libraries
sudo apt-get install python-dateutil python-decorator python- docutils python-feedparser python-gdata python-gevent python-imaging python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-passlib python-psutil python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-pypdf python-reportlab python-requests python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-werkzeug python-xlwt python-yaml git
For some reason the version of wkhtmltopdf in Ubuntu 14.04 repository is out of data at version 0.9.9. Installing this version will give the qweb template engine in odoo warning message that wkhtmltopdf is out of data. for this follow the below link to download the appropriate package http://wkhtmltopdf.org/downloads.html
Step Five- Installing the odoo server
Install git so that we can create the clone of Odoo from there. Git is basically a software version control system and is a public place for developers to share the code. It has also been used for documentation and scripts for installing various software including Odoo. The next command will download all the Odoo into the /opt/odoo directory.
git clone https://www.github.com/odoo/odoo --depth1--branch 8.0 --single-branch
You can directly run your odoo server from executed openerp-server file which is in your odoo folder or you can create a configuration file, for this no need to more with the odoo user.
Step Six- Configuring the file
We need to create a script which will be used to start-up and shut-down the server automatically and also run the application as the correct user. There is a script you can use in the /opt/odoo/debian/init but this will need a few small modifications to work with the system installed the way i have described above.
Similar to the configuration file, you need to either copy it or paste the contents of this script to a file in /etc/init.d/ and call it odoo-server. Once it is in the right place you will need to make it executable and owned by root .
sudo chmod 755 /etc/init.d/odoo-server
sudo chown root : /etc/init.d/odoo-server
In the configuration file there's an entry for the server's log file. We need to create that directory first so that the server has somewhere to log and also we should make it approachable by the odoo user through below:
sudo mkdir /var/log/odoo
sudo chown odoo : root /var/log/odoo
Step Seven- Start your server
To start the Odoo server type:
sudo /etc/init.d/odoo-server start
You should now be able to view the logfile and see that the server has started
Just go ahead and enjoy your journey with Odoo, first create your company profile and master data.
If you have any question please feel free to ask .