|
1 .. -*- coding: utf-8 -*- |
|
2 |
|
3 Installation |
|
4 ============ |
|
5 |
|
6 Installation of `Cubicweb` and its dependancies |
|
7 ----------------------------------------------- |
|
8 |
|
9 `CubicWeb` is available as a debian package as well as an archive. |
|
10 We will detail here the two easiest way to set-up `CubciWeb` |
|
11 environment. |
|
12 |
|
13 Debian packages |
|
14 ``````````````` |
|
15 You need first to make sure that you added our public repository |
|
16 in the list of sources you packages manager will search in. |
|
17 |
|
18 Depending on the debian distribution you are using here are all the |
|
19 available options: :: |
|
20 |
|
21 deb http://ftp.logilab.org/dists/ lenny/ |
|
22 deb http://ftp.logilab.org/dists/ hardy/ |
|
23 deb http://ftp.logilab.org/dists/ sid/ |
|
24 |
|
25 As we assume you are installing `CubciWeb` on a debian machine, please |
|
26 add the appropriate line from above in ``/etc/apt/sources.list``. |
|
27 |
|
28 You can now install the required packages with the follwoing command: :: |
|
29 |
|
30 apt-get install cubicweb |
|
31 |
|
32 This is it! |
|
33 |
|
34 ``tar.gz`` archive |
|
35 `````````````````` |
|
36 |
|
37 You can download our sources at: :: |
|
38 |
|
39 http://ftp.logilab.org/pub/cubicweb/ |
|
40 |
|
41 Unpack the sources |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 .. note:: |
|
47 `CubicWeb` is also available as a Mercurial repository using the forest |
|
48 extension (see :ref:`MercurialForestInstall` for more details). |
|
49 |
|
50 |
|
51 Postgres installation |
|
52 ````````````````````` |
|
53 |
|
54 Please refer to the project online documentation Postgres_. |
|
55 |
|
56 .. _Postgres: http://www.postgresql.org/ |
|
57 |
|
58 You need to install the three following packages: `postgres-8.3`, |
|
59 `postgres-contrib-8.3` and `postgresql-plpython-8.3`. |
|
60 |
|
61 |
|
62 Then you can install: |
|
63 |
|
64 * `pyro` if you wish the repository is accessible through Pyro |
|
65 or if the client and the server are not running on the same machine |
|
66 (in suche case the packages will have to be isntalled on both |
|
67 machines) |
|
68 |
|
69 * `python-ldap` if you plan to use a LDAP source on the server |
|
70 |
|
71 .. _ConfigurationEnv: |
|
72 |
|
73 Environment configuration |
|
74 ------------------------- |
|
75 |
|
76 [FIXME] |
|
77 Ces variables ne sont plus requises pour le bon fonctionnement de `CubicWeb`, non? |
|
78 A part rajouter la foret dans le PYTHONPATH, rien de plus ne doit etre fait? |
|
79 |
|
80 Update the environment variable PYTHONPATH to add to it the path to |
|
81 the forest ``cubicweb``. |
|
82 |
|
83 Add the following lines to either `.bashrc` or `.bash_profile` to configure |
|
84 your development environment :: |
|
85 |
|
86 export PYTHONPATH=/full/path/to/cubicweb-forest |
|
87 |
|
88 //deprecated?? |
|
89 export ERUDI_REGISTRY=~/etc/erudi.d/ |
|
90 export ERUDI_TEMPLATES=~/hg/ |
|
91 export ERUDI_RUNTIME=/tmp/ |
|
92 |
|
93 Cela suppose que le composant erudi que vous développez est dans un |
|
94 sous-répertoire de *~/hg/* et que vous avez créé le répertoire *~/etc/erudi.d/* |
|
95 pour que `cubicweb-ctl` y place vos instances de test. |
|
96 |
|
97 .. _ConfigurationPostgres: |
|
98 |
|
99 Postgres configuration |
|
100 ---------------------- |
|
101 |
|
102 * First you have to initialize the database Postgres with the command ``initdb``. |
|
103 :: |
|
104 |
|
105 $ initdb -D /path/to/pgsql |
|
106 |
|
107 Once initialized, you can launch the database server Postgres |
|
108 with the command: :: |
|
109 |
|
110 $ postgres -D /path/to/psql |
|
111 |
|
112 If you cannot execute this command due to permission issues, please |
|
113 make sure that your username has write access on the database. |
|
114 :: |
|
115 |
|
116 $ chown username /path/to/pgsql |
|
117 |
|
118 * Create a superuser for `CubicWeb` instance (**root**) :: |
|
119 |
|
120 createuser -s username |
|
121 |
|
122 Initialize the password of the superuser you juste created with |
|
123 ``su - postgres`` and ``psql``. |
|
124 |
|
125 This password will be asked to you later on where you will create an |
|
126 instance with `cubicweb-ctl create` |
|
127 |
|
128 [XXX] |
|
129 Est-ce que ces etapes sont vraiment necessaires? |
|
130 sand : lors de l'installation de ma bdd cela n'a pas ete fait |
|
131 et il semble que tout aille bien. Doit etre verifie avec les experts. |
|
132 |
|
133 * installation of plain-text index extension :: |
|
134 |
|
135 cat /usr/share/postgresql/8.3/contrib/tsearch2.sql | psql -U username template1 |
|
136 |
|
137 * installation of plpythonu language by default :: |
|
138 |
|
139 createlang -U pgadmin plpythonu template1 |
|
140 |
|
141 |
|
142 Pyro configuration |
|
143 ------------------ |
|
144 |
|
145 If you use Pyro, it is required to have a name server Pyro runing on your |
|
146 network (by default it is identified by a broadcast request). |
|
147 |
|
148 To do so, you need to : |
|
149 |
|
150 * launch the server manually before starting cubicweb with `pyro-ns` |
|
151 |
|
152 * launch the server manually before starting cubicweb as a server with |
|
153 `pyro-nsd start` |
|
154 |
|
155 * edit the file ``/etc/default/pyro-nsd`` so that the name server pyro |
|
156 will be launched automatically when the macine fire up |
|
157 |
|
158 |