Howto install Mir on Debian
long version:
http://docs.indymedia.org/view/Devel/MiRInstall
old version:
http://docs.indymedia.org/view/Devel/MiRInstallDebianOld
original version was sarge 2005-12-05, adjusted for etch 2007-12-06
1. install packages
add "non-free" to /etc/apt/sources.list
# aptitude install sun-java5-jdk ant apache2 libapache2-mod-jk tomcat5.5 postgresql cvs imagemagick
and maybe these additional packages, if you like to have a tomcat interface:
# aptitude install tomcat5.5-admin tomcat5.5-webapps
2. configure java
# update-alternatives --config java
3 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
# update-alternatives --config javac
1 /usr/lib/jvm/java-1.5.0-sun/bin/javac
3. configure tomcat
# export TOMCAT_HOME=/usr/share/tomcat5.5/
(add line also to /etc/profile)
edit /etc/default/tomcat5.5
TOMCAT5_SECURITY=no
# /etc/init.d/tomcat5.5 restart
check
http://localhost:8180/ if tomcat is working
4. get mir (do as user, not root)
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 de.indy-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
5. update templates (also de.indy-specific)
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/
/var/www/cms/site$ ln -s ../neotemplates/site/mobile/
6. configure mir
/var/www/cms/mir/etc$ cp config.properties-dist config.properties
adjust config.properties to your likings!
edit line Mir.Localizer (and remove # before)
"Mir.Localizer=Localizer"
7. compile
/var/www/cms/mir$ ant
Symlink your new application in tomcats webapps-directory
# ln -s /var/www/cms/mir/bin/mir/ /var/lib/tomcat5.5/webapps/mir
# /etc/init.d/tomcat55 restart
check
http://localhost:8180/mir - you should see db errors because there is no db yet
8. 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
9. create db
edit /etc/postgresql/7.4/main/pg_hba.conf
"host [dbname] [user] 127.0.0.1 255.255.255.255 md5"
edit /etc/postgresql/7.4/main/postgresql.conf
tcpip_socket = true
# /etc/init.d/postgresql-7.4 restart
/var/www/cms/mir/dbscripts# sudo -u postgres ./createmirdb.sh [dbname] postgres [dbuser] [dbpw]
(as in config.properties - adjust that here at latest)
# /etc/init.d/tomcat5.5 restart
10. configure apache2
# a2enmod include
# a2enmod ssl
# openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/server.pem -keyout /etc/apache2/ssl/server.key
edit /etc/apache2/ports.conf
Listen 443
edit /etc/apache2/sites-available/[yourvhost]
<VirtualHost *:443>
ServerName dev.de.indymedia.org
DocumentRoot /var/www/cms/site
JkMount /mir ajp13
JkMount /mir/* ajp13
ServerAdmin webmaster@localhost
ServerSignature Off
<Directory /var/www/cms/site>
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
DirectoryIndex index.html index.htm index.shtml
Options FollowSymLinks +Includes IncludesNoExec
AllowOverride None
ErrorDocument 404 /static/404.shtml
</Directory>
<IfModule mod_ssl.c>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
</IfModule>
</VirtualHost>
# ln -s /etc/apache2/sites-available/[yourvhost] /etc/apache2/sites-enabled/
/etc/init.d/apache2 restart
11. misc
- /var/www/cms/site should be writable by tomcat55 user
- evt. adapt the articletypes in the database to these used in your producers.xml
12. profit!
done
to top