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
- NOTE, while the screencast uses /usr/local/www/wiki, the notes have been changed to reflect the documentation, which uses /usr/local/www/mywiki. Also older versions of Moin actually use 'wiki', so it is suggested to go with 'mywiki' instead.
- NOTE, If you are using a different version of Moin, replace "/moin_static160" with the appropriate string. For 1.7 this is "/moin_static170", and for older versions "/wiki"
NOTE, This screencast uses the 1.6 development tree. This is good to get the latest fixes and patches, but it could be unstable. In case you want more stability, download the appropriate version of MoinMoin.
Downloading Moin
- Go to hg.moinmo.in
- Copy link for 1.6
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
- Change bash to sh
- Change /usr/share to /usr/local/share
- Change USER and GROUP to www
Change $USER.$GROUP to $USER:$GROUP
Change [[ ]] to [ ] [ ]
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
- Change to sys.path.insert(0, '/usr/local/lib/python2.5/site-packages')
- Change to sys.path.insert(0, '/usr/local/www/mywiki')
mkdir -p /usr/local/www/data ee /usr/local/etc/lighttpd.conf
- Enable fastCGI, alias
- Disable IPv6
Add alias.url = ( "/moin_static160" => "/usr/local/share/moin/htdocs/" )
- Add:
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