This question has been flagged
6 Replies
20785 Views

Hi all.

I want to test Odoo on my virtual private server. This is a question with my current config. I will then post an answer for how I managed to install and run odoo on this server.

Config:

Debian 7.

Webmin / Virtualmin : this is a web based admin system that eases the creation of domains on your web server, it includes all the config you would desire on a Linux (or other unix based) OS.

my config of choice is the following:

Mail: Dovecot and postfix ~ others are available through webmin, however dovecot is the debian standard, and although postfix is not supplied 'out of the box' it is a well document email server.

Web: Apache ~ I've used apache a lot, I have a reasonable understanding of the config files, however using webmin makes life so much easier.

Database ~ my preference is for MariaDB (a drop in replacemnt for MySQL), however webmin doesn't have a mariaDB option for the moment, so I use MySQL for most uses, and is used by dovecot for the mail user access. Obviously Odoo uses postgreSQL, which has an easy install, and again is supported via the webmin interface. Other database engines are also supported.

I wanted to install Odoo onto a dedicated location on my server, but whenever I navigated to the site

testshop.mySiteName.biz:8069

My browser simply tried to download the install file to my local pc.

 

Avatar
Discard
Best Answer

hi all,

i used these steps if they may work with you or be helpful, for me they are

1- install odoo on your vps

2- brows to http://your-vps-ip:8069 check if it works

3- install virtualmin

4- go to http://your-vps-ip:8069 check again it doesn't work

5- go to webmin/networking/linux firewall as Robert said and enable port 8069 by same steps he wrote

6- check your http://your-vps-ip:8069 and gladly it does work now

for me i need't to connect virtualmin with odoo

thanks

Avatar
Discard
Best Answer

Hello all,

i'm new with odoo and i want to install this on my server. My question is if webmin can work together with odoo or i need to install this on a virtual server.

Thanks

Avatar
Discard

Daniele -

if you are running webmin only, you will have to configure webmin to allow odoo's internal webserver to work in addition to webmin's server.

If you are running virtualmin running in addition to webmin (the configuration I am running) my post of 7/16/16 has the installation instructions for that type of configuration.

In either case you can do the installation on either a physical server or a virtual server.

Best Answer

I had a similar problem / question.  Here's a summary of what I did to get the two to work on the same machine.

This process assumes a *nix computer with root access.

In the description that follows, "yourdomain.tld" refers to your real public domain,
and "odoo9a.example.com" means "odoo9a.example.com"

  1. Set up your server
    (Ignore this if Virtualmin already installed)

    1. Install OS

    2. Run OS Updates

    3. Install Virtualmin

    4. Note the version of PostgreSQL installed

  2. Create Odoo account

    1. Virtualmin > Create Virtual Server

    2. Name server odoo9a.example.com

      1. "9a" is for version "9", installation "a"
        if attempt "a" has a problem, retry using "b"

      2. "example.com" means "example.com" (not "yourdomain.tld")

    3. Enabled features

      1. setup DNS Zone

      2. Create PostgreSQL database

      3. that's it.  (note the absence of a web server)

  3. Configure account directories for Odoo

    1. cd /home/odoo9a
      mkdir bin.odoo
      mkdir opt
      mkdir etc
      mkdir etc/init.d
  4. Get an Odoo installation script
    I used

    git clone https://github.com/aschenkels-ictstudio/odoo-install-scripts


  5. Modify installation script
    Andre's script is good for installing Odoo on a bare OS server
    it needs modification for installing with Virtualmin

    1. Change the value of the following variables

      OE_USER=odoo9a
      OE_HOME="/home/${OE_USER}/opt/${OE_USER}"
      OE_HOME_EXT="/home/$OE_USER/opt/${OE_USER}/${OE_USER}-server"
    2. Add the following variable

      OE_DIR_ETC="/home/${OE_USER}/etc"


    3. Comment out the following sections of the script

      1. PostgrSQL x.y Settings

      2. Creating the ODOO PostgreSQL User

      3. Creating the ODOO system user

    4. In the section "Configure ODOO"
      change all references
      from " /etc"
      to " /${OE_DIR_ETC}"
      (note the space before the "/")

  6. (optional) create a wrapper script
    I did this to create a log file of the installation to review after the script finishes

    #!/bin/bash 
    #
    # set bash option to show commands being run
    set +x
    #
    # run install script
    sudo bash ./odoo9-install.sh 2>&1 | tee `pwd`/odoo9-install.log
    #
    # done


  7. Run Odoo installation script (either optional wrapper script or main script)

  8. Create symlinks in /etc and /etc/init.d to point to scripts in "/home/odoo9a/etc"

    cd /etc
    ln -s /home/odoo9a/etc/init.d/odoo9a-server /etc/init.d/odoo9a-server
    ln -s /home/odoo9a/etc/odoo9a-server.conf /etc/odoo9a-server.conf


  9. Using Virtualmin, open port 8069

    1. Webmin > Networking > Linux Firewall

      Add Rule

      Rule Comment: Odoo Port

      Action to Take: Accept

      Destination TCP or UDP Port: 8069

      Create

  10. Create a website in your domain to run Odoo

    1. Virtualmin > Create Virtual Server

      Domain Name: odoo9a.yourdomain.com

      Uncheck everything

      Check "Setup website for domain"

      Check "Setup SSL website too"

      Create Server

    2. Virtualmin > Server Configuration > Edit Proxy Website

      Proxying enabled? Yes

      Proxy to URL: http://odoo9a.example.com:8069

  11. Access website from an external machine's browser

    http://odoo9a.yourdomain.com:8069


After this, you can use Virtualmin to back up the Odoo code and database(s) and optionally easily migrate the Virtualmin backup to different hardware.

(The directory "bin.odoo" is a place to put your odoo related scripts.  An example would be a script to do the symlinks to /etc.)

I'll also document this on github.com, user rgeleta, project odoo9-virtualmin (https://github.com/rgeleta/odoo9-virtualmin) (hopefully with better outline numbering), and have an issue queue for any problems I (or anyone else) may identify.

Hope this helps



Avatar
Discard
Author Best Answer

Hi all.

So I finaly managed to install Odoo onto my server. Here below I will create a step through of what I had to do.

If however you are in a hurry. From the vrtualmin section for your virtual server

From the vrtualmin section for your virtual server

Open the 'server configuration' menu item, and down at the bottom you will find webite options. Select this and you get the option for the server.

The second option here is how to run php scripts, you need to select the button that will have them run as the apache user (or whatever web server you have decided to use).

So the long version :

 

Please add comments if you find anything confusing, and I will expand my answer. I assume that you have some knowledge of the various installed systems, and are potentially comfortable with using the command line to access your server directly. This demonstrates a 'power user' but as I say, if you have any questions, please post in the comments.

So you need to navigate to your install of Webmin, which is available at the following address

https:/yourServerName:10000/             you need to change 'yourServerName' to the name of your server or it's IP address.

When you first log into the page you will be presented with a menu (on the left) and a the main body presenting details of your server (available from the System Information link at the bottom of the menu.

First job is to create a new virtual server that corresponds to your website name. You registrar should give you access to an admin panel, where you can point this website address name to your server's IP address, remember to also include things such as mail.yourSiteName.com, ftp.youSiteName.com etc, this will enable you to get mail / ftp access etc into your server.

From the webmin front page, at the very top there is an option 'virtualmin' select this to get the option for virtual server setup.

The first link in the new menu is 'create virtual server' select this to be presented with the virtual server creation page.

Enter the details of the server into the form, most of this section you can leave as the default, however in the section below that is titled 'enabled features' you may decide you want ssl and ftp available for the site.

SSL is definately a requirement if you inted to have online purchasing, and to enable your customers to create user logins to your site so as they can follow their orders etc. Depending on your requirement you may or may not decide to include the other options, you should investigate what they mean and if you required simple search for the items in google. Or on the appropriate webmin / VirtualMin documentation pages.

When webmin creates a virtual server you can tell it where you want the fiiles to be located. I strongle recomend created a 'user' on your system that is used for this purpose. Create this user as the baes of your system.

Note: I recomend that you use the name of your site without the .com or .co.uk part, this will ease things later on, and you will then create 'server aliases' with the required top level domain, and they can all point to the same files on your system. when creating the server simply select the location for the files to not include the .com part of the address. Webmin will do all the rest, creating the user and user space and files that are required.

Everything should now be functioning, if you where to install a web creation tool such as joomla or drupal things will work exactly as expected (don't ask me why Odoo expects this to be different!)

There is only a single thing that needs to be done to enable the various required scripts to run as they should.

Once you have created your server you will need to enable php scripts to be run from the web server (in my case apache) rather then from the virtual server owner.

Open the 'server configuration' menu item, and down at the bottom you will find webite options. Select this and you get the option for the server.

The second option here is how to run php scripts, you need to select the button that will have them run as the apache user (or whatever web server you have decided to use).

You should now be good to run the install scripts.

once I get my 'personal site' online I will create a better set of instructions for using webmin.

David

Avatar
Discard