b35d9a23073496f0ab6e493d2e762728925667e3
[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/template-dist-directory to mir/template 
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
51 7. create a new database 
52 the database name should be the same as in config.properties
53 as user postgres: 
54         createdb dbname 
55
56
57 8. create base table
58         psql -Upostgres dbname < dbscripts/create_pg.sql
59         cat dbscript/help*.sql | psql -Upostgres dbname
60         cat dbscript/populate*.sql | psql -Upostgres dbname
61
62 9. chmod 777 Mir/log 
63
64 10. restart tomcat 
65
66 11. configure mod_jk 
67
68 insert the following patch into /etc/apache/httpd.conf. Edit the directories
69 to suit your needs.
70
71 <IfModule mod_jk.c>
72 JkWorkersFile /usr/share/tomcat/conf/workers.properties
73 Include /usr/share/tomcat/conf/mod_jk.conf-auto
74 </IfModule>
75
76 Do not put any JkMount lines into your httpd.conf!
77
78 If mod_jk.conf-auto doesn't get written or is 0 bytes in size, check your
79 system for file ownership/permissions problems.
80
81
82 12. Add a password to your PostgreSQL user and link it to Mir (optional)
83
84 Add a hard to guess password to the PostgreSQL user database:
85
86 # psql -U postgres Mir
87 alter user postgres with password 'yourpassword';
88
89
90 Then, in /etc/postgresql/pg_hba.conf you should make sure that nobody can
91 use the database without a password:
92
93 local            all                                                                               password
94 host         all         127.0.0.1     255.0.0.0           password
95 host         all         0.0.0.0       0.0.0.0             reject
96
97
98 Then, change the database password line in config.properties:
99
100 Database.Username=postgres
101 Database.Password=yourpassword
102
103 You should make sure that no copy of config.properties (neither in mir nor
104 in Mir/src nor in Mir/WEB-INF/classes) is world-readable. Else you wouldn't
105 have to install a password, anyway.
106
107 If you can't access PostgreSQL after this for any reason, try to change
108 "password" in /etc/postgresql/pg_hba.conf into "trust". This should disable
109 any authentication method and make the database accessible again.
110
111 that's it :)
112
113 now the admin-application is accesable via:  
114
115         http://host/Mir 
116
117 and the openposting-servlet via  
118         
119         http://host/OpenMir
120
121 standard login is redaktion/indymedia