Sunteți pe pagina 1din 14

Bitnami Odoo

For security reasons the master password is randomly generated


during the installation of the application. You will learn how to get
this password in this section.

1. How to start/stop the servers?


1.1. Graphical Tool
1.2. Command-line Tool
2. What is the default configuration?
2.1. Odoo Configuration File
2.2. Odoo Servers
2.3. Odoo log
3. How to configure the email settings of Odoo?
4. How to find the master password of Odoo?
5. How to install a plugin on Odoo
5.1. How to install Live Chat module
6. How to add new databases?
7. How to enable SSL?
8. How to upgrade Bitnami Odoo Stack?
8.1. How to upgrade Odoo and all Stack components
(recommended)?
8.2. How to upgrade only Odoo in the Bitnami Odoo stack?
8.3. How to migrate your data to the new Odoo installation?
9. How to debug Odoo errors?
10. How to configure the Odoo timezone?
11. How to install Odoo Report Designer and configure LibreOffice?
12. How to install Wkhtmltopdf?

Odoo is an ERP and CRM system that helps connect business


processes for sales, finance, supply chain and project management.
Primary capabilities include accounting (analytic and financial),
production management (MRP), stock management, sales and
purchases management, task automation, marketing campaigns, help
desk and POS.

Please, take a look to the Quick Start Guide to know the basic use of
this Stack.
How to start/stop the servers?

Cloud Server

Each Bitnami stack includes a control script that lets you easily stop,
start and restart servers.

The script is located at /opt/bitnami/ctlscript.sh. Call it without any


arguments to restart all services:

$ sudo /opt/bitnami/ctlscript.sh start

Or use it to restart a specific service only by passing the service name


as argument - for example 'mysql':

$ sudo /opt/bitnami/ctlscript.sh restart mysql

Virtual Machine

Each Bitnami stack includes a control script that lets you easily stop,
start and restart servers.

The script is located at /opt/bitnami/ctlscript.sh. Call it without any


arguments to restart all services:

$ sudo /opt/bitnami/ctlscript.sh start

Or use it to restart a specific service only by passing the service name


as argument - for example 'mysql':

$ sudo /opt/bitnami/ctlscript.sh restart mysql

Native Installer

You can use either the graphical manager tool or the command-line
tool to start and stop the servers.

Graphical Tool

Bitnami stacks include a graphical tool to manage the servers easily


(native installers only). Using this tool, you can start, stop and restart
the servers and check the log files.
manager-servers.png

On Windows:

Double-click the "manager-windows.exe" file in your installation


directory.
You can also start the Manager tool using the Start Menu path
Start -> Program Files -> Bitnami Stack -> Manager.

On Linux and Mac OS X:

Double-click the "manager-osx" or "manager-linux-*" tool in


your installation directory.

Command-line Tool

Each Bitnami stack includes a control script that lets you easily stop,
start and restart servers.

The control script is only available for Linux and Mac OS X native
installers. The script is located in your installation directory and
named ctlscript.sh. Call it without any arguments to restart all
services.
On Linux:
If your installation directory is /home/USER/wordpress-4.0.1-0, call
the control script with the start argument to start all servers. For
example:

$ cd /home/USER/wordpress-4.0.1-0
$ ./ctlscript.sh start

Or use it to restart a specific service only by passing the service name


as argument - for example 'mysql':

$ cd /home/USER/wordpress-4.0.1-0
$ ./ctlscript.sh restart mysql

On Mac OS X:
If your installation directory is /Applications/wordpress-4.0.1-0, call
the control script with the start argument to start all servers. For
example:

$ cd /Applications/wordpress-4.0.1-0
$ ./ctlscript.sh start

Or use it to restart a specific service only by passing the service name


as argument - for example 'mysql':

$ cd /Applications/wordpress-4.0.1-0
$ ./ctlscript.sh restart mysql

Tabs end

What is the default configuration?

The default Bitnami installation includes all the dependencies


necessary for Odoo to work. A new database will be created during
the installation process. You will be able to find the Odoo package also
installed in the following path

Linux and OSX systems

installdir/apps/odoo/lib/openerp-version.egg

Windows

installdir/apps/odoo/lib/site-packages/openerp-version.egg
Odoo Configuration File

The Odoo server configuration file can be located in the following


path

installdir/apps/odoo/conf/openerp-server.conf

Odoo Servers

By default you will find two Odoo servers running:

- openerp_no_multi_process, which controls the scheduled actions

- openerp_gevent, which handles the Instant Message connections. Its


port can be found in the Odoo configuration file, longpolling_port.

Odoo log

You can find the odoo logs under the following directory

installdir/apps/odoo/log

How to configure the email settings of Odoo?

It is possible to configure Odoo application to send emails. You have


to install any Odoo module first, if not you can not configure the email
settings. Then go to "Settings" -> "General settings" -> "Configure
outgoing email server"

The settings below configure Odoo mail server to send emails through
a GMail account:

SMTP Host: smtp.gmail.com


SMTP Port: 587
SMTP Protocol: TLS
SMTP user: your_gmail_account@gmail.com
SMTP password: your_gmail_password

How to find the master password of Odoo?

For security reasons the master password is randomly generated


during the installation of the application, you will use it if you want to
manage the databases (create, drop, backup, ... ) using the
application. You will find this line at /opt/bitnami/apps/odoo/conf/
openerp-server.conf

admin_passwd = random_password

If you want to set another password, you have to change that line and
set the password that you want. After that, you have to restart your
server.

sudo /opt/bitnami/ctlscript.sh restart apache

How to install a plugin on Odoo

You can install modules and addons from the admin panel of the
application. If you want to install an addon manually take into account
it is necessary to change the permissions.

To do so, go to Settings->Users, select the Administrator user and


click Edit. There, go to Access Rights and make Technical Features checkbox
True. After that, re-login into the webclient and you will see all menus
at the left sidebar. The Update Modules List option will be available.

Once you download and decompress the addon into the "addons"
folder "/opt/bitnami/apps/openerp/lib/openerp-*/openerp/addons/",
change the permissions to the addons directory with the following
command:

sudo chown -R daemon:daemon /opt/bitnami/apps/odoo/lib/odoo-*/openerp/add

You should not need to do any modification on Windows, but in case


you want to check your addons directory, the path is

installdir\apps\odoo\Lib\site-packages\odoo-*\openerp\addons\

Then restart the Apache server:

sudo /opt/bitnami/ctlscript.sh restart apache

How to install Live Chat module

In the admin panel click on "Settings" > "Local modules" and click on
install Live Chat. If you want to have the chat button on the Odoo
website you need to install "Website Builder" and "Website Live
Support" modules too.
Once you have those modules installed, you need to edit the Apache
configuration file located at /opt/bitnami/apps/odoo/conf/httpd-
app.conf and append the following to the end of the file:

ProxyPass /openerp.wsgi/longpolling/poll http://localhost:8072/longpollin


ProxyPass /openerp.wsgi/longpolling/poll/ http://localhost:8072/longpolli
ProxyPassReverse /openerp.wsgi/longpolling/poll/ http://localhost:8072/lo

Finally restart the Apache server.

How to add new databases?

Odoo include a built-in feature to add new databases from the


"Manage databases" section.

In order to enable the Odoo scheduler any another database different


from the default one (bitnami_openerp) you have to add the new
database in the file /opt/bitnami/apps/openerp/conf/openerp-
server.conf like follows:

db_name = bitnami_openerp, newdatabase

After doing so, please restart the service


openerp_background_worker:

/opt/bitnami/ctlscript.sh restart openerp_background_worker

On Windows, you can use the manager to restart the


openerp_background_worker service.

How to enable SSL?

You can see how to configure Apache to enable SSL connections at


How to enable SSL to access through https?

How to upgrade Bitnami Odoo Stack?

It is strongly recommended that you create a backup before starting


the update process. If you have important data, it is advisable that you
create and try to restore a backup to ensure that everything works
properly.
How to upgrade Odoo and all Stack components (recommended)?

Go to your Odoo installation and instead of login click on "Manage


Databases". From this web inferface create a backup of the
bitnami_openerp database. Now you can stop this installation.

Install a new version of Bitnami Odoo (or deploy a new server). From
the "Manage Databases" interface restore the bitnami_openerp
database. Now access your machine and stop all the servers except
PostgreSQL. Skip the next section and continue wit the steps
explained in the "How to Migrate your data to the new Odoo
installation" section (below).

How to upgrade only Odoo in the Bitnami Odoo stack?

If you already migrated your data to a new server you can skip this
section. In case you only want to upgrade the application code
without modifying any other Stack components, you can follow the
steps. Please note that we don't recomend this approach because new
Odoo version may have new dependencies not included in your base
stack.

In the example we use /opt/bitnami as the installation directory and


the installation was done as the root user. This is the case in the
virtual appliances and the cloud images. However if you deployed
Odoo using the Bitnami native installer, please use your installation
directory instead.

# Download the latest Odoo version


cd /tmp/
wget http://nightly.openerp.com/8.0/nightly/src/odoo_8.0.latest.tar.gz

tar zxvf odoo_8.0.latest.tar.gz


cd odoo-8.0-<nightlyversion>
sudo python setup.py install --prefix=/opt/bitnami/apps/odoo --install-li
sudo chown -R daemon.daemon /opt/bitnami/apps/odoo/lib

Now you have to change the following line

#!/opt/bitnami/python/bin/.python2.7.bin

to

#!/opt/bitnami/python/bin/python
in the /opt/bitnami/apps/odoo/bin/openerp-server and /opt/
bitnami/apps/odoo/bin/openerp-gevent files.

Finally you should update your configuration to point to this version of


Odoo. For this edit the /opt/bitnami/apps/odoo/conf/openerp-
server.conf file and replace the addons path to point to the new
Odoo version.

How to migrate your data to the new Odoo installation?

Once your Odoo installation have been updated you need to follow the
steps below so your data are loaded in the new installation.

In the example we use /opt/bitnami as the installation directory and


the installation was done as the root user. This is the case in the
virtual appliances and the cloud images. However if you deployed
Odoo using the Bitnami native installer, please use your installation
directory instead.

# In recent virtual appliances and cloud images you will need to stop mon
sudo monit quit

# Stop the services


sudo /opt/bitnami/ctlscript.sh stop
sudo /opt/bitnami/ctlscript.sh start postgresql

Now start Odoo server with the following parameters:

sudo su daemon -c "/opt/bitnami/python/bin/python /opt/bitnami/apps/odoo/

Wait until the server is completely started and the modules updated.
Please be patient. You can check the start up status in the Odoo log
file:

sudo tail -f /opt/bitnami/apps/odoo/log/openerp-server.log

The upgrade process is finished when the message "INFO


bitnami_openerp openerp.service: Hit CTRL-C again or send a second
signal to force the shutdown" or "Odoo waiting for connections"
appear in the log file. Now you can start all the servers:

sudo /opt/bitnami/ctlscript.sh start

Notice that when you are importing the data you are also importing the
Odoo users, including the admin user and its password.
How to debug Odoo errors?

Odoo stores log messages here /opt/bitnami/apps/odoo/log/openerp-


server.log

Also, see below services specific debug information:

Cloud Server

Once Apache starts, it will create two log files at /opt/bitnami/


apache2/logs/access_log and /opt/bitnami/apache2/logs/error_log
respectively. On Amazon Linux and Red Hat Enterprise cloud images,
the log files are created at /var/log/httpd/access_log and /var/log/
httpd/error_log instead.

The access_log file is used to track client requests. When a


client requests a document from the server, Apache records
several parameters associated with the request in this file, such
as: the IP address of the client, the document requested, the
HTTP status code, and the current time.
The error_log file is used to record important events. This file
includes error messages, startup messages, and any other
significant events in the life cycle of the server. This is the first
place to look when you run into a problem when using Apache.
If no error is found, you will see a message similar to:

Syntax OK
/installdir/ctlscript.sh : httpd started

Virtual Machine

Once Apache starts, it will create two log files at /opt/bitnami/


apache2/logs/access_log and /opt/bitnami/apache2/logs/error_log
respectively.

The access_log file is used to track client requests. When a


client requests a document from the server, Apache records
several parameters associated with the request in this file, such
as: the IP address of the client, the document requested, the
HTTP status code, and the current time.
The error_log file is used to record important events. This file
includes error messages, startup messages, and any other
significant events in the life cycle of the server. This is the first
place to look when you run into a problem when using Apache.
If no error is found, you will see a message similar to:
Syntax OK
/installdir/ctlscript.sh : httpd started

Native Installer

Once Apache starts, it will create two log files at installdir/apache2/


logs/access_log and installdir/apache2/logs/error_log respectively.

The access_log file is used to track client requests. When a


client requests a document from the server, Apache records
several parameters associated with the request in this file, such
as: the IP address of the client, the document requested, the
HTTP status code, and the current time.
The error_log file is used to record important events. This file
includes error messages, startup messages, and any other
significant events in the life cycle of the server. This is the first
place to look when you run into a problem when using Apache.
If no error is found, you will see a message similar to:

Syntax OK
/installdir/ctlscript.sh : httpd started

Cloud Server

The main MySQL log file is created at /opt/bitnami/mysql/data/


mysqld.log.

Virtual Machine

The main MySQL log file is created at /opt/bitnami/mysql/data/


mysqld.log.

Native Installer

The main MySQL log file is created at installdir/mysql/data/


mysqld.log.

How to configure the Odoo timezone?

The Odoo server is forced to be UTC. The rendering of datetime


values in the user's timezone is meant to be done on the client-side
exclusively. You can configure the timezone per user in the User's
Settings panel.
openerp-prefs.png

How to install Odoo Report Designer and configure


LibreOffice?

You can install the Report Designer module from the Odoo admin
panel. Go to "Settings" -> "Apps" and disable the "featured" apps from
the search button. Then search the "OpenOffice Report Designer"
module and install it.

Once you have installed it, go to "Reporting" -> "Report Designer"

report-designer.png

Download the zip file and install in your LibreOffice installation (or
OpenOffice) following the Installation and Configuration steps.

By defaul, XML-RPC is enabled for your Odoo server. If not, you can
enabled it manually. To do so, you have to edit installdir/apps/
openerp/scripts/openerp.wsgi and add the following line:

conf['xmlrpc'] = True

Afterwards, Apache server has to be restarted:


installdir/ctlscript.sh restart apache

To configure your LibreOffice plugin, you should specify the following


settings:

Server: application_domain
Port: 80
Protocol Connection: XML-RPC
Database: bitnami_openerp
User: your_application_user
Password: your_application_password

How to install Wkhtmltopdf?

Whktmlopdf is necessary for some Odoo functionalities. In order to


install it on your system follow the steps described below.

First you should download the proper package for your Linux
distribution from the project page and install it. Please note that the
instruccions may differ depending on your operating system.

Ubuntu 14.04 64-bit:

wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_lin
sudo apt-get install libjpeg8 libpng12-0 xfonts-base xfonts-scalable
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb

Debian Wheezy (Google Cloud instances):

wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_lin
sudo apt-get install libjpeg8 libpng12-0 xfonts-base xfonts-scalable
sudo dpkg -i wkhtmltox-0.12.1_linux-wheezy-amd64.deb

Debian Jessie (DigitalOcean instances):

wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_lin
sudo apt-get install libjpeg8 libpng12-0 xfonts-base xfonts-scalable
sudo dpkg -i wkhtmltox-0.12.2_linux-jessie-amd64.deb

Then copy the binaries to a your /usr/bin directory:

sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/


sudo cp /usr/local/bin/wkhtmltoimage /usr/bin/
As final step, restart Apache server:

sudo /opt/bitnami/ctlscript.sh restart apache

If you experiment issues with resolution, it could be related


to xfonts-75dpi or xfonts-100dpi packages. You can uninstall them
executing:

sudo dpkg --remove --force-depends xfonts-75dpi


sudo dpkg --remove --force-depends xfonts-100dpi

S-ar putea să vă placă și