[Erp5-users] ERP5 installation on Debian

Dieter Lucking d.lucking at rogers.com
Fri Jun 24 17:41:17 CEST 2005


Installation of Zope and ERP5 on Debian Linux (2004/06/12)
==========================================================
Version 0.2

I wrote this, after I installed ERP5 on my box. I may have documented
some part wrong and excuse for it in advance. However, I think following
this manual will result in a working ERP5-System in a Debian
distribution.
USE AT OWN RISK - NO WARRANTY OF ANY KIND - as usual!


Note:
-----

The name under each heading inside the [] is the login required for the
installation.


Zope User:
----------
[root]

Create a user named 'zope'. You may choose a different name and use that
name
whenever I refer to 'zope'. 


Local Package Directories:
--------------------------
[root]

Create the directory '/usr/local/packages/zope/' and change into it.
Create the sub-directories 'erp5-cvs' and 'erp5-release'.
    mkdir erp5-cvs
    mkdir erp5-release
    chown -R zope:zope .
It is important that the zope manager/owner has full access to all (?)
ERP5
files whenever you install a business template!
Create a Debian package directory.
    mkdir debian


Zope Package (Debian):
---------------------
[root]

Change to the debian package directory:
    cd /usr/local/packages/zope/debian
Download and extract the source from nexedi.org:
    wget
http://nexedi.org/static/Mandrake/10.2/SRPMS/zope-2.7.6b2-2nxd.src.rpm
    alien --to-tgz zope-2.7.6b2-2nxd.src.rpm
    tar -xzf zope-2.7.6b2.tgz
    bunzip2 Zope-2.7.2-rc1-aq_dynamic.patch.bz2
Erase everything but the patch:
    rm *.bz2 zope-2.7.6*
Download the source package of zope2.7:
    apt-get source zope2.7
Change directory to the zope package, apply the patch and build the
package:
    cd zope2.7-2.7.5/
    patch -p1 < ../Zope-2.7.2-rc1-aq_dynamic.patch
    debian/rules binary
Change back to your working directory and install the debian package.
    cd ..
    dpkg -i zope2.7_2.7.5-2_i386.deb

During the setup and customization of ERP5 you may want to remove
zope2.7 form
the startup scrips:
    rcconfig


Zope Products (Debian):
-----------------------
[root]

Download and install packages from Debian:
        apt-get install zope-btreefolder2 zope-cmf1.4
zope-cmfcalendar1.4
                        zope-cmfcore1.4 zope-cmfdefault1.4
zope-cmftopic1.4 
                        zope-dcworkflow zope-localizer


Zope Formulator (Debian):
-------------------------
[root]

Change to the debian package directory:
    cd /usr/local/packages/zope/debian
Create the file zope-formulator-1.7.0-editable.patch:
    vim zope-formulator-1.7.0-editable.patch
------------------------------------------------------------------------------    
diff -ru zope-formulator-1.7.0/Field.py
zope-formulator-1.7.0-patch/Field.py
--- zope-formulator-1.7.0/Field.py      2004-09-06 15:50:27.000000000
-0400
+++ zope-formulator-1.7.0-patch/Field.py        2005-06-13
07:40:33.159578904
-0400
@@ -241,6 +241,8 @@
         value = self._get_default(key, value, REQUEST)
         if self.get_value('hidden'):
             return self.widget.render_hidden(self, key, value, REQUEST)
+        elif (not self.get_value('editable')):
+            return self.widget.render_view(self, value)
         else:
             return self.widget.render(self, key, value, REQUEST)
 
diff -ru zope-formulator-1.7.0/Validator.py
zope-formulator-1.7.0-patch/Validator.py
--- zope-formulator-1.7.0/Validator.py  2004-09-03 15:25:31.000000000
-0400
+++ zope-formulator-1.7.0-patch/Validator.py    2005-06-13
07:40:33.241566440 -0400
@@ -20,7 +20,7 @@
 class ValidatorBase:
     """Even more minimalistic base class for validators.
     """
-    property_names = ['enabled']
+    property_names = ['enabled','editable']
 
     message_names = []
 
@@ -35,6 +35,14 @@
         "wasn't there when the form was drawn."),
                                    default=1)
 
+    editable = fields.CheckBoxField('editable',
+                                    title="Editable",
+                                    description=(
+        "If a field is not editable, then the user can only see"
+        "the value. This allows to drawn very different forms
depending"
+        "on use permissions."),
+                                    default=1)
+
     def raise_error(self, error_key, field):
         raise ValidationError(error_key, field)
------------------------------------------------------------------------------    

Download the source package of zope-formulator:
    apt-get source zope-formulator
Change directory to the formulator package, apply the patch and build
the
package:
    cd zope-formulator-1.7.0/
    patch -p1 < ../zope-formulator-1.7.0-editable.patch
    debian/rules binary
Change back to your working directory and install the debian package.
    cd ..
    dpkg -i zope-formulator_1.7.0-5_all.deb



ERP5-CDROM Products:
--------------------
[root]

Get a ERP5 CDROM, and reboot.
Mount the hard disk containing your '/usr' directory.
Copy CMFMailIn, CMFPhoto, CMFReportTool, Photo, TranslationService and
ZMySQLDA to '.../usr/local/packages/zope/'.

Copy CMFActivity, CMFCategory, ERP5, ERPCatalog, ERP5Form, ERP5SyncML
ERP5Type and ZSQLCatalog to '.../usr/local/packages/zope/erp5-release'.
Note: The CMFReportTool of the CDROM may cause problems, I am using
version 1.2
      but cannot tell where I got it.
Reboot again.

Change to the directory '/usr/local/packages/zope/' and change the owner
and
group of CMFMailIn, CMFPhoto, CMFReportTool, Photo, TranslationService
and
ZMySQLDA.
    cd /usr/local/packages/zope/erp5-release
    chown -R zope:zope CMFMailIn CMFPhoto CMFReportTool Photo
TranslationService
    chown -R zope:zope ZMySQLDA

Change to the directory '/usr/local/packages/zope/erp5-release' and
change the
owner and group of all files.
    cd /usr/local/packages/zope/erp5-release
    chown -R zope:zope .

If you decide to use the release version, create a symbolic link 'erp5'
pointing
to erp5-release'. However, you should do so only if the release version
includes
business templates! Thus, I suggest not to so (2004/06/12)!
Change to the directory '/usr/local/packages/zope.
    cd /usr/local/packages/zope/
    ln -s erp5-release erp5
If you decided to use the release only, you may skip following and
proceed with
"Installation".


ERP5-CVS Products:
-------------------
[zope]

If you decide to use the cvs version, create a symbolic link 'erp5'
pointing to
erp5-cvs'.
    cd /usr/local/packages/zope/
    ln -s erp5-cvs erp5
Change to the directory '/usr/local/packages/zope/erp5-cvs'.
Create the shell script 'cvs-checkout':
    vim cvs-checkout
------------------------------------------------------------------------------    
#!/bin/bash
Modules=" \
    CMFActivity \
    CMFCategory \
    ERP5 \
    ERP5Catalog \
    ERP5Form \
    ERP5OOo \
    ERP5SyncML \
    ERP5Type \
    ZSQLCatalog \
    erp5_banking \
    erp5_bt5 \
    erp5diff \
"
cvs -d:pserver:anonymous at cvs.erp5.org:/cvsroot login
for M in $Modules
do
    cvs -z3 -d:pserver:anonymous at cvs.erp5.org:/cvsroot co -P $M
done
#EOF
------------------------------------------------------------------------------    

You may want to create 'cvs-update', too:
    vim cvs-update
------------------------------------------------------------------------------    
#!/bin/bash
cvs -z3 -d:pserver:anonymous at cvs.erp5.org:/cvsroot update -Pd
#EOF
------------------------------------------------------------------------------    

Run the script 'cvs-checkout'.
    source cvs-checkout


ERP5 Zope Instance:
-------------------
[root]

Create a zope instance 'erp5':
    mkzope2.7instance.
    cd /var/lib/zope2.7/instance/erp5
Create some local directories:
        mkdir Constraint Document PropertySheet
    chown -R zope:zope *
    
    
ERP5 Configuration:
-------------------
[zope]

Change directory to /var/lib/zope2.7/instance/erp5/etc/ and edit
'zope.conf':
    cd /var/lib/zope2.7/instance/erp5/etc/
    vim zope.conf
        Unkomment and change the order of the entries for Python's
module search
        path.
            products $INSTANCE/Products
            products /usr/lib/zope2.7/lib/python/Products
            products /usr/lib/zope/lib/python/Products
Change to the Products directory and link necessary Products.
    cd ../Products
    ln -s /usr/local/packages/zope/CMFMailIn/ . 
    ln -s /usr/local/packages/zope/CMFPhoto/ . 
    ln -s /usr/local/packages/zope/CMFReportTool/ . 
    ln -s /usr/local/packages/zope/Photo/ . 
    ln -s /usr/local/packages/zope/TranslationService/ . 
    ln -s /usr/local/packages/zope/ZMySQLDA/ . 
    ln -s /usr/local/packages/zope/erp5/CMFActivity/ . 
    ln -s /usr/local/packages/zope/erp5/CMFCategory/ .
    ln -s /usr/local/packages/zope/erp5/ERP5/ .
    ln -s /usr/local/packages/zope/erp5/ERP5Catalog/ .
    ln -s /usr/local/packages/zope/erp5/ERP5Form/ .
    ln -s /usr/local/packages/zope/erp5/ERP5SyncML/ .
    ln -s /usr/local/packages/zope/erp5/ERP5Type/ .
        ln -s /usr/local/packages/zope/erp5/ZSQLCatalog .
Change to the Extensions directory and do some more links:
    cd ../Extensions
    ln
-s /usr/local/packages/zope/erp5/ERP5/Extensions/InventoryBrain.py .
    ln -s /usr/local/packages/zope/erp5/ZSQLCatalog/zsqlbrain.py .

Start zope:
    cd /var/lib/zope2.7/instance/erp5/
    bin/runzope

Make sure MySQL is setup properly (you need a database for ERP5 and
another
for CMFActivity), open in your browser 'http://localhost:9673/manage'
and add
the 'ERP5 Site' into the root folder of Zope. Be patiend and wait for
the
welcome screen.

Regards 
Dieter

-- 
Dieter Lucking <d.lucking at rogers.com>




More information about the Erp5-users mailing list