same as
http://docs.indymedia.org/view/Devel/MiRInstallDebian - just for
FreeBSD
i'm doing this with 6.0-RELEASE
1. java
# pkg_add -r javavmwrapper
get
diablo-jdk-freebsd6-1.5.0.06.00.tbz from
http://www.freebsdfoundation.org/downloads/java.shtml
# pkg_add diablo-jdk-freebsd6-1.5.0.06.00.tbz
(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
-
# TOMCAT_HOME=$CATALINA_HOME; export TOMCAT_HOME
add those 2 lines (without
, export...) to
~/.profile
add
jakarta_tomcat55_enable="YES" to
/etc/rc.conf
# /usr/local/etc/rc.d/020.jakarta-tomcat55.sh 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 :pserver:anonymous@cvs.codecoop.org:/cvsroot/mir login
(don't enter any password, just hit "enter")
$ cvs -d :pserver:anonymous@cvs.codecoop.org:/cvsroot/mir checkout -r MIR_1_1 mir
get templates
$ cvs -d :pserver:anonymous@cvs.codecoop.org:/cvsroot/imc-germany login
$ cvs -d :pserver:anonymous@cvs.codecoop.org:/cvsroot/imc-germany 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 config.properties-dist config.properties
edit config.properties
add line:
Mir.Localizer=DeLocalizer
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.
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 perms.sh-dist perms.sh
/usr/local/www/mir# ./perms.sh
(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/010.pgsql.sh initdb
# /usr/local/etc/rc.d/010.pgsql.sh start
9. create db
edit
/usr/local/www/mir/dbscripts/createmirdb.sh
replace
#!/bin/bash with
#!/usr/local/bin/bash
/usr/local/www/mir/dbscripts# sudo -u pgsql ./createmirdb.sh [dbname] pgsql [dbuser] [dbpw]
(as in config.properties)
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
- add "index.shtml", to server.indexfiles
- 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/lighttpd.sh start
12. install ImageMagick
# pkg_add -r imagemagick
done
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
sun.com and put it into
/usr/ports/distfiles at time of writing)
# cd /usr/ports/devel/apache-ant/
# make install
kaffe
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 (Method.java)
at java.lang.reflect.Method.invoke (Method.java:255)
at kaffe.jar.ExecJarName.main (ExecJarName.java:67)
at kaffe.jar.ExecJar.main (ExecJar.java:75)
in
/usr/local/jakarta-tomcat5.5/logs/stderr.log
--
AleX - 17 Apr 2006