Monday, September 2, 2013

How to Generate a SSL certificate for OpenERP



To connect via xml-rpc secure protocol (8071) we need to generate a certificate and a private key file for the OpenERP . Below are the steps which can guide you to achieve this.

Step 1: Create a Directory eg: "SSL" under openerp-server/bin

Step 2: Go to "SSL" directory. cd ssl

Step 3: Generate Private key(pkey) as
execute command :openssl genrsa - des3 -out server.pkey 2048
enter the details that is asked for.

Step 4: Certificate
execute command openssl req-new-key server.pkey -out server.csr
enter details that is asked for.

Step 5: copy the .pkey file:
cp server.pkey server.pkey.org
enter password

Step 6: openssl rsa -in server.pkey.org -out server.pkey

Step 7: Generate CA private key
openssl genrsa - des3 -out ca.pkey 2048
enter password (enter different password then before)

Step 8: Generate a certificate in x509 format
execute: openssl req-new -x509 -days 365 -key ca.pkey -out ca.crt
Enter details that is asked for.

Step 9: sign the pkey
openssl x509 -req -in server.csr -out server.crt -CA ca.crt -CAkey ca.pkey
-CAcreateserial -CAserial ca.srl
Enter password same as entered in step 7

Step 10: start openerp server with --cert-file=YOUR .crt FILE PATH --pkey-
file=YOUR pkey FILE PATH

eg: server$ ./openerp-server --addons-path=../openobject-addons/ --cert-
file=bin/ssl/server.crt --pkey-file=bin/ssl/server.pkey


Thanks,
Naresh Soni(nch)
Team Lead, OpenERP Support / OPW

How to create OpenERP development Environment on windows

# This doc explains the steps to be taken 
# if you want to deploy openerp on windows or create openerp.exe for windows
# or want to create OpenERP Setup exe.
# Note : you can get all the packages from http://nightly.openerp.com/6.1/windows_dependencies/

Install following packages:

1: Install python2.6.5
   Set environment path c:\python26

2: Install all in one pygtk package:  pygtk-all-in-one-2.22.5.win32-py2.6 (default instllation)
   Set environment variable
 Variable name: GTK_RUNTIME
 Variable value: C:\Python26\Lib\site-packages\gtk-2.0\runtime 

3: from http://nightly.openerp.com/6.1/windows_dependencies/ download the "add_to_dist" folder which contains *.dlls
  set environment variable:
 Variable name: openerp_dlls
 Variable value: path to the folder "add_to_dist" 
  eg:c:\Desktop
  
4: Install setuptools-0.6c11.win32-py2.6

5: Install python-dateutil-1.5.win32
   (Note: you can create .win32.exe from python package using  
   >>>python setup.py bdist_wininst command it create python-dateutil-1.5.win32in dist directory)

6: Install pywin32-214.win32-py2.6

7: Install lxml-2.2.2.win32-py2.6

8: Install pydot-1.0.3.win32
     Note: you can create .win32.exe from python package using  
 >>>python setup.py bdist_wininst

Now your GTK client is ready to start from the command prompt like you do in linux

9: Install matplotlib-0.99.1.win32-py2.6

10: Install numpy-1.6.0-win32-superpack-python2.6

11: Install pyparsing-1.5.5.win32
   Note: you can create .win32.exe from python package using  
 >>>python setup.py bdist_wininst

12: Install pyOpenSSL-0.11.winxp32-py2.6

13: Install py2exe-0.6.9.win32-py2.6

14:Install nsis-2.46-setup.exe for creating auto installer

15: Copy libhippocanvas-1-0.dll and hippo.pyd of add_to_dist directory to C:\Python26\DLLs

start create exe use following command

15.  >>>path_to_openerp_client_dir>python setup.py py2exe

    it will take some time
    it create a build and dist directory in client then inside the dist dir you will find the openerp_X_Y.exe(x,y are version no)
 
16:To create a auto installer
 go to openerp client/
        right click on setup.nsi and select compile with nsis 
        this operation will take time and a setup installer will be created.



Thanks,
Naresh Soni(nch) Team Lead, OpenERP Support / OPW
Follow Naresh Soni on