~openerp-chinese-team/openobject-doc/Chinese-init

« back to all changes in this revision

Viewing changes to i18n/zh_CN/source/install/windows/postgres/index.rst

  • Committer: JoshuaJan
  • Date: 2012-12-04 01:36:44 UTC
  • Revision ID: popkar77@gmail.com-20121204013644-k25kpyac672wxe22
Chinese initialization

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
.. i18n: .. index::
 
3
.. i18n:    single: Installation; PostgreSQL (Windows)
 
4
.. i18n:    single: PostgreSQL; Installation (Windows)
 
5
.. i18n: .. 
 
6
..
 
7
 
 
8
.. index::
 
9
   single: Installation; PostgreSQL (Windows)
 
10
   single: PostgreSQL; Installation (Windows)
 
11
.. 
 
12
 
 
13
.. i18n: .. _installation-windows-postgresql-server:
 
14
.. i18n: 
 
15
.. i18n: PostgreSQL Server Installation and Configuration
 
16
.. i18n: ================================================
 
17
..
 
18
 
 
19
.. _installation-windows-postgresql-server:
 
20
 
 
21
PostgreSQL Server Installation and Configuration
 
22
================================================
 
23
 
 
24
.. i18n: In this chapter, you will see how to configure PostgreSQL for its use with OpenERP. The following procedure is well-tested on PostgreSQL v9.0.
 
25
..
 
26
 
 
27
In this chapter, you will see how to configure PostgreSQL for its use with OpenERP. The following procedure is well-tested on PostgreSQL v9.0.
 
28
 
 
29
.. i18n: Installing PostgreSQL Server
 
30
.. i18n: ----------------------------
 
31
..
 
32
 
 
33
Installing PostgreSQL Server
 
34
----------------------------
 
35
 
 
36
.. i18n: You can download the Windows installer from
 
37
.. i18n: the `PostgreSQL download page <http://www.postgresql.org/download/windows>`__
 
38
..
 
39
 
 
40
You can download the Windows installer from
 
41
the `PostgreSQL download page <http://www.postgresql.org/download/windows>`__
 
42
 
 
43
.. i18n: Depending on your need, choose either the *One Click Installer* or the
 
44
.. i18n: *pgInstaller* and run the executable you have just downloaded.
 
45
..
 
46
 
 
47
Depending on your need, choose either the *One Click Installer* or the
 
48
*pgInstaller* and run the executable you have just downloaded.
 
49
 
 
50
.. i18n: .. index::
 
51
.. i18n:    single: PostgreSQL; setup a user (Windows)
 
52
.. i18n:    single: PostgreSQL; setup a database (Windows)
 
53
.. i18n: .. 
 
54
..
 
55
 
 
56
.. index::
 
57
   single: PostgreSQL; setup a user (Windows)
 
58
   single: PostgreSQL; setup a database (Windows)
 
59
.. 
 
60
 
 
61
.. i18n: Setup a PostgreSQL User
 
62
.. i18n: -----------------------
 
63
..
 
64
 
 
65
Setup a PostgreSQL User
 
66
-----------------------
 
67
 
 
68
.. i18n: When the required software installations are complete, you must create a
 
69
.. i18n: PostgreSQL user. OpenERP will use this user to connect to PostgreSQL.
 
70
..
 
71
 
 
72
When the required software installations are complete, you must create a
 
73
PostgreSQL user. OpenERP will use this user to connect to PostgreSQL.
 
74
 
 
75
.. i18n: Add a User
 
76
.. i18n: ++++++++++
 
77
..
 
78
 
 
79
Add a User
 
80
++++++++++
 
81
 
 
82
.. i18n: Start a Windows console (run the ``cmd`` command in the *Search programs and files* text box of the *Start* menu).
 
83
..
 
84
 
 
85
Start a Windows console (run the ``cmd`` command in the *Search programs and files* text box of the *Start* menu).
 
86
 
 
87
.. i18n: Change the directory to the *PostgreSQL* ``bin`` directory
 
88
.. i18n: (e.g. ``C:\Program Files\PostgreSQL\9.0\bin``) or add this directory to 
 
89
.. i18n: your *PATH* environment variable.
 
90
..
 
91
 
 
92
Change the directory to the *PostgreSQL* ``bin`` directory
 
93
(e.g. ``C:\Program Files\PostgreSQL\9.0\bin``) or add this directory to 
 
94
your *PATH* environment variable.
 
95
 
 
96
.. i18n: The default superuser for PostgreSQL is called *postgres*. The password was
 
97
.. i18n: chosen during the PostgreSQL installation.
 
98
..
 
99
 
 
100
The default superuser for PostgreSQL is called *postgres*. The password was
 
101
chosen during the PostgreSQL installation.
 
102
 
 
103
.. i18n: In your Windows console, type::
 
104
.. i18n: 
 
105
.. i18n:     C:\Program Files\PostgreSQL\9.0\bin>createuser.exe --createdb --username postgres --no-createrole --pwprompt openpg
 
106
.. i18n:     Enter password for new role: openpgpwd
 
107
.. i18n:     Enter it again: openpgpwd
 
108
.. i18n:     Shall the new role be a superuser? (y/n) y
 
109
.. i18n:     Password: XXXXXXXXXX
 
110
.. i18n: 
 
111
.. i18n:   * line 1 is the command itself
 
112
.. i18n:   * line 2 asks you the new user's password
 
113
.. i18n:   * line 3 asks you to confirm the new user's password
 
114
.. i18n:   * line 4 new role is superuser or not?
 
115
.. i18n:   * line 5 asks you the *postgres* user's password
 
116
..
 
117
 
 
118
In your Windows console, type::
 
119
 
 
120
    C:\Program Files\PostgreSQL\9.0\bin>createuser.exe --createdb --username postgres --no-createrole --pwprompt openpg
 
121
    Enter password for new role: openpgpwd
 
122
    Enter it again: openpgpwd
 
123
    Shall the new role be a superuser? (y/n) y
 
124
    Password: XXXXXXXXXX
 
125
 
 
126
  * line 1 is the command itself
 
127
  * line 2 asks you the new user's password
 
128
  * line 3 asks you to confirm the new user's password
 
129
  * line 4 new role is superuser or not?
 
130
  * line 5 asks you the *postgres* user's password
 
131
 
 
132
.. i18n: Option explanations:
 
133
..
 
134
 
 
135
Option explanations:
 
136
 
 
137
.. i18n:   * ``--createdb`` : the new user will be able to create new databases
 
138
.. i18n:   * ``--username postgres`` : *createuser* will use the *postgres* user (superuser)
 
139
.. i18n:   * ``--no-createrole`` : the new user will not be able to create new users
 
140
.. i18n:   * ``--pwprompt`` : *createuser* will ask you the new user's password
 
141
.. i18n:   * ``openpg`` : the new user's name. Alternatively, you may specify a different username.
 
142
.. i18n:   * ``openpgpwd`` : the new user's password. Alternatively, you may specify a different password.
 
143
..
 
144
 
 
145
  * ``--createdb`` : the new user will be able to create new databases
 
146
  * ``--username postgres`` : *createuser* will use the *postgres* user (superuser)
 
147
  * ``--no-createrole`` : the new user will not be able to create new users
 
148
  * ``--pwprompt`` : *createuser* will ask you the new user's password
 
149
  * ``openpg`` : the new user's name. Alternatively, you may specify a different username.
 
150
  * ``openpgpwd`` : the new user's password. Alternatively, you may specify a different password.
 
151
 
 
152
.. i18n: .. note:: Password
 
153
.. i18n: 
 
154
.. i18n:    In OpenERP v6, ``openpg`` and ``openpgpwd`` are the default username and password used during the OpenERP Server installation. If you plan to change these defaults for the server, or have already installed the server with different values, you have to use those user configuration values when you create a PostgreSQL user for OpenERP.
 
155
.. i18n:   
 
156
.. i18n: Now use *pgAdmin III* to create database "openerpdemo" with owner "openpg":: 
 
157
.. i18n:  
 
158
.. i18n:  CREATE DATABASE openerpdemo WITH OWNER = openpg ENCODING = 'UTF8';
 
159
.. i18n:  COMMENT ON DATABASE openerpdemo IS 'OpenERP Demo DB';
 
160
.. i18n:   
 
161
.. i18n: If you have installed the OpenERP Server, you can start it now. If needed, you can override the server configuration by starting the server at a Windows console and specifying command-line options. For more on this, refer the section :ref:`sect-custconf`.
 
162
..
 
163
 
 
164
.. note:: Password
 
165
 
 
166
   In OpenERP v6, ``openpg`` and ``openpgpwd`` are the default username and password used during the OpenERP Server installation. If you plan to change these defaults for the server, or have already installed the server with different values, you have to use those user configuration values when you create a PostgreSQL user for OpenERP.
 
167
  
 
168
Now use *pgAdmin III* to create database "openerpdemo" with owner "openpg":: 
 
169
 
 
170
 CREATE DATABASE openerpdemo WITH OWNER = openpg ENCODING = 'UTF8';
 
171
 COMMENT ON DATABASE openerpdemo IS 'OpenERP Demo DB';
 
172
  
 
173
If you have installed the OpenERP Server, you can start it now. If needed, you can override the server configuration by starting the server at a Windows console and specifying command-line options. For more on this, refer the section :ref:`sect-custconf`.
 
174
 
 
175
.. i18n: To change a user's password in any Windows version, execute the following::
 
176
.. i18n: 
 
177
.. i18n:   net user <accountname> <newpassword>
 
178
.. i18n:   e.g. net user postgres postgres
 
179
..
 
180
 
 
181
To change a user's password in any Windows version, execute the following::
 
182
 
 
183
  net user <accountname> <newpassword>
 
184
  e.g. net user postgres postgres
 
185
 
 
186
.. i18n: If it is a domain account, just add "/DOMAIN" at the end.
 
187
..
 
188
 
 
189
If it is a domain account, just add "/DOMAIN" at the end.
 
190
 
 
191
.. i18n: If you want to delete it, just execute::
 
192
.. i18n: 
 
193
.. i18n:   net user <accountname> /delete
 
194
..
 
195
 
 
196
If you want to delete it, just execute::
 
197
 
 
198
  net user <accountname> /delete
 
199
 
 
200
.. i18n: Case-Insensitive Search Issue
 
201
.. i18n: +++++++++++++++++++++++++++++
 
202
..
 
203
 
 
204
Case-Insensitive Search Issue
 
205
+++++++++++++++++++++++++++++
 
206
 
 
207
.. i18n: For an installation which needs full UTF8 character support, consider using
 
208
.. i18n: postgres >= 8.2.x. Using versions prior to this, OpenERP search will not return the
 
209
.. i18n: expected results for case-insensitive searches, which are used for searching
 
210
.. i18n: partners, products etc.
 
211
..
 
212
 
 
213
For an installation which needs full UTF8 character support, consider using
 
214
postgres >= 8.2.x. Using versions prior to this, OpenERP search will not return the
 
215
expected results for case-insensitive searches, which are used for searching
 
216
partners, products etc.
 
217
 
 
218
.. i18n: Example: ::
 
219
.. i18n: 
 
220
.. i18n:     SELECT 'x' FROM my_table WHERE 'bét' ilike 'BÉT'
 
221
.. i18n:     --matches only in 8.2.x
 
222
..
 
223
 
 
224
Example: ::
 
225
 
 
226
    SELECT 'x' FROM my_table WHERE 'bét' ilike 'BÉT'
 
227
    --matches only in 8.2.x