doc/book/en/admin/setup.rst
author Nicolas Chauvat <nicolas.chauvat@logilab.fr>
Sun, 27 Sep 2009 14:37:55 +0200
branchstable
changeset 3488 ab9e7bcfc764
parent 3138 b33eb9e91262
child 3740 e9ce140c9065
permissions -rw-r--r--
[doc] add missing dependencies in annexes. explain more precisely source install. Feedback sent by Carlos Balderas.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     1
.. -*- coding: utf-8 -*-
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     2
1224
a9da8a8f0b19 [doc] Change id to english.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 221
diff changeset
     3
.. _SetUpEnv:
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     4
106
fa179de1a787 [doc] Adjust TOC for this particular chapter to get the content and not list of links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 104
diff changeset
     5
===================================================
2175
16d3c37c5d28 [doc] improvements
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2172
diff changeset
     6
Installation and set-up of a *CubicWeb* environment
98
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     7
===================================================
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     8
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
     9
Installation of `Cubicweb` and its dependencies
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    10
-----------------------------------------------
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    11
2175
16d3c37c5d28 [doc] improvements
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2172
diff changeset
    12
*CubicWeb* is packaged for Debian and Ubuntu, but can be installed from source
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    13
using a tarball or the Mercurial version control system.
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    14
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    15
.. _DebianInstallation:
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    16
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    17
Debian and Ubuntu packages
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    18
```````````````````````````
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    19
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    20
Depending on the distribution you are using, add the appropriate line to your list
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    21
of sources (for example by editing ``/etc/apt/sources.list``).
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    22
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    23
For Debian Lenny::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    24
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    25
  deb http://ftp.logilab.org/dists/ lenny/
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    26
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    27
For Debian Sid::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    28
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    29
  deb http://ftp.logilab.org/dists/ sid/
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    30
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    31
For Ubuntu Hardy::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    32
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    33
  deb http://ftp.logilab.org/dists/ hardy/
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    34
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    35
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    36
You can now install the required packages with the following command::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    37
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
    38
  apt-get update
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    39
  apt-get install cubicweb cubicweb-dev
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    40
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    41
`cubicweb` installs the framework itself, allowing you to create
2476
1294a6bdf3bf application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2458
diff changeset
    42
new instances.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    43
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    44
`cubicweb-dev` installs the development environment allowing you to
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    45
develop new cubes.
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    46
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    47
There is also a wide variety of cubes listed on http://www.cubicweb.org/Project available as debian packages and tarball.
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    48
2239
0f12f1ebf27c add note about logilab key file / apt-get
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2175
diff changeset
    49
The repositories are signed with `Logilab's gnupg key`_. To avoid warning on "apt-get update":
2393
6190852af97f [doc] add list of dependencies in appendix
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2239
diff changeset
    50
1. become root using sudo
2239
0f12f1ebf27c add note about logilab key file / apt-get
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2175
diff changeset
    51
2. download http://ftp.logilab.org/dists/logilab-dists-key.asc using e.g. wget
0f12f1ebf27c add note about logilab key file / apt-get
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2175
diff changeset
    52
3. run "apt-key add logilab-dists-key.asc"
0f12f1ebf27c add note about logilab key file / apt-get
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2175
diff changeset
    53
4. re-run apt-get update (manually or through the package manager, whichever you prefer)
0f12f1ebf27c add note about logilab key file / apt-get
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2175
diff changeset
    54
2393
6190852af97f [doc] add list of dependencies in appendix
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2239
diff changeset
    55
.. _`Logilab's gnupg key`: http://ftp.logilab.org/dists/logilab-dists-key.asc
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    56
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    57
Install from source
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    58
```````````````````
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    59
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    60
You can download the archive containing the sources from our `ftp site`_ at::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    61
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    62
  http://ftp.logilab.org/pub/cubicweb/
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    63
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    64
.. _`ftp site`: http://ftp.logilab.org/pub/cubicweb/
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    65
3488
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    66
Make sure you have installed the dependencies (see appendixes for the list).
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    67
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    68
Install from version control system
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    69
```````````````````````````````````
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    70
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    71
You can keep up to date with on-going development by using Mercurial and its
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    72
forest extension::
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    73
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    74
  hg fclone http://www.logilab.org/hg/forests/cubicweb
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    75
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    76
See :ref:`MercurialPresentation` for more details about Mercurial.
3488
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    77
2420
46c83be959b7 a note about branches
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2239
diff changeset
    78
When cloning a repository, you might be set in a development branch
46c83be959b7 a note about branches
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2239
diff changeset
    79
(the 'default' branch). You should check that the branches of the
46c83be959b7 a note about branches
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2239
diff changeset
    80
repositories are set to 'stable' (using `hg up stable` for each one)
46c83be959b7 a note about branches
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2239
diff changeset
    81
if you do not intend to develop the framework itself.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
    82
3488
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    83
Do not forget to update the forest itself (using `cd path/to/forest ; hg up`).
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    84
ab9e7bcfc764 [doc] add missing dependencies in annexes. explain more precisely source install.
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 3138
diff changeset
    85
Make sure you have installed the dependencies (see appendixes for the list).
2393
6190852af97f [doc] add list of dependencies in appendix
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2239
diff changeset
    86
3121
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    87
Windows installation
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    88
````````````````````
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    89
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    90
Base elements
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    91
_____________
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    92
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    93
Setting up a windows development environment is not too complicated
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    94
but requires a series of small steps. What is proposed there is only
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    95
an example of what can be done. We assume everything goes into C:\ in
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    96
this document. Adjusting the installation drive should be
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    97
straightforward.
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    98
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
    99
You should start by downloading and installing the Python(x,y)
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   100
distribution. It contains python 2.5 plus numerous useful third-party
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   101
modules and applications::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   102
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   103
  http://www.pythonxy.com/download_fr.php
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   104
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   105
At the time of this writting, one gets version 2.1.15. Among the many
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   106
things provided, one finds Eclipse + pydev (an arguably good IDE for
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   107
python under windows).
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   108
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   109
Then you must grab Twisted. There is a windows installer directly
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   110
available from this page::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   111
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   112
  http://twistedmatrix.com/trac/
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   113
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   114
A windows installer for lxml will be found there::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   115
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   116
  http://pypi.python.org/pypi/lxml/2.2.1
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   117
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   118
Check out the lxml-2.2.1-win32-py2.5.exe file. More recent bugfix
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   119
releases should probably work, too.
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   120
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   121
You should find postgresql 8.4 there::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   122
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   123
  http://www.enterprisedb.com/products/pgdownload.do#windows
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   124
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   125
The python drivers for posgtresql are to be found there::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   126
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   127
  http://www.stickpeople.com/projects/python/win-psycopg/#Version2
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   128
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   129
Please be careful to select the right python (2.5) and postgres (8.4)
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   130
versions.
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   131
3138
b33eb9e91262 add pyro
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3132
diff changeset
   132
Pyro enable remote access to cubicweb repository instances. Get it
b33eb9e91262 add pyro
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3132
diff changeset
   133
there::
b33eb9e91262 add pyro
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3132
diff changeset
   134
b33eb9e91262 add pyro
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3132
diff changeset
   135
  http://sourceforge.net/projects/pyro/files/
b33eb9e91262 add pyro
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3132
diff changeset
   136
3132
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   137
To access LDAP/Active directory directories, we need the python-ldap
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   138
package. Windows binaries are available from::
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   139
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   140
  http://www.osuch.org/python-ldap
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   141
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   142
Check out the latest release.
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   143
3121
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   144
Having graphviz will allow schema drawings, which is quite recommended
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   145
(albeit not mandatory). You should get an msi installer there::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   146
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   147
  http://www.graphviz.org/Download_windows.php
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   148
3132
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   149
Simplejson will be provided within the forest, but a win32 compiled
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   150
version will run much faster::
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   151
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   152
  http://www.osuch.org/python-simplejson%3Awin32
cb310b97424e python-ldap, also win32 binary version of simplejson
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 3121
diff changeset
   153
3121
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   154
Tools
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   155
_____
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   156
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   157
Get mercurial + its standard windows GUI (TortoiseHG) there (the
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   158
latest is the greatest)::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   159
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   160
  http://bitbucket.org/tortoisehg/stable/wiki/download
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   161
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   162
If you need to peruse mercurial over ssh, it can be helpful to get an
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   163
ssh client like Putty::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   164
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   165
  http://www.putty.org/
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   166
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   167
Integration of mercurial and Eclipse is convenient enough that we want
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   168
it. Instructions are set there, in the `Download & Install` section::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   169
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   170
  http://www.vectrace.com/mercurialeclipse/
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   171
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   172
Setting up the sources
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   173
______________________
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   174
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   175
You need to enable the mercurial forest extension. To do this, edit
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   176
the file::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   177
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   178
  C:\Program Files\TortoiseHg\Mercurial.ini
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   179
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   180
In the [extensions] section, add the following line::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   181
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   182
  forest=C:\Program Files\TortoiseHg\ext\forest\forest.py
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   183
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   184
Now, you need to clone the cubicweb repository. We assume that you use
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   185
Eclipse. From the IDE, choose File -> Import. In the box, select
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   186
`Mercurial/Clone repository using MercurialEclipse`.
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   187
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   188
In the import main panel you just have to:
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   189
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   190
* fill the URL field with http://www.logilab.org/hg/forests/cubicwin32
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   191
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   192
* check the 'Repository is a forest' box.
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   193
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   194
Then, click on 'Finish'. It might take some time to get it all. Note
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   195
that the `cubicwin32` forest contains additional python packages such
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   196
as yapps, vobject, simplejson and twisted-web2 which are not provided
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   197
with Python(x,y). This is provided for convenience, as we do not
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   198
ensure the up-to-dateness of these packages, especially with respect
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   199
to security fixes.
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   200
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   201
Environment variables
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   202
_____________________
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   203
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   204
You will need some convenience environment variables once all is set
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   205
up. These variables are settable through the GUI by getting at the
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   206
'System properties' window (by righ-clicking on 'My Computer' ->
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   207
properties).
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   208
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   209
In the 'advanced' tab, there is an 'Environment variables'
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   210
button. Click on it. That opens a small window allowing edition of
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   211
user-related and system-wide variables.
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   212
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   213
We will consider only user variables. First, the PATH variable. You
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   214
should ensure it contains, separated by semi-colons, and assuming you
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   215
are logged in as user Jane::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   216
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   217
  C:\Documents and Settings\Jane\My Documents\Python\cubicweb\cubicweb\bin
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   218
  C:\Program Files\Graphviz2.24\bin
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   219
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   220
The PYTHONPATH variable should also contain::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   221
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   222
  C:\Documents and Settings\Jane\My Documents\Python\cubicweb\
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   223
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   224
From now, on a fresh `cmd` shell, you should be able to type::
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   225
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   226
  cubicweb-ctl list
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   227
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   228
... and get a meaningful output.
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   229
dbc02844d412 sections to help building a window dev environment
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 2539
diff changeset
   230
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   231
PostgreSQL installation
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   232
```````````````````````
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   233
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   234
Please refer to the `PostgreSQL project online documentation`_.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   235
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   236
.. _`PostgreSQL project online documentation`: http://www.postgresql.org/
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   237
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   238
You need to install the three following packages: `postgresql-8.3`,
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   239
`postgresql-contrib-8.3` and `postgresql-plpython-8.3`.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   240
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   241
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   242
Other dependencies
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   243
``````````````````
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   244
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   245
You can also install:
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   246
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   247
* `pyro` if you wish the repository to be accessible through Pyro
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   248
  or if the client and the server are not running on the same machine
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   249
  (in which case the packages will have to be installed on both
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   250
  machines)
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   251
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   252
* `python-ldap` if you plan to use a LDAP source on the server
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   253
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   254
.. _ConfigurationEnv:
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   255
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   256
Environment configuration
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   257
-------------------------
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   258
2175
16d3c37c5d28 [doc] improvements
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2172
diff changeset
   259
If you installed *CubicWeb* by cloning the Mercurial forest, then you
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
   260
will need to update the environment variable PYTHONPATH by adding
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   261
the path to the forest ``cubicweb``:
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   262
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   263
Add the following lines to either `.bashrc` or `.bash_profile` to configure
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   264
your development environment ::
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
   265
2449
888d698af3f9 #344747: add env var CW_MODE
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2445
diff changeset
   266
    export PYTHONPATH=/full/path/to/cubicweb-forest
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   267
2449
888d698af3f9 #344747: add env var CW_MODE
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2445
diff changeset
   268
If you installed *CubicWeb* with packages, no configuration is required and your
2476
1294a6bdf3bf application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2458
diff changeset
   269
new cubes will be placed in `/usr/share/cubicweb/cubes` and your instances
2449
888d698af3f9 #344747: add env var CW_MODE
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2445
diff changeset
   270
will be placed in `/etc/cubicweb.d`.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   271
2449
888d698af3f9 #344747: add env var CW_MODE
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2445
diff changeset
   272
You may run a system-wide install of *CubicWeb* in "user mode" and use it for
888d698af3f9 #344747: add env var CW_MODE
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2445
diff changeset
   273
development by setting the following environment variable::
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   274
2449
888d698af3f9 #344747: add env var CW_MODE
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2445
diff changeset
   275
    export CW_MODE=user
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   276
    export CW_CUBES_PATH=~/lib/cubes
2445
6f065b366d14 rename environment variables
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2420
diff changeset
   277
    export CW_INSTANCES_DIR=~/etc/cubicweb.d/
6f065b366d14 rename environment variables
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2420
diff changeset
   278
    export CW_INSTANCES_DATA_DIR=$CW_INSTANCES_DIR
6f065b366d14 rename environment variables
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2420
diff changeset
   279
    export CW_RUNTIME_DIR=/tmp
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   280
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   281
.. note::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   282
    The values given above are our suggestions but of course
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   283
    can be different.
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   284
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   285
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   286
Databases configuration
1464
09afa1f808c4 [doc] Fix ReST pb.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1460
diff changeset
   287
-----------------------
09afa1f808c4 [doc] Fix ReST pb.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1460
diff changeset
   288
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   289
.. _ConfigurationPostgresql:
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   290
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   291
PostgreSQL configuration
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   292
````````````````````````
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   293
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   294
.. note::
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   295
    If you already have an existing cluster and PostgreSQL server
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   296
    running, you do not need to execute the initilization step
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   297
    of your PostgreSQL database.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   298
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   299
* First, initialize the database PostgreSQL with the command ``initdb``.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   300
  ::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   301
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   302
    $ initdb -D /path/to/pgsql
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   303
2539
0f26a76b0348 [doc] some more rewriting
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2536
diff changeset
   304
  Once initialized, start the database server PostgreSQL
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   305
  with the command::
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
   306
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   307
    $ postgres -D /path/to/psql
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   308
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   309
  If you cannot execute this command due to permission issues, please
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   310
  make sure that your username has write access on the database.
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   311
  ::
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
   312
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   313
    $ chown username /path/to/pgsql
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   314
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   315
* The database authentication can be either set to `ident sameuser`
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
   316
  or `md5`.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   317
  If set to `md5`, make sure to use an existing user
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   318
  of your database.
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   319
  If set to `ident sameuser`, make sure that your
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   320
  client's operating system user name has a matching user in
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   321
  the database. If not, please do as follow to create a user::
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
   322
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   323
    $ su
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   324
    $ su - postgres
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   325
    $ createuser -s -P username
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   326
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   327
  The option `-P` (for password prompt), will encrypt the password with
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
   328
  the method set in the configuration file ``pg_hba.conf``.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   329
  If you do not use this option `-P`, then the default value will be null
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   330
  and you will need to set it with::
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
   331
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   332
    $ su postgres -c "echo ALTER USER username WITH PASSWORD 'userpasswd' | psql"
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   333
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   334
  This login/password will be requested when you will create an
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   335
  instance with `cubicweb-ctl create` to initialize the database of
2476
1294a6bdf3bf application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2458
diff changeset
   336
  your instance.
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   337
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   338
.. note::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   339
    The authentication method can be configured in ``pg_hba.conf``.
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   340
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   341
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   342
.. FIXME Are these steps really necessary? It seemed to work without.
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   343
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   344
* Installation of plain-text index extension ::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   345
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   346
    cat /usr/share/postgresql/8.3/contrib/tsearch2.sql | psql -U username template1
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   347
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   348
* Installation of plpythonu language by default ::
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   349
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   350
    createlang -U pgadmin plpythonu template1
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   351
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   352
MySql configuration
1464
09afa1f808c4 [doc] Fix ReST pb.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1460
diff changeset
   353
```````````````````
2536
88595be9087d [doc] #306434: say a word about optimization
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2476
diff changeset
   354
Yout must add the following lines in ``/etc/mysql/my.cnf`` file::
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   355
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   356
    transaction-isolation = READ-COMMITTED
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   357
    default-storage-engine=INNODB
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   358
    default-character-set=utf8
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   359
    max_allowed_packet = 128M
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   360
2536
88595be9087d [doc] #306434: say a word about optimization
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2476
diff changeset
   361
.. note::
88595be9087d [doc] #306434: say a word about optimization
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2476
diff changeset
   362
    It is unclear whether mysql supports indexed string of arbitrary lenght or
88595be9087d [doc] #306434: say a word about optimization
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2476
diff changeset
   363
    not.
88595be9087d [doc] #306434: say a word about optimization
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2476
diff changeset
   364
1460
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   365
Pyro configuration
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   366
------------------
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   367
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   368
If you use Pyro, it is required to have a name server Pyro running on your
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   369
network (by default it is detected by a broadcast request).
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   370
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   371
To do so, you need to :
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   372
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   373
* launch the server manually before starting cubicweb as a server with
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   374
  `pyro-nsd start`
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   375
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   376
* edit the file ``/etc/default/pyro-nsd`` so that the name server pyro
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   377
  will be launched automatically when the machine fire up
6520efef1824 [doc] C011 content moved to C010
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 1444
diff changeset
   378