more spelling fixes
[mir.git] / doc / INSTALL.mir
1 Here is a short installation-howto of Mir.
2
3
4 prerequisites: 
5
6 - tomcat 
7 - apache with mod_jk.so 
8 - postgres 7.1.x
9 - ant (a java-based make) 
10
11
12 1. checkout the cvs
13
14 CVS LOGIN:
15
16         cvs -d :pserver: cvsanon@brazil.indymedia.de:/var/cvs login 
17         password: cvs 
18
19 CVS CHECKOUT:
20
21         cvs -d :pserver: cvsanon@brazil.indymedia.de:/var/cvs co mir 
22
23
24 2. customize the config: 
25
26         cd mir/source 
27         cp config.properties-dist config.properties 
28
29 now customize config.properties for your needs.
30
31
32 3. configure the build.sh file with java_home
33         cp build.sh-dist build.sh 
34         chmod 755 build.sh
35
36
37 4. copy the mir/templates-dist-directory to mir/templates
38
39
40 5. compile
41         sh build.sh 
42
43
44 6. Link in the webapps directory of tomcat to the install directory (the 
45 directory is called "Mir" and is located in the same directory in which 
46 you installed the "mir" directory). 
47         cd /usr/share/tomcat/webapps
48         ln -s Mir-install-dir Mir
49
50 7. Modify your tomcat startup script and add an LD_LIBRARY_PATH variable
51 that points to the WEB-INF/lib directory of your Mir install dir. (called
52 "Mir"). Add something like the following at the top of tomcat.sh (tomcat.sh
53 is found in the "bin/" dir. under $TOMCAT_HOME):
54     LD_LIBRARY_PATH=/path/to/Mir-install-dir/WEB-INF/lib
55
56 An alternaive way to avoid this is to copy any dynamic library files 
57 ending with ".so" in WEB-INF/lib to your jre/jdk lib directory (where the 
58 other ".so" files live). Or, you can skip the whole thing and live without
59 "native" acceleration for image manipulation
60
61
62 8. create a new database 
63 the database name should be the same as in config.properties
64 as user postgres: 
65         createdb dbname 
66
67
68 9. create base table
69         psql -Upostgres dbname < dbscripts/create_pg.sql
70         cat dbscripts/help*.sql | psql -Upostgres dbname
71         cat dbscripts/populate*.sql | psql -Upostgres dbname
72
73 10. Add the dupe prevention trigger to the database:
74         cd dbscripts/dupetrigger
75         
76         There, read INSTALL and follow the instructions.
77         
78
79 11. Set permissions
80         We provide a script that sets all files' and direcories' permissions to
81         a quite reasonable state.
82         
83         cp perms.sh-dist perms.sh
84         # Now, change the install directory and group in perms.sh
85         edit perms.sh 
86         ./perms.sh
87
88
89 12. restart tomcat 
90
91 13. configure mod_jk 
92
93 insert the following patch into /etc/apache/httpd.conf. Edit the directories
94 to suit your needs.
95
96 <IfModule mod_jk.c>
97 JkWorkersFile /usr/share/tomcat/conf/workers.properties
98 Include /usr/share/tomcat/conf/mod_jk.conf-auto
99 </IfModule>
100
101 Do not put any JkMount lines into your httpd.conf!
102
103 If mod_jk.conf-auto doesn't get written or is 0 bytes in size, check your
104 system for file ownership/permissions problems.
105
106
107 14. Add a password to your PostgreSQL user and link it to Mir (optional)
108
109 Add a hard to guess password to the PostgreSQL user database:
110
111 # psql -U postgres Mir
112 alter user postgres with password 'yourpassword';
113
114
115 Then, in /etc/postgresql/pg_hba.conf you should make sure that nobody can
116 use the database without a password:
117
118 local            all                                                                               password
119 host         all         127.0.0.1     255.0.0.0           password
120 host         all         0.0.0.0       0.0.0.0             reject
121
122
123 Then, change the database password line in config.properties:
124
125 Database.Username=postgres
126 Database.Password=yourpassword
127
128 You should make sure that no copy of config.properties (neither in mir nor
129 in Mir/src nor in Mir/WEB-INF/classes) is world-readable. Else you wouldn't
130 have to install a password, anyway.
131
132 If you can't access PostgreSQL after this for any reason, try to change
133 "password" in /etc/postgresql/pg_hba.conf into "trust". This should disable
134 any authentication method and make the database accessible again.
135
136 that's it :)
137
138 now the admin-application is accesable via:  
139
140         http://host/Mir 
141
142 and the openposting-servlet via  
143         
144         http://host/OpenMir
145
146 standard login is redaktion/indymedia