~openerp-community/openobject-doc/6.1

« back to all changes in this revision

Viewing changes to source/install/linux/postgres/index.rst

  • Committer: TruongSinh Tran
  • Date: 2009-07-19 19:02:35 UTC
  • Revision ID: truongsinh@vipescoserver-20090719190235-fu3bxcrbpvwuk5h7
[FIX] build_i18n.py .. raw:: html

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
.. index::
 
3
   single: Installation; PostgreSQL
 
4
   single: PostgreSQL; Installation
 
5
.. 
 
6
 
 
7
.. _postgresql-server-installation:
 
8
 
 
9
PostgreSQL Server installation and configuration
 
10
================================================
 
11
 
 
12
Installing PostgreSQL Server
 
13
----------------------------
 
14
 
 
15
The `PostgreSQL download page <http://www.postgresql.org/download/linux>`__
 
16
lists the available installation methods. Choose the one that suits your needs
 
17
best.
 
18
 
 
19
Example on Ubuntu
 
20
+++++++++++++++++
 
21
 
 
22
On Ubuntu, install the **postgresql** package: ::
 
23
 
 
24
  sudo apt-get install postgresql
 
25
 
 
26
.. index::
 
27
   single: PostgreSQL; setup a user
 
28
   single: PostgreSQL; setup a database
 
29
.. 
 
30
 
 
31
Setup a PostgreSQL user
 
32
+++++++++++++++++++++++
 
33
 
 
34
When the installations of the required software are done, you have to create a
 
35
PostgreSQL user. Open ERP will use this user to connect to PostgreSQL.
 
36
 
 
37
Add a user
 
38
++++++++++
 
39
 
 
40
The default superuser for PostgreSQL is called *postgres*. We will use it below
 
41
as an example. If you wish to use it as well, you may need to login as this
 
42
user first. ::
 
43
 
 
44
    johndoe$ sudo su - postgres
 
45
    password: XXXXXXXXXX
 
46
    postgres$ createuser --createdb --no-createrole --pwprompt openuser
 
47
    Enter password for new role: XXXXXXXXXX
 
48
    Enter it again: XXXXXXXXXX
 
49
    CREATE ROLE
 
50
    postgres$
 
51
 
 
52
, assuming you want to create the *openuser* role.
 
53
 
 
54
Option explanations:
 
55
 
 
56
  * ``--createdb`` : the new user will be able to create new databases
 
57
  * ``--username postgres`` : *createuser* will use the *postgres* user (superuser)
 
58
  * ``--no-createrole`` : the new user will not be able to create new users
 
59
  * ``--pwprompt`` : *createuser* will ask you the new user's password
 
60
  * ``openuser`` the new user's name
 
61
 
 
62
You can now start the Open ERP Server. You will probably need to modify the
 
63
Open ERP configuration file to your need.
 
64
 
 
65
.. tip:: You can find information on configuration files in the Developer Book,
 
66
   section :ref:`Configuration <configuration-files-link>`
 
67
 
 
68
Case insensitive searches issue
 
69
+++++++++++++++++++++++++++++++
 
70
 
 
71
For an installation which need full UTF8 character support consider to use
 
72
postgres >= 8.2.x. Prior to this Open ERP search will eventually not return the
 
73
expected results for case insensitive searches, which are used for searching
 
74
partners, products etc.
 
75
 
 
76
Example: ::
 
77
 
 
78
    SELECT 'x' FROM my_table WHERE 'bét' ilike 'BÉT'
 
79
    --matches only in 8.2.x
 
80