Did not find a how-to for your problem?

Ask me to write the how-to post by writing to the mailing-list at cps-devel [@] lists [.] nuxeo [.] com or writing to me to joseluisdelarosa+cpshowto [@] gmail [.] com. Note: I'll keep all conversations on the official mailing list.
Showing posts with label installation. Show all posts
Showing posts with label installation. Show all posts

Monday, June 18, 2007

How to add new transforms

CPS is configured out-of-the-box to index some types of documents. The indexation relies on a type of object called Transforms contained in the tool portal_transforms. This products allows to index the content of pdf, doc, ppt, and other files format. The steps below show how to add some new transforms:

  1. Install dependencies as debian packages:

    apt-get install lynx pdftohtml python-docutils xpdf ppthtml wv


  2. Go to the tool portal_transforms from ZMI.

  3. Add new objects objects of type Transform and fill the form with the values in the table below.










    Identifier Module
    ppt_to_html Products.PortalTransforms.transforms.ppt_to_html
    pdf_to_html Products.PortalTransforms.transforms.pdf_to_html
    pdf_to_text Products.PortalTransforms.transforms.pdf_to_text

  4. Upload a ppt or pdf file and search for some word of the content in the search form.

Was your uploaded file listed in the search results? Work finished!

Wednesday, June 13, 2007

How to prepare the instance for the battle

Debugging is like go hunting, you have to set traps until you catch the bug. In CPS, with such an abstract architecture, where you set the trap is really important.

These words aim to let you know how to configure the Zope/CPS instance to make debugging tasks easier. Let's deploy the anti-bug guns:

  1. Run Zope in debug mode.
    Make sure your instance is running in debug mode by checking that the line


    debug-mode on


    is not commented in the file etc/zope.conf of the Zope's instance root folder.
  2. Download and use PDBDebugMode.
    This product will be the trap for any of our enemies. As soon as an exception arises, a command line debugger will let you frisk it. To get PDBDebugMode running, follow these steps:

    1. Setup Zope to run in debug mode as explained in the first point above.
    2. Download the product PDBDebugMode and extract it to the folder Products of the Zope's instance.
    3. Run Zope from command line in foreground mode. To do so, go to the root folder of the zope instance and execute


      joseluis@ayoros:~$ ./bin/runzope.



    Whenever an exception is thrown the browser will remain waiting and a prompt like this (Pdb) will hold on the command line for your orders. Entering the command “help” will display a list of all available commands.

    To set a breakpoint in the python code write a new line like this


    import pdb; pdb.set_trace()


    wherever you need to take a breath to scrutinize what is going on.

  3. Deactivate Crash shield
    Contrary to what would be done in any other dangerous situation in life, do deactivate the Crash Shield!!! Do it this way:

    1. Open the ZMI and go to the CPS object.
    2. Spread out the list of tools.
    3. Click on the tool portal_themes.
    4. Choose the tab Options
    5. Click the button “Deactivate the crash shield

    The duty of the crash shield is to show the symbols !!! blinking, which means that the code of a portlet is raising an exception. From the moment the crash shield is disabled, blinking !!! will not be shown anymore, instead the traceback of the error will be displayed or the (Pdb) prompt will be displayed in the terminal if it is enabled.

    Note: Each time the step Themes Tool of a profile is imported, it is possible that the state of the crash shield changes. That's because the configuration of this option is included in the profile. Exactly the line responsible for the configuration is in the file profiles/default/themes.xml and it looks like this:



    <property name="debug_mode">False</property>



    If you have already worked with profiles, you may be thinking that you can create a profile for debug and another one for production that set the property debug_mode to True and False respectively. Yes, that's a good shot.

Monday, June 4, 2007

How to install CPS 3.4.4 on Ubuntu Feisty Fawn

This post explains briefly how to install CPS 3.4.4 in an Ubuntu Feisty Fawn with support for the most common products. I suppose that you have already installed Ubuntu Feisty Faw.

The installation will be based on CPS 3.4.4 and the required versions Zope 2.9.7 and Python 2.4.3.

Pre-requisites

  1. Install extra packages from Ubuntu Feisty repository:

    apt-get install make gcc python2.4 python2.4-dev g++ subversion


  2. Create some useful directories:

    root@ubuntu:~# cd
    root@ubuntu:~# mkdir opt
    root@ubuntu:~# mkdir instances
    root@ubuntu:~# mkdir downloads

Installing Zope

  1. Download and install Zope 2.9.7

    cd
    cd downloads
    wget http://www.zope.org/Products/Zope/2.9.7/Zope-2.9.7-final.tgz
    tar xvfz Zope-2.9.7-final.tgz
    cd Zope-2.9.7-final
    ./configure --prefix=./opt/zope2.9.7
    make
    make install
  2. Create Zope's instance

    cd
    ./opt/zope2.9.7/bin/mkzopeinstance.py
    root@ubuntu:~# ./opt/zope2.9.7/bin/mkzopeinstance.py
    Please choose a directory in which you'd like to install
    Zope "instance home" files such as database files, configuration
    files, etc.
    Directory: /srv/cps
    Please choose a username and password for the initial user.
    These will be the credentials you use to initially manage
    your new Zope instance.
    Username: cps
    Password:
    Verify password:
  3. Configure Zope:
    1. Add a new user to run zope:
      addgroup --system zope
      adduser --system --group zope

    2. Edit the file /srv/cps/etc/zope.conf and set effective-user, http-realm and http-server address:
      effective-user zope
      ...

      http-realm My CPS instance
      ...
      address 8080
    3. Change permissions of Zope's instance
      chown -R zope:zope /srv/cps
  4. Run Zope to test if it works by itself../bin/zopectl start
  5. Open your web browser and type http://localhost:8080, home page of Zope should arise.

Installing CPS 3.4.4

  1. Download CPS to the Products folder:
    1. Remove the directory Products of Zope as it will be replace for CPS's.
      rm -rf Products
    2. Create again the directory Products from the CPS repository
      svn export http://svn.nuxeo.org/pub/CPS3/bundles/CPS-3-full/tags/CPS-3.4.4 Products
  2. Restart Zope
    ./bin/zopectl restart
  3. Go to the ZMI in http://localhost:8080/manage
  4. Navigate to the Root folder of Zope and add a "CPSDefault Site".
  5. Fill in the gaps of the form and click the button "Add". Notice the identifier you choose for the new object as it will be your passport to access to it. I will choose "cps".
  6. After a while the brand new CPS's instance will be available in the url:
    http://localhost:8080/cps

If the step 6 gave you a good answer, Congratulations!! You have just installed CPS and now you can collaborate with others by using this powerful ECM.