Step 1. Log as root user and update system
Open Terminal
Window
2. Enter below
command for root access, and after
entering it ask for root password.
sudo
/bin/bash
[sudo] password for user : (Enter your root password)
3. Now make
sure your server has all the latest versions & patches by
doing an update:
sudo apt-get update
Now we’re ready to start the Odoo install.
Step 2. Create the Odoo user that will own and run the application
- Create odoo user and installation directory by below command
sudo adduser --system
--home=/opt/odoo --group odoo
/opt/odoo, this is where the OpenERP
server code will reside and is created automatically by the command above
Now we check odoo user
by below command
sudo su - odoo -s /bin/bash
When
you have done what you need you can leave the odoo user’s shell by typing below
command and back to root shell.
Exit
Step 3. Install and configure the database server, PostgreSQL
- Install Postgresql by below command
sudo apt-get install postgresql
- For configure the Odoo user on postgres, We require postgres shell by below command
sudo su - postgres
- Now create a new database user. This is so Odoo has access rights to connect to PostgreSQL and to create and drop databases.
[Remember what your choice of password is
here; you will need it later on]
createuser --createdb --username
postgres --no-createrole --no-superuser --pwprompt odooEnter password for new role: ********Enter it
again: ********- Finally exit from the postgres user account by below command and return to root shell.
Exit
Step 4. Install the necessary Python libraries for the server
1. Give below command one by one to install
python libraries
sudo apt-get install python-cups
python-dateutil python-decorator python-docutils python-feedparser
sudo apt-get install python-gdata
python-geoip python-gevent python-imaging python-jinja2 python-ldap
python-libxslt1
sudo apt-get install python-lxml
python-mako python-mock python-openid python-passlib python-psutil
python-psycopg2
sudo apt-get install python-pybabel
python-pychart python-pydot python-pyparsing python-pypdf python-reportlab
python-requests
sudo apt-get install
python-simplejson python-tz python-unicodecsv python-unittest2 python-vatnumber
python-vobject
sudo apt-get install python-werkzeug
python-xlwt python-yaml wkhtmltopdf
Step 5. Install the Odoo server from git
1. First we require to install Git by below command
sudo apt-get install git
2. Now For clone odoo from git we require Odoo shell access so we
switch to odoo user by below command.
sudo su - odoo -s /bin/bash
3.
Now Grab a copy of the most current Odoo 8 branch
[Note the “.” at the end of this
command!]
git clone
https://www.github.com/odoo/odoo --depth 1 --branch 8.0 --single-branch .
(This might take a little while depending on
the speed of your Internet connection.)
4.
Once
it’s finished exit from the odoo user by below command and return to root
shell.
Exit
Step 6. Configure the Openerp application.
- The default configuration file for the server (/opt/odoo/debian/openerp-server.conf) is actually very minimal and will, with only a small change work fine so we’ll copy that file to where we need it and change its ownership and permissions:
sudo cp /opt/odoo/debian/openerp-server.conf
/etc/odoo-server.confsudo
chown odoo: /etc/odoo-server.confsudo
chmod 640 /etc/odoo-server.conf
The
above commands make the file owned and writeable only by the odoo user and
group and only readable by odoo and root.
- To allow the odoo server to run initially, you should only need to change two lines in this file. Toward to the top of the file change the line
(For Edit
configuration File use sudo nano /etc/odoo-server.conf)
db_password
= False (Replace False with the same password you
used back in step 3) addons_path
= /usr/lib/python2.7/dist-packages/openerp/addons replace this with addons_path
= /opt/odoo/addons instead.
One other line we have to add in the
configuration file at last.
logfile = /var/log/odoo/odoo-server.log
(Save Configuration File by Ctrl + X and it ask for save then Press Y and Enter)
- Now we can start odoo server using odoo user
Change root shell to odoo shell by below
commandsudo su - odoo -s
/bin/bashstart odoo server/opt/odoo/openerp-server
If you end up with a few lines
eventually saying OpenERP then you are all set.
If
there are errors, you’ll need to go back and find out where the problem is.
- Now enter
CTL+Cto stop the server and thenexit
Step 7. Installing the boot script
1.
Now
get script file from here and put it in /etc/init.d/ folder.
2.
Change
permission and ownership of script file by below command.
sudo chmod 755 /etc/init.d/odoo-serversudo chown root: /etc/init.d/odoo-server
3.
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 to and also we must make it writeable by the
openerp user:
sudo mkdir /var/log/odoosudo chown odoo:root /var/log/odooStep 8. Testing Odoo Server
1.
To start the Odoo server type:
sudo /etc/init.d/odoo-server start
or
service odoo-server start
2.
We
can check odoo server log by below command
tail
/var/log/odoo/odoo-server.log
If there
are any problems starting the server you need to go back and check. There’s
really no point ploughing on if the server doesn’t start…
Odoo 8 New
Database
If the log
file looks OK, now point your web browser at the domain or IP address of your
Odoo server (or localhost if you are on the same machine) and use port 8069.
The url will look something like this:
http://IP_or_domain.com:8069

No comments:
Post a Comment