Last active
December 15, 2015 02:39
-
-
Save pads/5189270 to your computer and use it in GitHub Desktop.
Various scripts to install TiddlySpace on a barebones Ubuntu server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Run this script before installing twikifier/twsock and after installing node | |
# | |
npm config set registry http://registry.npmjs.org/ | |
# Omit this step if a proxy is not needed | |
npm config set proxy http://<host>:<port> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This script must be run by root | |
# | |
groupadd tiddlyweb | |
useradd -s /bin/bash -m -g tiddlyweb tiddlyweb | |
echo "%tiddlyweb ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Run this after installing twikfier | |
# | |
sudo -E pip install -U tiddlywebplugins.dispatcher | |
# Need a better way of adding the plugin to configuration that does not depend on other plugins | |
sed "4 c\ 'system_plugins': ['tiddlywebplugins.tiddlyspace', 'twikified', 'tiddlywebplugins.dispatcher']," tiddlywebconfig.py > tiddlywebconfig.tmp | |
mv tiddlywebconfig.tmp tiddlywebconfig.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This script installs the required prerequisities based on | |
# Ubuntu (Lucid 10.04). Run it as user tiddlyweb | |
# | |
sudo -E apt-get install python-software-properties -y | |
sudo -E add-apt-repository ppa:chris-lea/node.js | |
sudo sh -c "echo `sed '/main/ s/$/ universe multiverse restricted/' /etc/apt/sources.list` > /etc/apt/sources.list" | |
sudo -E apt-get update | |
sudo -E apt-get install wget mlocate chkconfig gcc libyaml-dev libev-dev git-core python-dev python-distribute python-pip nodejs memcached beanstalkd libapache2-mod-wsgi mysql-client libmysqlclient-dev mysql-server -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Run this script as user tiddlyweb | |
# | |
sudo -E pip install -U pip | |
sudo -E pip install -U setuptools | |
sudo -E pip install -U tiddlywebwiki | |
sudo -E pip install -U PyYAML | |
sudo -E pip install -U tiddlywebplugins.tiddlyspace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Run this before starting TiddlySpace and after node is installed. | |
# | |
sudo -E npm install -g twikifier | |
sudo -E curl https://raw.github.com/pads/twikifier/node-package/scripts/twikifier -o /etc/init.d/twikifier | |
sudo chmod +x /etc/init.d/twikifier | |
sudo update-rc.d twikifier defaults | |
sudo -E pip install -U tiddlywebplugins.twikified | |
cd ~/tiddlyspace_instance/ | |
# Todo: Work out some *nix magic to add this in | |
# Add 'wikitext.default_renderer': 'tiddlywebplugins.twikified' to tiddlywebconfig.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Run this as the mysql root user | |
# Replace password with suitable password | |
# | |
CREATE USER 'tiddlyweb'@'localhost' IDENTIFIED BY 'password'; | |
CREATE DATABASE tiddlyspace; | |
GRANT ALL PRIVILEGES ON tiddlyspace.* TO 'tiddlyweb'@'localhost' IDENTIFIED BY 'password'; | |
quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It might (I'm not entirely sure, though) make sense for there to be a
twanager
command which adds a plugin to the current instance by, essentially, rewriting the config. @FND wrote some config writing code that eventually ended up in twp.imaker.An issue with that, however, is preserving comments etc. To such an extent that I'm not sure it is worth it.