Thursday, February 19, 2015

Odoo v8 installation on remote ubuntu server


Open terminal and type:

- ssh machine_name@ip
Update Ubuntu Machine:
- sudo apt-get update
If some problem in update like-
- Internet connection issue
- Some index files failed to download. They have been ignored, or old ones used instead.

then type sudo nano /etc/resolv.conf
and type following line nameserver 127.0.1.1
- sudo apt-get update

- If there are some missing or incomplete installation then type

sudo apt-get install -f 

PostgreSQL Server Installation and Configuration:

- sudo apt-get install postgresql
- login to postgres user type sudo su postgres
- Create new role named “odoo” which is super user
createuser -s -d -r -s -W odoo ; ↲ type password as “odoo

Install the necessary Python libraries for the server:
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 wkhtmltopdf 

Install the Odoo server:
  i)Install from git:
       Install git package.
       sudo apt-get install git
       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 . 
                         OR
  ii) Downloading the OpenERP Server:
                         OR
  iii)  Download nightly version type 
sudo wgethttp://nightly.openerp.com/8.0/nightly/src/odoo_8.0-latest.tar.gz
- Copy it to “opt” folder type
sudo cp odoo_8.0-latest.tar.gz /opt/
sudo tar -xvzf odoo_8.0-latest.tar.gz
- Rename the extracted folder to "odoo"
sudo mv openerp-8.0-1b53469 odoo
- And finally hit setup installation command
cd /opt/odoo
sudo python setup.py install

Creating a configuration file for OpenERP Server:
- You can start the OpenERP server with the -s option to create a configuration file with default options, then modify it. For configuration file type ./openerp-server -s 
- The default OpenERP configuration file is located in $HOME/.openerp_serverrc, that is a file named .openerp_serverrc in the home directory of the system user under which OpenERP runs. This is the default value for the -c startup parameter.
- Copy .openerp_serverrc to opt folder sudo cp /home/sagar/.openerp_serverrc /etc/
- Rename it to odoo_service sudo mv /etc/.openerp_serverrc /etc/odoo-server 
- Set access right sudo chmod 640 /etc/odoo-server 
- You can configure server setting type sudo nano /etc/odoo-server 
- And Chne some parameter like
db_host = localhost
db_user = odoo
db_password = odoo
logfile = /var/log/odoo/odoo-server.log # or None
xmlrpc_port = 8069 # Port where yotr server start
netrpc_port = 8080
-To save log details you can create folder and log file into log folder cd /var/log
Create folder “odoo” sudo mkdir odoo
Create logfile sudo nano /var/log/odoo/odoo-server.log

Create boot script:
-
Boot script is used to start-up and shut down the server automatically
- Copy code from link and type command sudo nano /etc/init.d/odoo-server and paste
Changes in some places like
# Specify the user name (Default: odoo).
USER=sagar(name of ubuntu user)
DAEMON=/opt/odoo/openerp-server #(path of odoo server)
- Set access right sudo chmod 755 /etc/init.d/odoo-server 
- sudo chown root: /etc/init.d/odoo-server

Start Server:
sudo /etc/init.d/odoo-server start
                   OR
sudo service odoo-server start

Automating Odoo start-up and shutdown :
- Create script that start and stop automatically with the Ubuntu Server, to do that type
sudo update-rc.d odoo-server defaults



No comments:

Post a Comment