The objective is to install OpenERP and PostgreSQL on separate machines and configure them so that OpenERP can connect to the PostgreSQL running on the remote machine. We will go step by step
Here are the details of my environment.
PostgreSQL will be installed on fedora running in a virual machine.
OpenERP All-in-One (Server, Client and Web) installed on Windows XP SP2. Host OS.
STEPS on fedora VM
Run fedora VM than download the graphical installer of PostgreSQL from http://www.enterprisedb.com/products/pgdownload.do for version 8.4.4-1.
Install postgresql-8.4.4-1-linux.bin from the terminal. If u get the error that the user is not in the sudoers file than add the user in the sudoers file using the following steps
https://mirnauman.wordpress.com/2010/06/29/user-not-in-sudoers-file-error-in-fedora-solution/
when the installation completes it will give u PgAdminIII a GUI interface to perform all kinds of operation on the PostgreSQL databse. It will also create a default database by the name of “postgres” and a default user by the name of “postgres”. Password for the user “postgres ” will be set during installaion.
Click on Applications , than PosgresSQL 8.4, than PgAdmin III. The GUI will open. Double click on the PostgreSQL 8.4 (localhost) server in the left pane of the GUI. The server will run and will show u Databases,Tablespaces, Group Roles, Login Roles. Click on Databases, it will expand and will show u postgres database.
So far so good, now open the terminal and create another database by the name of testdb.
Open the terminal and write
Su postgres
This will change the user to postgres from ur current user
Createdb testdb
This will create a database named testdb.
Createuser nauman –P
U will be prompted for password. Lets say we keep the password “nauman”
Nauman is the user name for the above created database testdb and –P makes sure that u specify a password for the created user. When the user is also created than open PgAdmin III. U will see that the newly created database test db is created there.
Click on the testdb database to select it.
Click on tools from the main menue and click on Server Configurations. There we will find two file, postgresql.conf and pg_hba.conf. we have to edit both of these files one by one.
Open the postgresql.conf file and put a * in the “listen_addressess” string name. Save and exit. if the value is alteady * for “listen_addressess” than make no changes and exit the file.
Open the second file pg_hba.conf and make the following changes.
Double click on the checkbox that has no value infront of it. Another dialog box appears. Write the following
Enable checked
Type host
Database ALL
User ALL
IP-Address 172.16.0.1 255.255.255.0 (write ur ip range)
Method trust
Click OK and exit the file.
Steps on host OS windows XP SP2
Download the OpenERP All-in-One (Server, Client and Web) for windows from
http://www.openerp.com/downloads.html
Install the OpenERP All-in-one. After installation do the following
Click on All Programes from the start menue. Than click on Openerp Server than click on Edit Config to open the openerp-server.conf file.
This is wat u will find in the file
[options]
without_demo = False
netport = 8070
server_actions_allow_code = False
secure = False
demo = {}
syslog = False
list_db = True
cache_timeout = 100000
port = 8069
reportgz = False
secure_pkey_file = server.pkey
netinterface =
log_level = info
admin_passwd = admin
smtp_port = 25
smtp_server = localhost
db_user = postgres
price_accuracy = 2
login_message = False
import_partial =
soap = False
pidfile = False
db_maxconn = 64
smtp_password = False
xmlrpc = True
db_port = 5432
debug_mode = False
netrpc = True
secure_cert_file = server.cert
interface =
logfile = C:\Program Files\OpenERP AllInOne\\Server\\openerp-server.log
csv_internal_sep = ,
pg_path = C:\Program Files\OpenERP AllInOne\\PostgreSQL\\bin
translate_modules = [‘all’]
stop_after_init = True
root_path = C:\Program Files\OpenERP AllInOne\Server
smtp_user = False
db_password = serg123
db_name = postgres
db_host = 172.16.0.204
assert_exit_level = warn
email_from = False
addons_path = C:\Program Files\OpenERP AllInOne\Server\addons
———————————————————————————————-
the values for the bold items will be edited like
db_user = nauman
give name of our created user
db_port = 5432
port should be kept the same if not changed
db_password = nauman
password for our created user
db_name = testdb
name of our created database
db_host = 172.16.0.204
IP of the machine that is running the PostgreSQL
Save the openerp-server.conf file with the above changes and exit.
now click on All Programmes from the start menue, go to OpenERP Server and click on start service.
Than start the OpenERP Client click on File from the main menue and click on connect.
The database is already selected in the list and cant be changed if the user that we have created is not a super user. Provide the password and click OK.
And that’s it. Our OpenERP is communicating with a PostgreSQL database that is running on a remote machine.
Mission Accomplished.
7 comments
Comments feed for this article
December 23, 2010 at 9:48 am
sjitendra
Thnk You..It’s working…
January 20, 2011 at 1:11 am
kifcaliph
Hi
is it possible to test and configure openerp on one machine ex. windows 7??
January 20, 2011 at 5:17 am
mirnauman
Yes,
if u want everything configured on one machine, the ALLINONE will solve all ur problems.
and yes it can be configured on windows 7
May 30, 2013 at 11:04 am
yonas
does it possible to work on windows 7
June 11, 2013 at 4:31 am
Mir
yes
August 21, 2013 at 10:50 am
openerp | Annotary
[…] mirnauman.wordpress.com […]
September 14, 2013 at 4:15 am
Garrett
I had to redo you Installation instructions as they are out of date. I am stuck though at the Windows Installation as windows is not communication with the virtual machine.My Instructions follow:
////How to Setup openERP on Windows with postgreSQL on a virtual Ubuntu machine.
//Ubuntu Version: Ubuntu 12.04 LTS 64bit
///Virtual Machine Version: 4.2.18-88781-Win
////PostgreSQL Version: 9.1.2
//Windows Version: Windows 7 Pro 64bit SP1
///OpenERP Version: 7.0 latest as of 09/13/2013 20:00
////READ THESE INSTRUCTION VERY CAREFULLY
//Setting up PostgreSQL
# open a Terminal and type the Following
sudo apt-get install postgresql pgadmin3
sudo su postgres # login as postgres user
createuser openerp
=> Answer y to the following question:
# Shall the new role be a superuser? (y/n) y
psql template1
alter role openerp with password ‘postgres’;
# ALTER ROLE
# Enter Ctrl+D to exit
# create database for openerp with owner openerp
createdb -O openerp openerp
exit # to go back to the normal user
//OPEN pgAdmin3
# Add Server (use settings below)
=>Name: “Any name”
=>Host: localhost
=>Port: 5432
=>Service:
=>Maintenance DB: postgres
=>Username: openerp
=>Pass: postgres
//Gain Root Access to Ubuntu & Login under Root
# open terminal, type and press enter
sudo passwd root ##changes root pasword
# Type your password and hit enter(i used ‘notroot’ for this install). You will be prompteed to then type it again, hit enter to confirm before going to the next script
sudo sh -c ‘echo “greeter-show-manual-login=true” >> /etc/lightdm/lightdm.conf’ ##Creates Login for ‘other user’
# Restart Virtual Ubuntu from Shutdown Menu to enable ‘Other User’ login support
# After restart, Login as Root
//OPEN pgAdmin3
# Go to File Open postgresql.conf and select
# Navigate to folder /etc/postgresql/9.1/main and open .conf file
# Double click to Edit “listen_addressess” string and put a ‘*’ (asterick)
# Save and Close
# Go to File Open pg_hba.conf and select
# Navigate to folder /etc/postgresql/9.1/main and open .conf file
# Double click on the checkbox that has no values in front of it and either select or enter the following
=>Type: host
=>Datebase: ALL
=>User: ALL
=>IP Address: 172.16.0.1
=>Method: trust
#Click ok, save and exit configuration window
//LOGOUT of ROOT User and Log Back into regular user
# ReOpen pgAdmin3, reconnect to server and minimize
//Windows 7 64bit OpenERP Installation
# Download the latest all-in-one Windows Instalation of OpenERP from http://nightly.openerp.com/7.0/nightly/exe
# Double click to install
# Go Through the prompts until you get to ‘Select Type of Install”
# Unselect ‘PostgreSQL Datebase’ and click next
# On the next screen you will see the PostgreSQL setting, leave these alone and click next
# Select your Destination Folder. If you are installing on a mapped network drive, please make sure to select your folders accordingly
# After Installation do the Following:
# Go to the location where you installed openERP and then go to folder \Server\server
# Open ‘openerp-server.conf’ with the text editor and edit the Following fields:
=>db_user: openerp #give name of our created user
=>db_port: 5432 #port should be kept the same if not changed
=>db_password: postgres #password for our created user
=>db_name: openerp #name of our created database
=>db_host: #IP of the machine that is running the PostgreSQL