no message
[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. the following things have to be down as superuser.
9
10
11 1. get the tarball from postgresql.org
12
13 2. unzip/untar the tarball
14
15 3. configure
16
17 ./configure --enable-odbc --enable-syslog --with-perl --enable-multibyte=UNICODE --enable-locale --enable-unicode-conversion --enable-recode --with-java
18
19 4. make
20
21  two problems with the compilation of the jdbc-driver might occur:
22
23  a) an error message "no modern / no classic-compiler"
24     to get rid of this error you have to set a link in 
25
26     /usr/lib/j2re/lib/ext     
27     to: /usr/lib/j2sdk/lib/tools.jar 
28
29  b) an error message "zip-file must have at least one entry"
30     to get rid of this error: make sure you have ant-1.3 installed
31
32 5. make install
33
34 6. pg_dumplo
35
36 you should install "pg_dumplo" from the contrib part of the postgresql-source.
37 this little programm enables you to dump the database *including* the oid (blobs). 
38
39    cd contrib/pg_dumplo
40    make
41    make install
42
43 7. the start-scripts
44
45 change to the start-scripts folder in the contrib-part.
46
47    cd ../start-scripts
48    cp linux /etc/init.d/postgresql
49    chmod a+x /etc/init.d/postgresql
50    update-rc.d postgresql defaults 
51         
52    edit the start-script in /etc/init.d/postgresql, and make sure 
53    postgresql is started with the "-i" option. to enable this insert
54    '-o "-i"' after 'start', which should look like:
55    
56         start) 
57                 $ECHO_N "Starting PostgreSQL: "$ECHO_C 
58                 su - $PGUSER -c "$DAEMON start -o '-i' -D '$PGDATA' -s -l PGLOG" 
59                 echo "ok" 
60                 ;; 
61
62
63
64 8. adding a user / starting the database
65
66    adduser postgres
67    passwd postgres
68    mkdir /usr/local/pgsql/data
69    chown postgres /usr/local/pgsql/data
70    su - postgres
71    /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
72
73    /etc/init.d/postgresql start
74    /usr/local/pgsql/bin/createdb test
75    /usr/local/pgsql/bin/psql test
76
77