1 Here is a short installation-howto of Mir.
7 - apache with mod_jk.so
9 - ant (a java-based make)
10 - jaxp-1.1 (a SAX 2.0 compliant XML parser, comes with ant >= 1.4)
16 cvs -d :pserver: cvsanon@brazil.indymedia.de:/var/cvs login
21 cvs -d :pserver: cvsanon@brazil.indymedia.de:/var/cvs co mir
24 2. customize the config:
27 cp config.properties-dist config.properties
29 now customize config.properties for your needs.
32 3. configure the build.xml file if neccessary
34 cp build.xml-new build.xml
37 4. configure the perms.sh file if neccessary -- IMPORTANT! READ THIS!
38 We provide a script that sets all files' and direcories' permissions to
39 a quite reasonable state. This script gets automagically called by
40 ant after compilationl. The most important thing you have to do after
41 compiling Mir is to ensure that the log files -- especially
42 dbentity.log -- are not readable by users that could compromise
43 system security, because all passwords and the like will be logged here.
45 cp perms.sh-dist perms.sh
47 Now, change the install directory and group in perms.sh
52 5. copy the mir/templates-dist-directory to mir/templates
56 Do this as root so the permissions script is able to set
57 the permissions and owners correctly.
62 7. Link in the webapps directory of tomcat to the install directory (the
63 directory is called "Mir" and is located in the same directory in which
64 you installed the "mir" directory).
65 cd /usr/share/tomcat/webapps
66 ln -s Mir-install-dir Mir
68 8. Modify your tomcat startup script and add an LD_LIBRARY_PATH variable
69 that points to the WEB-INF/lib directory of your Mir install dir. (called
70 "Mir"). Add something like the following at the top of tomcat.sh (tomcat.sh
71 is found in the "bin/" dir. under $TOMCAT_HOME):
72 LD_LIBRARY_PATH=/path/to/Mir-install-dir/WEB-INF/lib
74 An alternaive way to avoid this is to copy any dynamic library files
75 ending with ".so" in WEB-INF/lib to your jre/jdk lib directory (where the
76 other ".so" files live). Or, you can skip the whole thing and live without
77 "native" acceleration for image manipulation
80 9a. create a new database
81 The database name should be the same as in config.properties. Please look at
82 the section "Database.*" to look up the names or change them to your needs.
84 It is wise in terms of system seurity to use an unprivileged user for this
85 task instead of the superuser. This is because if Mir uses the superuser to
86 connect to the database and anybody manages to find out the password Mir
87 uses to connect, the attacker can take over the complete database. So, in
88 the following examples, we assume that the database name is "Mir", the
89 database user will be "mir" and the password is "joshua". Please note that
90 this particular password is far from being a good one. Watch "Wargames" for
93 To access the database as the database superuser, you either have to log in
94 as postgres on Unix level (which we don't recommend because you will need
95 another user to have a login shell and a password which makes system
96 penetration more likely) or you have to tell PostgreSQL with each
97 application call that you want to connect as a specific user. If you access
98 the database from any other user's account, use the -U flag to connect to
99 PostgreSQL as the database superuser ("postgres"):
101 createdb -U postgres Mir
103 Please note that if you create the database from inside the psql application,
104 the database name will likely be converted to lowercase letters.
107 9b. create an unprivileged database user for Mir
108 First, connect to the database as the database's superuser.
112 Now we create the actual user. Please choose a password that is hard to
113 guess instead of "joshua". Good passwords have characters and numerals in
114 it, have no link to its owner (like being her birthday, age, name of her
115 husband, dog, child, car, favourite beer brand). A good password looks like
118 CREATE USER Mir WITH PASSWORD 'joshua' NOCREATEDB NOCREATEUSER;
121 9c. create base table
122 Please note that we use the superuser "postgres" to connect to the "Mir"
123 database, /not/ the user "mir".
125 psql -Upostgres -f dbscripts/create_pg.sql Mir
126 for i in dbscripts/help*.sql ; do psql -Upostgres -f $i Mir ; done
127 for i in dbscripts/populate*.sql ; do psql -Upostgres -f $i Mir ; done
130 9d. Apply neccessary changes to config.properties
132 Please open config.properties and look for the lines that begin with
133 "Database.". The interesting properties are "Username", "Password", "Host"
134 and "Name". Change these properties so that they reflect the settings you
135 used to create the database and the user.
137 You should make sure that no copy of config.properties (neither in mir nor
138 in Mir/src nor in Mir/WEB-INF/classes nor in the directory tree you compiled
139 Mir from) is world-readable. Else you wouldn't have to install a password,
143 9e. Setup PostgreSQL so that all connections have to pass a password
145 In /etc/postgresql/pg_hba.conf you should make sure that nobody can
146 use the database without a password:
149 host all 127.0.0.1 255.0.0.0 password
150 host all 0.0.0.0 0.0.0.0 reject
152 This means: All local connections (i.e. psql without "-h hostname" option)
153 have to authenticate themselves with a password. All connections from
154 localhost (127.0.0.1) have to supply a password, too. All other connections
155 are rejected. This line doen't have to be there if you have a properly
156 configured firewall but even if you do have one, it adds to the security in
157 case an attacker penetrates the firewall by some hack.
159 If you can't access PostgreSQL after this for any reason, try and change
160 "password" in /etc/postgresql/pg_hba.conf to "trust". This should disable
161 any authentication method and make the database accessible again. Please use
162 this setting only temporarily because anybody who can access the PostgreSQL
163 server could take over the database completely this way. After you fixed
164 your password setting, switch the setting back to "password".
165 You may want to change your PostgreSQL password from time to time to make
166 database takeover harder. Rememer: Security is a process.
170 10. Add the dupe prevention trigger to the database:
171 cd dbscripts/dupetrigger
173 There, read INSTALL and follow the instructions.
180 insert the following patch into /etc/apache/httpd.conf. Edit the directories
184 JkWorkersFile /usr/share/tomcat/conf/workers.properties
185 Include /usr/share/tomcat/conf/mod_jk.conf-auto
188 Do not put any JkMount lines into your httpd.conf!
190 If mod_jk.conf-auto doesn't get written or is 0 bytes in size, check your
191 system for file ownership/permissions problems.
197 now the admin-application is accesable via:
201 and the openposting-servlet via
205 standard login is redaktion/indymedia
211 You can give these a try if anything goes wrong:
213 + Restart Tomcat. Especially after compiling the sources Tomcat has to be
216 + Check file permissions and ownership. Try and run perms.sh.