first cut of merge of STABLE-pre1_0 into HEAD. I won't even guarantee that it
[mir.git] / doc / INSTALL.postgresql
1 postgresql - installation doku - version 7.1.x
2 -------------------------------------------------------------------------------------
3
4 prerequisites:
5
6 we installed postgres on machines with debian / kernel 2.2 / jdk 1.3 (blackdown),
7 make sure you don't have postgresql installed via debian / apt-get. if you do
8 purge the installation. 
9
10 the following things have to be done as superuser (if not otherwise stated):
11
12
13 1.  make sure you have:
14
15         libreadline-dev
16         perl-dev
17         ant >= 1.3
18         (blackdown) jdk1.3
19
20 2.  get the tarball from postgresql.org
21     
22         tar xvfz postgresql-7.1.3.tar.gz
23
24 3. configure
25
26         ./configure --enable-odbc --enable-syslog --with-perl --enable-multibyte=UNICODE \
27                     --enable-locale --enable-unicode-conversion --enable-recode --with-java
28
29 4. make
30
31  two problems with the compilation of the jdbc-driver might occur:
32
33  a) an error message "no modern / no classic-compiler"
34     to get rid of this error you have to set a link in 
35
36     /usr/lib/j2re/lib/ext     
37     to: /usr/lib/j2sdk/lib/tools.jar 
38
39  b) an error message "zip-file must have at least one entry"
40     to get rid of this error: make sure you have ant-1.3 installed
41
42 5. make install
43
44 6. pg_dumplo
45
46 you should install "pg_dumplo" from the contrib part of the postgresql-source.
47 this little programm enables you to dump the database *including* the oid (blobs). 
48
49    cd contrib/pg_dumplo
50    make
51    make install
52
53 7. the start-scripts
54
55 change to the start-scripts folder in the contrib-part.
56
57    cd ../start-scripts
58    cp linux /etc/init.d/postgresql
59    chmod a+x /etc/init.d/postgresql
60    update-rc.d postgresql defaults 
61         
62    edit the start-script in /etc/init.d/postgresql, and make sure 
63    postgresql is started with the "-i" option. to enable this insert
64    '-o "-i"' after 'start', which should look like:
65    
66         start) 
67                 $ECHO_N "Starting PostgreSQL: "$ECHO_C 
68                 su - $PGUSER -c "$DAEMON start -o '-i' -D '$PGDATA' -s -l PGLOG" 
69                 echo "ok" 
70                 ;; 
71
72
73
74 8. adding a user / starting the database
75
76    adduser postgres
77    passwd postgres
78    mkdir /usr/local/pgsql/data
79    chown postgres /usr/local/pgsql/data
80    su - postgres
81    /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
82
83    /etc/init.d/postgresql start
84    /usr/local/pgsql/bin/createdb test
85    /usr/local/pgsql/bin/psql test
86
87
88 Fine! - now you can continue with the postgresql-section in INSTALL.mir
89 Good luck.
90
91
92