How to install Odoo/Openerp in Kali (Debian)


After clean install
– update and upgrade system

Add user ‘openerp’ and such that it belongs to group’openerp’
–sudo adduser –system –home=/opt/openerp –group openerp.
-sudo su – openerp -s /bin/bash

login in back as root create passwd and add user to sudo
create password for user ‘openerp’as root
-passwd openerp

Add openerp to sudo group
usermod -a -G sudo openerp

Install postgresql
-sudo apt-get install postgresql
-sudo apt-get install pgadmin3
then start service:
– sudo service postgresql start
then log in postgre
-sudo su postgres e.g openerp@openerp-desktop:/$ sudo su postgres
then create user openerp
-createuser openerp
(y for super user)
view table created
-psql -l
select template and add rights
-psql template1
-template1=# alter role openerp with password ‘postgres’;
ALTER ROLE
then exit (Ctrl+D)

Installation of Odoo

METHOD1

log on as root
(-adding the download URL (address) to the aptitude repository sources as root)

-echo “deb http://nightly.odoo.com/7.0/nightly/deb/ ./” >> /etc/apt/sources.list
then update system
-apt-get update
(Note: The OpenERP package itself is not signed, and a cryptographic key is not provided. Therefore, aptitude will warn you that it can not be authenticated, requesting you to install it without verification)
then install openerp

logon back as openerp
-sudo mkdir /var/lib/openerp
-apt-get install openerp
confirm dependancies and without verification
then start apache2
-service apache2 start

Add the following line to the openerp-server.conf/odoo-server.conf file:
logfile = /var/log/openerp/openerp-server.log/(logfile = /var/log/odoo/odoo-server.log)
-vi /etc/openerp/openerp-server.conf

then make the log file
-sudo mkdir /var/log/openerp OR (odoo) depending

Add permissions
add permissions to user ‘openerp’ to the openerp-server configuration file
-sudo chown openerp: /etc/openerp/openerp-server.conf
sudo chmod 640 /etc/openerp/openerp-server.conf

add permissions to openerp,assuming the openerp server is running under user’openerp’,to install addons
-chmod 775 /usr/lib/python2.7/dist-packages/openerp/addons/
-chown root.openerp /usr/lib/python2.7/dist-packages/openerp/addons/

-To start the Odoo server type:
sudo /etc/init.d/openerp start
or
sudo service openerp start

METHOD2:
Download the latest file
-wget http://nightly.odoo.com/7.0/nightly/deb/openerp_7.0.latest_all.deb
Install OpenERP server.
-sudo dpkg -i openerp_6.1-1-1_all.deb
-sudo apt-get install openerp -f
reboot and start server

START APPLICATION BY:
Access the Web Client using http://ip:8069
in case of this error:DataError: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII
do the following:
sudo -u postgres psql postgres
update pg_database set datallowconn = TRUE where datname = ‘template0’;
\c template0
update pg_database set datistemplate = FALSE where datname = ‘template1’;
drop database template1;
create database template1 with template = template0 encoding = ‘UTF8’;
update pg_database set datistemplate = TRUE where datname = ‘template1’;
\c template1
update pg_database set datallowconn = FALSE where datname = ‘template0’;
(press Ctrl-D to quit from psql)
restart odoo and try again.

login
USN:admin
pwd:123