I found the other howto MiRInstall to be a little complicated and out-of date, so I made my own smile

ALERT! WARNING: this uses the sun non-free java development kit, but it should work with kaffe (free)

Howto install Mir on our favorite os - Debian really short version

long version: http://docs.indymedia.org/view/Devel/MiRInstall

did this with Sarge, Etch and Sid. original version was Sarge 2005-12-05, I try to regularly adjust for newer versions, check aptitude search.

down to business:

1. java

sun-java6-jdk is now available in the non-free repositories of testing and unstable, you can use aptitude install sun-java6-jdk ant or you can follow the following instructions:


# aptitude install java-package fakeroot

download "jdk-1_5_0_10-linux-i586.bin" from http://java.sun.com/

$ fakeroot make-jpkg jdk-1_5_0_10-linux-i586.bin

# dpkg -i sun-j2sdk1.5_1.5.0+update10_i386.deb

set 2 environment variables

# JAVA_HOME=/usr/lib/j2sdk1.5-sun; export JAVA_HOME

# PATH=$PATH:$JAVA_HOME/bin; export PATH

(add these lines without # to your /etc/profile as well)

# aptitude install ant

Ant is a make-like build-tool for java-projects.

2. apache2

sorry, no apache. more configuring with that.

# aptitude install apache2

3. tomcat

# aptitude install tomcat5.5 tomcat5.5-webapps tomcat5.5-admin

set 2 more environment variables

# CATALINA_HOME=/usr/share/tomcat5.5; export CATALINA_HOME


(add to /etc/profile)

# /etc/init.d/tomcat55 restart (might tell you no .pid)

edit /etc/default/tomcat5.5 - set "TOMCAT5_SECURITY=no"

check http://localhost:8180/ if tomcat is working

3a. OPTIONAL - create tomcat web app manager

edit $CATALINA_HOME/conf/tomcat-users.xml

<user name="mirmanager" password="mirmanager" roles="standard,manager" />

restart tomcat

use webinterface to restart your mir-app:

e.g. http://localhost:8180/manager/html

or use a shell-script like:

lynx http://localhost:8180/manager/html/reload?path=/mir -auth mirmanager:mirmanager -dump | grep Message -A 2

to restart your mir-app

4. postgres

# aptitude install postgresql postgresql-client postgresql-doc

debconf: use C locale

5. get mir

get mir-java-sourcecode
$ cd /var/www/cms (or whereever you like)
$ cvs -d :pserver:anonymous@cvs.codecoop.org:/cvsroot/mir login
(pw <enter>)(don't enter any password, just hit <enter>)
$ cvs -d :pserver:anonymous@cvs.codecoop.org:/cvsroot/mir checkout -r MIR_1_1 mir

Check out site-specific template-set:
$ cvs -d :pserver:anonymous@cvs.codecoop.org:/cvsroot/imc-germany login
$ cvs -d :pserver:anonymous@cvs.codecoop.org:/cvsroot/imc-germany checkout neotemplates

6. update templates (old ones)

symlink site-specific templates into /mir/etc-directory:
/var/www/cms/mir/etc$ rm -rf bundles/ extrasource/ open/ producer/
/var/www/cms/mir/etc$ ln -s ../../neotemplates/etc/bundles/
/var/www/cms/mir/etc$ ln -s ../../neotemplates/etc/extrasource/
/var/www/cms/mir/etc$ ln -s ../../neotemplates/etc/open/
/var/www/cms/mir/etc$ ln -s ../../neotemplates/etc/producer/

var/www/cms# mkdir site
/var/www/cms/site$ ln -s ../neotemplates/site/img/
/var/www/cms/site$ ln -s ../neotemplates/site/includes/
/var/www/cms/site$ ln -s ../neotemplates/site/script/
/var/www/cms/site$ ln -s ../neotemplates/site/static/
/var/www/cms/site$ ln -s ../neotemplates/site/style/

7. set up mir

/var/www/cms/mir/etc$ cp config.properties-dist config.properties

edit config.properties

add extra lines like:
"Mir.Localizer=org.indymedia.de.DeLocalizer" (or remove # before)

Your can find more Keys and Values to configure in /mir/source/default.properties. Dont change them there. Override them with your own entries in your config.properties.

8. compile

/var/www/cms/mir$ ant

Symlink your new application in tomcats webapps-directory
/usr/share/tomcat55/webapps$ ln -s /var/www/cms/mir/bin/mir/ mir

# /etc/init.d/tomcat55 restart

check http://localhost:8180/mir
you should see db errors because there is no db yet

9. set some file-permissions

so tomcat can write the produced pages and your logfiles to the disk

/var/www/cms/mir# cp perms.sh-dist perms.sh

/var/www/cms/mir# ./perms.sh

10. create db

edit /etc/postgresql/pg_hba.conf
"host    all         all   password"

# /etc/init.d/postgresql restart

/var/www/cms/mir/dbscripts# sudo -u postgres ./createmirdb.sh [dbname] postgres [dbuser] [dbpw]

(as in config.properties)
this will create a basic database you can start with

# /etc/init.d/tomcat55 restart

11. configure apache2

# a2enmod include /etc/init.d/apache2 restart

Create a virtual host, the DocumentRoot should point to the directory where you told mir to store the produced pages. If your templates use ServerSideIncludes and Symlinks, you have to enable these for the host or the directory.

12. install ImageMagick

# aptitude install imagemagick

done smile

-- AleX - 22 Aug 2005

-- BriKs - 23 Aug 2005 more secure postgres-configuration (local ident-method sameuser instead of trust all; run the createmirdb.sh-script with sudo as user postgres)

-- BriKs - 23 Aug 2005 added apache mod_include

-- InIt - 29 Aug 2005 formating / layout / some extra explanations

-- LordRich - 16 Aug 2007 s/apt-get/aptitude/g and mentioned sun-java6-jdk
Topic revision: r22 - 06 Dec 2007, AleX
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback