Links

Currently you can see the screencast at http://static.moinmo.in/files/screencast/moin_install_into_freebsd_jail/ there there are links to a higher quality AVI as well as the FLV file for download.

Phase 1: FreeBSD Host

Update system sources

root# uname -a
root# ee /usr/share/example/cvsup/stable-supfile
root# csup -h cvsup.za.freebsd.org /usr/share/example/cvsup/stable-supfile

Update ports tree

root# portsnap fetch extract

Compile world

root# mkdir -p /usr/jail/moin
root# cd /usr/src
root# make buildworld
root# make installworld DESTDIR=/usr/jail/moin
root# make distribution DESTDIR=/usr/jail/moin

Edit rc.conf file

root# ee /etc/rc.conf

ifconfig_fxp0_alias0="192.168.1.123"

jail_enable="YES"
jail_list="moin"

jail_moin_rootdir="/usr/jail/moin"
jail_moin_hostname="moin.cb22.za.net"
jail_moin_ip="192.168.1.123"
jail_moin_devfs_enable="YES"
jail_moin_fdescfs_enable="YES"
jail_moin_procfs_enable="YES"

Final touches

root# /etc/rc.d/netif restart
root# /etc/rc.d/jail start

root# mkdir -p /usr/jail/moin/usr/ports
root# mount_nullfs /usr/ports /usr/jail/moin/usr/ports

root# jls
root# jexec 1 /bin/tcsh

Phase 2: FreeBSD Jail

Nameserver

jail# ee /etc/resolv.conf

Python Installation

jail# cd /usr/ports/lang/python25
jail# make config
jail# make clean install clean

Lighttpd Installation

jail# cd /usr/ports/www/lighttpd
jail# make config
jail# make clean install clean
jail# echo 'lighttpd_enable="YES"' >> /etc/rc.conf
jail# touch /var/log/lighttpd.error.log
jail# touch /var/log/lighttpd.access.log
jail# chown www:www /var/log/lighttpd*

Phase 3: MoinMoin

Errata

Downloading Moin

Installing Moin

jail# cd ~
jail# fetch <the url you copied>
jail# tar -xjf tip.tar.bz2
jail# cd <the new directory>
jail# python setup.py install --prefix=/usr/local --record=install.log

Testing Moin

jail# python
>>> import MoinMoin

Extracting the underlay

jail# cd /usr/local/share/moin/
jail# tar -xjf underlay.tar.bz2

Creating an Instance

jail# cd /tmp
jail# fetch http://moinmo.in/HelpOnInstalling/WikiInstanceCreation?action=AttachFile&do=get&target=createinstance.sh
jail# mv WikiIn<tab> createinstance.sh
jail# ee createinstance.sh

jail# sh createinstance.sh /usr/local/www/mywiki

jail# cp /usr/local/share/moin/server/moin.fcg /usr/local/www/mywiki
jail# chown www:www /usr/local/www/mywiki/moin.fcg
jail# chmod +x /usr/local/www/mywiki/moin.fcg

Configuring Moin

jail# ee /usr/local/www/mywiki/moin.fcg

mkdir -p /usr/local/www/data
ee /usr/local/etc/lighttpd.conf

fastcgi.server  = (  "/wiki" =>
                        (( "docroot"   => "/",
                        "min-procs" => 2,
                        "max-procs" => 12,
                        "bin-path"  => "/usr/local/www/mywiki/moin.fcg",
                        "host"      => "127.0.0.1",
                        "port"      => 2200,
                        "check-local" => "disable",
                        "broken-scriptfilename" => "enable"
                        ))
        )


Oops, forgot to login when i created this page! --Federico Lorenzi

MoinMoin: FreeBSDScreencast (last edited 2009-07-23 04:15:53 by AndreyFesenko)