TiddlyWiki 5 on the Raspberry Pi
Use the following method to build and host TiddlyWiki 5 node edition on a Raspberry Pi.
This setup can be used on a Raspberry Pi (model B v.2) with a default raspian installation (Wheezy).
You can copy/paste the following codes one by one and have a functional setup when finished.
Make sure you can access the Rpi over ssh ... if you need to enable ssh you can run the config with:
sudo raspi-config
(find the ssh entry in the list and enable)
Connect to your Rpi on another pc in a terminal with ssh (you need to know the ip of the Rpi):
ssh pi@your_local_ip
example:
ssh pi@192.168.1.68
(default password is "raspberry")
Once you have access with ssh you should be able to paste the following code's in the terminal one by one and end with a basic setup. (on linux copy with: Ctrl-c and paste in the terminal with Ctrl-Shift-v or Ctrl-Shift-insert)
Start here:
cd /
install node.js
sudo apt-get install python g++ make
create a directory for node
mkdir ~/nodejs && cd $_
get the latest node version
wget -N http://nodejs.org/dist/node-latest.tar.gz
unpack
tar xzvf node-latest.tar.gz && cd `ls -rd node-v*`
configure
./configure
make (this step takes about 2.5 hours on the rpi...)
sudo make install
...check if node is installed properly by checking the version:
node -v
TiddlyWiki is distributed as a GitHub repository ... so we need to install git
sudo apt-get install git
(follow the instructions and confirm on installation with a "y")
make a directory to install the TW5 node app
sudo mkdir /opt/tw
adjust the rights
sudo chmod -R 775 /opt/tw/
make the user a member ("pi" the user)
sudo chown ${USER}:pi -R /opt/tw/
cd to /opt/tw
cd /opt/tw
get the TW5 repo with git
as user
git clone https://github.com/Jermolene/TiddlyWiki5.git
check if the folder /TiddlyWiki5 is created in opt/tw
cd /op/tw/TiddlyWiki5
ls
Time to make your Raspberry Pi build TiddlyWiki5
Lets do a test with the default script (we change this later)
create a folder in /opt/tw
cd /opt/tw
mkdir jermolene.github.com
cd /opt/tw/TiddlyWiki5
use the build script
./bld.sh
check in /opt/tw/jermolene.github.com if the TiddlyWiki's are created
Use the developmentserver like this (be warned it's unsafe for production!)
cd /opt/tw/TiddlyWiki5
./serve.sh
This will start your server at the local ip on port 8080
192.168.1.68:8080
Ctrl-c to stop the server again
Tiddlers are stored in:
/opt/tw/TiddlyWiki5/editions/clientserver/tiddlers
In the following articles we will change the buildscript, use a safe server for production, build .tid's with data via scripts and use cron to update TW5.