You are here: Foswiki>Devel Web>MiRInstallFreeBSD (09 May 2006, AleX)Edit Attach
same as - just for FreeBSD smile

i'm doing this with 6.0-RELEASE

1. java

# pkg_add -r javavmwrapper

get diablo-jdk-freebsd6- from

# pkg_add diablo-jdk-freebsd6-

(check $ java -version)

# mkdir -p /usr/local/jdk1.4.2/bin/

# cd /usr/local/jdk1.4.2/bin

# ln -s ../../diablo-jdk1.5.0/bin/java

2. tomcat

# pkg_add -r tomcat55

# cd /usr/local/jakarta-tomcat5.5/conf

# ls -d *.sample | sed 's/\(.*\).sample$/mv "&" "\1"/' | sh

set environment variables (this is for bash, adjust for your shell)

  • # CATALINA_HOME=/usr/local/jakarta-tomcat5.5; export CATALINA_HOME


add those 2 lines (without , export...) to ~/.profile

add jakarta_tomcat55_enable="YES" to /etc/rc.conf

# /usr/local/etc/rc.d/ start

# netstat -na | grep 8180

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

3. get mir

get mir 1.1

$ cd /usr/local/www (or whereever you like)

$ cvs -d login

(don't enter any password, just hit "enter")

$ cvs -d checkout -r MIR_1_1 mir

get templates

$ cvs -d login

$ cvs -d checkout neotemplates

4. update templates (old ones)

symlink site-specific templates into /mir/etc-directory:

/usr/local/www/mir/etc$ rm -rf bundles/ extrasource/ open/ producer/
/usr/local/www/mir/etc$ ln -s ../../neotemplates/etc/bundles
/usr/local/www/mir/etc$ ln -s ../../neotemplates/etc/extrasource
/usr/local/www/mir/etc$ ln -s ../../neotemplates/etc/open
/usr/local/www/mir/etc$ ln -s ../../neotemplates/etc/producer

/usr/local/www$ mkdir site
/usr/local/www/site$ ln -s ../neotemplates/site/img
/usr/local/www/site$ ln -s ../neotemplates/site/includes
/usr/local/www/site$ ln -s ../neotemplates/site/script
/usr/local/www/site$ ln -s ../neotemplates/site/static
/usr/local/www/site$ ln -s ../neotemplates/site/style

5. set up mir

/usr/local/www/mir/etc$ cp


add line:


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

6. compile

/usr/local/www/mir$ ant

Symlink your new application in tomcats webapps-directory

/usr/local/jakarta-tomcat5.5/webapps/# ln -s /usr/local/www/mir/bin/mir/ mir

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

7. set some file-permissions

/usr/local/www/mir# cp

/usr/local/www/mir# ./ (doesn't work!)

/usr/local/www/# chmod -R 777 site/ (euh, this should really not be done in a production environment)

8. postgres

# pkg_add -r postgresql80-server postgresql80-client

add postgresql_enable="YES" to /etc/rc.conf

# /usr/local/etc/rc.d/ initdb

# /usr/local/etc/rc.d/ start

9. create db

edit /usr/local/www/mir/dbscripts/

replace #!/bin/bash with #!/usr/local/bin/bash

/usr/local/www/mir/dbscripts# sudo -u pgsql ./ [dbname] pgsql [dbuser] [dbpw]

(as in

you can now enter your admin on http://localhost:8180/mir/servlet/Mir using admin:indymedia (change this!)

10. http daemon

use your favorite..

# pkg_add -r lighttpd

add lighttpd_enable="YES" to /etc/rc.conf

# mv /usr/local/etc/lighttpd.conf.sample /usr/local/etc/lighttpd.conf

edit /usr/local/etc/lighttpd.conf

  • uncomment "mod_ssi",

  • add "index.shtml", to server.indexfiles

  • uncomment ssi.extension

  • change server.document-root to "/usr/local/www/site/"

# touch /var/log/lighttpd.error.log

# chmod 666 /var/log/lighttpd.access.log

# chmod 666 /var/log/lighttpd.error.log

# /usr/local/etc/rc.d/ start

12. install ImageMagick

# pkg_add -r imagemagick

done smile

not working paths i went

old java-way

this is the original freebsd way for java, but as of 2006-04-05 there's an easier way

# cd /usr/ports/java/linux-sun-jdk14

# make install

follow directions. (get j2sdk-1_4_2_10-linux-i586.bin from and put it into /usr/ports/distfiles at time of writing)

# cd /usr/ports/devel/apache-ant/

# make install


kaffe should technically work, but i wasn't able to do it. i got this far:

# pkg_add -r kaffe

# export JAVA_HOME="/usr/local/kaffe/"

add line to ~/.profile

# mkdir -p /usr/local/jdk1.4.2/bin

# cd /usr/local/jdk1.4.2/bin

# ln -s ../../kaffe/bin/java

but tomcat fails to start with

java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;
   at java.lang.reflect.Method.invoke0 (
   at java.lang.reflect.Method.invoke (
   at kaffe.jar.ExecJarName.main (
   at kaffe.jar.ExecJar.main ( 

in /usr/local/jakarta-tomcat5.5/logs/stderr.log

-- AleX - 17 Apr 2006
Topic revision: r9 - 09 May 2006, 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