- 1 Introduction
- 2 Before Installing Open ERP
- 3 Installing Open ERP from AUR
- 4 use gunicorn to run openerp in multiple process
- 5 Additional Open ERP Documentation
- 6 Open ERP Community
- 7 Open Object RAD
This introduction briefly describes Open ERP, its basic design, and its community. The rest of this wikipage details installing and configuring Open ERP on Arch Linux. It also provides additional information about Open ERP documentation, community, and development.
Open ERP is Enterprise Resource Planning software. It provides a complete, integrated ERP solution for small and medium sized businesses and organizations. Open ERP includes financial and analytic accounting, warehouse and inventory management, sales and purchase management, customer and supplier relations management, association management, tasks automation, human resource management, marketing campaign, document management, help desk, e-commerce integration, and point of sale functionality.
Open ERP features an application server which uses PostgreSQL for its database, along with a standalone GTK-based client, as well as a web-based client. It is written in the Python programming language, with a highly modular design which allows for the rapid development of new modules through Open Object RAD. Open ERP developers have a strong committment to free software.
A thriving support and development community has grown up around Open ERP, providing free technical support, bugfixing, new development, and support services. Open ERP provides extensive documentation in various electronic formats, as well as hardcopy. The company responsible for development of Open ERP earns profits through partnership services with Open ERP consultants, and by providing support, training, hosting services, software development, and software quality testing and verification.
Before Installing Open ERP
The following instructions assume that you have installed the 'sudo' command on your Arch Linux system. If you have not already done so, go to the sudo Arch Wikipage for more information.
Open ERP uses the PostgreSQL database, which should be installed and configured before installing Open ERP. Follow the instructions in the "Installing PostgreSQL" section of the Arch PostgreSQL Wikipage. Complete these installation instructions, but do not perform any other configuration from that page. Return to this page for additional configuration steps.
Configuring PostgreSQL for local use on your own machine
If you plan to use PostgreSQL and Open ERP on the same machine, you will need to configure PostgreSQL to listen on the localhost's 5432 TCP port. Open
/var/lib/postgres/data/postgresql.conf and navigate to the
CONNECTIONS AND AUTHENTICATION section. Uncomment the
port lines. Save the file. When complete, the file should appear as follows:
#------------------------------------------------------------------------------ # CONNECTIONS AND AUTHENTICATION #------------------------------------------------------------------------------ # - Connection Settings - listen_addresses = 'localhost' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost', '*' = all # (change requires restart) port = 5432 # (change requires restart)
Restart PostgreSQL so that it uses the newly changed conf file.
Verify that PostgreSQL is listening on the localhost port 5432:
# ss -anpt
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 13420/postgres
Configuring PostgreSQL for remote use over a network
If you need remote access to PostgreSQL over a network, read PostgreSQL#Configure PostgreSQL to be accessible from remote hosts.
Setting up PostgreSQL to run with Open ERP
Next, it is necessary to create a new PostgreSQL user for Open ERP. In this example, the user is 'yourusername', but you should replace this with your Arch system login username. First, log in as the default PostgreSQL superuser, 'postgres', by executing the following command from the CLI:
sudo su - postgres
Once logged in as postgres, begin the process of creating the 'yourusername' user, with the folowing command:
createuser yourusername -P
You will first be asked for a password. For highly secure yet easy to remember passwords, consider using a Diceware Passphrase. Re-enter the password as requested. The next three questions should be answered in sequence with n, y, and n. Shall the new role be a superuser? n Shall the new role be allowed to create database? y Shall the new role be allowed to create more new roles? n
You may also use options as below to skip the interactive questions to set the attributes:
createuser yourusername --createdb --login --no-superuser --no-createrole -P
Once you are finished answering these questions, type the word 'exit' to log out from PostgreSQL as the postgres superuser.
You may want to edit your /etc/rc.conf file by adding postgresql to the Daemons list, so that PostgreSQL will automatically start up when you boot up your computer.
This completes the installation and setup of PostgreSQL for use with Open ERP under Arch Linux. Additional detailed information about PostgreSQL configuration may be found on the Arch Wikipage for PostgreSQL, and the PostgreSQL Manuals webpage. Also, there is a powerful GUI PostgreSQL Admin tool, pgAdmin, which is available in the Arch repositories.
Installing Open ERP from AUR
Open ERP requires the installation of the Open ERP Server, Open ERP comes with a webserver so you can use your web browser to use it. Currently, Open ERP is not available in the main repositories of Arch Linux, but it is available through the Arch User Repository. Open ERP requires Python 2.7, various libraries compiled with Python 2.7, and a few other dependencies not found in the Arch repositories. All of these packages are provided through AUR. The best tool for downloading, compiling, and installing AUR packages is yaourt. The following instructions assume that yaourt has been installed and configured on the user's system.
install Open ERP
yaourt -S openerp
configure Open ERP
the configure file of Open ERP server is at /etc/openerp/openerp-server.conf. make it look like this:
[options] ; This is the password that allows database operations: ; admin_passwd = admin db_host = localhost db_port = 5432 db_user = yourusername ##this is username you created in postegres. db_password =
start Open ERP server
use the command below to enable autostart openerp server when system boot:
systemctl enable openerp-server.service
use the command below to start openerp:
systemctl start openerp-server.service
login to Open ERP
use your favorite web browser and go to link below:
shows openerp login page.
use gunicorn to run openerp in multiple process
Openerp is now able to utilize multicore-CPUs by gunicorn,for more information on why to use gunicorn, please see Serving OpenERP 6.1 on multicore systems with Gunicorn.
yaourt -S gunicorn
write a python script
now you need to write a python script to run openerp. below is an example, you can change it for your needs. save it to your home directory and name it openerp-wsgi.py. for more information see gunicorn.conf.py , note that the config file in /etc/openerp/openerp-server.conf has no effect to openerp if you use this script to start openerp.
import openerp # Standard OpenERP XML-RPC port is 8069 bind = '127.0.0.1:8069' pidfile = '.gunicorn.pid' # Gunicorn recommends 2-4 x number_of_cpu_cores, but # you'll want to vary this a bit to find the best for your # particular work load. workers = 4 # openerp request-response cycle can be quite long for # big reports for example timeout = 240 max_requests = 2000 # Equivalent of --load command-line option openerp.conf.server_wide_modules = ['web'] # internal TODO: use openerp.conf.xxx when available conf = openerp.tools.config # Path to the OpenERP Addons repository (comma-separated for # multiple locations) conf['addons_path'] = '/lib/python2.7/site-packages/openerp/addons' # Optional config #conf['db_name'] = 'mycompany' conf['db_host'] = 'localhost' conf['db_user'] = 'openerp' ##this is username you created in postegres. conf['db_port'] = 5432 conf['db_password'] = conf['admin_passwd'] = 'admin' conf['db_template'] = 'template1' conf['syslog'] = 'False'
for a complete list of configurations in section optional config, you can use command blow to save it to ~/.openerp_serverrc
now you can use command below to run openerp with gunicorn
gunicorn and systemd
you can write a systemd script to run openerp-wsgi.py as a service. below is a example
[Unit] Description= gunicorn for multi-process openerp [Service] ExecStart=/usr/bin/gunicorn openerp:service.wsgi_server.application -c openerp- wsgi.py [Install] WantedBy=multi-user.target ##need to move this file to /etc/systemd/system,
save it as gunicorn_openerp.service to your home directory. and move it to /etc/systemd/system in root
cp ~/gunicorn_openerp.service /etc/systemd/system
make it executable by root
chmod 755 /etc/systemd/system/gunicorn_openerp.service
start the service
systemctl start gunicorn_openerp.service
start the servie at boot
systemctl enable gunicorn_openerp.service
Additional Open ERP Documentation
There are various sources of Open ERP documentation. The best place to start is the Open ERP Documentation webpage. This page links to different online documents, including detailed installation instructions. Additionally, there is an online copy of the book, "Open ERP for Retail and Industrial Management". This copy is also available as a PDF fileTemplate:Linkrot, and can be purchased in hardcopy form from Open ERPTemplate:Linkrot or from Amazon.com. While Open ERP documentation, such as "Open ERP for Retail and Industrial Management" is freely downloadable, it does not come with a free documentation license. Further details about this issue are found on the Open ERP websiteTemplate:Linkrot. Finally, Open ERP TV provides screencasts, some of which document various features and procedures of the software.
Open ERP Community
The Open ERP Community is centered upon the Open Object website. Free technical support for Open ERP may be found in the webforums, a mailing listTemplate:Linkrot which is linked to the webforums, an IRC channel on freenode.net, an Open ERP wiki, and the Official ERP Documentation webpage. The latest news may be found on Open ERP Planet, while various Open ERP screencasts are provided on Open ERP TV. Fee-based support services are provided by Open ERP PartnersTemplate:Linkrot.
Open Object RAD
Open Object is the Python-based Rapid Application Development framework for developing Open ERP modules. It allows developers and businesses to customize Open ERP for specific needs. Open Object RAD development work is centered upon the Open Object Launchpad page. Developer news and blogs are published on Open Object Planet. There are pages for software downloads, Open ERP module downloadsTemplate:Linkrot, and development source code downloads.