PKS ks
PKS ks

Reputation: 116

How to Install Odoo in different port with different database?

anyone knows that how to install odoo in different ports with different database in a single system(Ubuntu 14.04)?

Upvotes: 1

Views: 7957

Answers (5)

Avani Somaiya
Avani Somaiya

Reputation: 348

First,you have to create configuration file for first odoo addons.Like this:

     [options]
    addons_path= first addons path , odoo/addons path , your latest module path
    db_port = 5432
    db_user = odoo_v11
    db_password = odoo
    logrotate = True
    longpolling_port = 9072
    xmlrpc_port = 8079

then , start your server with following command :

   /home/workspace/odoo_v11/odoo_v11/odoo-bin -c /home/workspace/odoo_v11/odoo_v11/odoo.conf

And then , create new database with your choosen name and work with their.

Then , create another configuration file for different addons like above with different xmlRpc port and start that odoo service like above.

Then , again create new database and work with their with installing your latest module.

So that , you will work with different port and different database also.

Upvotes: 1

Shubhada
Shubhada

Reputation: 1

1.Run command as below to create new postgres user.

createuser --createdb --username postgres --no-createrole --no-superuser –pwprompt 

2.Make two system users and set password

sudo adduser newuser

sudo usermod -aG sudo 

{ Note: The user must log off, then back on again for this change to take effect.}

3.Change the config file for,

db_password = new_odoo_user_pwd

db_user = your_new_odoo_user

longpolling_port = 8074 (you can use here the port which you want)

xmlrpc_port = 8072 (you can use here the port which you want)

xmlrpcs_port = 8073 (you can use here the port which you want)

4.Log in to second server

sudo su “new_user_name”

Now run your odoo.

I am sure if u try this u will surely crack it.

Visit www.supersimplesoft.com for more.

Upvotes: 0

Sagar Pise
Sagar Pise

Reputation: 887

If you have only one odoo instance then create two database role suppose user1 and user1 and create two configuration file odoo1.conf and odoo2.conf with different port 8069 and 8079 set newly created user as db_user

Now you can run ./opeerp-server -c with configuration file name

Upvotes: 1

forvas
forvas

Reputation: 10189

You can create two instances of Odoo using different ports, creating two config files and two PostgreSQL users.

Go to PostgreSQL: on Linux, open a terminal window, write sudo su, introduce your root password. Then write su postgres, and then, write psql. Now you'll be on PostgreSQL terminal. Write \du and you'll see your PostgreSQL users. One of them will be the user which your Odoo is using to create, alter and remove databases. Now you need to create another user. You can do it this way:

CREATE USER your_new_odoo_user WITH PASSWORD 'new_odoo_user_pwd' CREATEDB LOGIN REPLICATION

Now, find the current config file of your Odoo (it should be inside the Odoo folder, but anyone saves it where they want). If you don't have one, create a new file .cfg (Check this: https://www.odoo.com/documentation/8.0/reference/cmdline.html) Copy it and modify the next parameters:

db_password = new_odoo_user_pwd
db_user = your_new_odoo_user
longpolling_port = 8074 (you can use here the port which wou want)
xmlrpc_port = 8072 (you can use here the port which wou want)
xmlrpcs_port = 8073 (you can use here the port which wou want)

Then execute both instances (if you are using services, you must create a new service for the new instance, as @ChesuCR told you in his answer).

And this way you will be able to connect to the port 8069 (or whatever you chose) and see only the databases you've created there, and then you also will be able to connect to the port 8072 (again, or whatever you chose) and see only the databases you've created at this port.

Upvotes: 2

ChesuCR
ChesuCR

Reputation: 9640

You can duplicate the Odoo service to assign it to a second configuration file with a different port.

If you want to see only a specific database you can add a new user to postgres as well and write its credentials in each configuration file

Upvotes: 2

Related Questions