You are here: Foswiki>Devel Web>MiRInstallGentoo (27 Jan 2006, BriKs)Edit Attach
ALERT! WARNING: this uses the sun non-free java development kit, but it should work with kaffe (free)

how to install Mir in my favorite os - gentoo

(a bit de.indy-specific)

remark: in gentoo it would probably be useful to emerge all the software in one step and then going drink some coffees.
# emerge apache tomcat postgresql dev-java/ant cvs etc...

1. apache

# emerge apache

2. tomcat5 + java-stuff

# emerge tomcat
# /etc/init.d/tomcat5 start

check http://localhost:8080/ whether tomcat is working

3a. OPTIONAL - create tomcat web app manager

edit /opt/tomcat5/conf/tomcat-users.xml
add: <user username="mirmanager" password="mirmanager" roles="standard,manager"/>
# /etc/init.d/tomcat5 restart

use webinterface to restart your mir-app:
e.g. http://localhost:8080/manager/html 
or use a shell-script like:
 lynx http://localhost:8080/manager/html/reload?path=/mir -auth mirmanager:mirmanager -dump | grep Message -A 2
to restart your mir-app 

4. postgres

# emerge postgresql
# mkdir -p /var/lib/postgresql
# chown postgres /var/lib/postgresql
# su - postgres -c "initdb -D /var/lib/postgresql/data"
# /etc/init.d/postgresql start

5. cvs and ant (java-"make")

# emerge cvs
# emerge dev-java/ant

6. get mir

# mkdir /var/www/cms
(you might change permissions of /var/www/cms)
$ cd /var/www/cms
$ cvs -d login
(pw <enter>)
$ cvs -d checkout -r MIR_1_1 mir
$ cvs -d login
$ cvs -d checkout templates

7. update templates

/var/www/cms/mir/etc$ rm -rf bundles/ extrasource/ open/ producer/
/var/www/cms/mir/etc$ ln -s ../../templates/etc/bundles/
/var/www/cms/mir/etc$ ln -s ../../templates/etc/extrasource/
/var/www/cms/mir/etc$ ln -s ../../templates/etc/open/
/var/www/cms/mir/etc$ ln -s ../../templates/etc/producer/

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

8. set up mir

/var/www/cms/mir/etc$ cp
add line "" (or remove # before)
 "project" by "cms"
 "" by "localhost"
 "/servlet/Mir" by "/mir/Mir"
 "/servlet/OpenMir" by ":8080/mir/OpenMir"

9. compile

(you might add it to .bashrc of the user compiling mir for the future)
# chmod +x /opt/tomcat5   /// alternative: add the compile-user to the tomcat-group
$ ant
/opt/tomcat5/webapps$ ln -s /var/www/cms/mir/bin/mir/ mir
# /etc/init.d/tomcat5 restart

check http://localhost:8080/mir - you should see db errors

10. set perms

#groupadd www-data
/var/www/cms/mir # cp
/var/www/cms/mir # ./
edit /etc/group
append the www-data line with the usernames apache and tomcat are running with:
// this part doesn't work!, don't know why tomcat won't run as group www-data
// edit /etc/passwd
// edit the G(roup)ID-field (behind the 3rd ':') and replace the value with the group-ID (eg. 409)
# chgrp www-data /var/www/cms/site
# chmod g+w /var/www/cms/site

10. create db

/var/www/cms/mir/dbscripts $ ./ Mir postgres miruser blahblahpassword
(miruser and blahblahpassword as in

11. configure apache

edit /etc/apache2/conf/apache2.conf
 DocumentRoot /var/www/cms/site
edit /etc/apache2/conf/commonapache2.conf
 add "index.shtml" into the DirectoryIndex-list
(the gentoo apache2 default configuration seems quite crappy. it might be better to write it new from scratch.)
change "Group apache" to "Group www-data"

12. imagemagick

# emerge imagemagick

-- BriKs - 28 Aug 2005
Topic revision: r3 - 27 Jan 2006, BriKs
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