TWiki
From DreamHost
TWiki is a wiki system similar to MediaWiki but different (better, IMHO) in several ways:
- General:
- The formatting is easier because it resembles normal email/chat codes more, like *bold* and _italic_.
- You can attach files to pages, the same way you attach files to emails.
- TWiki automagically creates hyperlinks to other pages whenever you mention them, so you don't need to use [ and ] brackets so often.
- TWiki has built-in help and tutorials that make it very easy to get started, and also easy to learn the more advanced features.
- Administration:
- Most aspects of TWiki can be changed using a browser (with admin login) instead of requiring direct telnet access to the server.
- There are LOTS of plugins and skins that you can use to customize your TWiki website. They are easy to install and well documented.
- There is a very effective support community to give you quick solutions to your problems.
- There is also an active IRC community that can help with installation problems. Be sure to mention that you're doing an in installation on DH as there are quite a few folks in TWiki community that use DH and are very knowledgeable about setup here.
- http://TWiki.org and in particular http://twiki.org/cgi-bin/view/Codev/DreamhostSetupNotes
TWiki runs quite nicely on DH. The installation using TWiki4 goes very smoothly if you just remember to do a couple of things:
- Permissions of some the files in the distribution need to be tweaked. Specifically, /bin/.htaccess and bin/LocalLib.cfg and any files in the root that you want to view need to be set to 644.
- Be sure to include in bin/.htaccess this line: "SetHandler cgi-script". You can use the template htaccess file provided.
- In shell at the root of your TWiki installation, run this command: "chmod 644 `find pub -type f -print`" so that the style sheets and graphics in the pub directory are universally accessable. This is addressed at the end of the INSTALL.html file.
On level1 shared hosting, response time can be quite slow up to 15 seconds to display a page, even on small Twikis. Mod_perl and SpeedyCGI could improve response time but DreamHost does not support them. Alternatively caching is a workaround but it has some limitation. (see Twiki_Troubleshooting)
Installing Twiki on Dreamhost on mydomain.com/twiki
I last tried using v4.1.1, and I used a shell account for some of the steps: (Note: These instructions written for v4.1.1 but validated as still correct for v4.1.2 as of 1 May 07)
Initial setup
- create your twiki directory, e.g. /home/mylogin/mydomain.com/twiki
- Download the latest tgz: http://twiki.org/cgi-bin/view/Codev/DownloadTWiki
- FTP the TWiki-4.1.1.tgz file into your mydomain.com/twiki directory
- Log into dreamhost with your shell account
- First create a tmp folder for twiki (it uses it while it's running)
cd mkdir tmp chmod 755 tmp cd tmp mkdir twiki chmod 755 twiki
- Now go to your twiki directory
cd cd mydomain.com/twiki
- unzip the compressed twiki file you downloaded
tar -xvzf TWiki-4.1.1.tgz
- there's now an install file you can look at to help you: mydomain.com/twiki/INSTALL.html
- create the /twiki/bin/LocalLib.cfg file from the sample LocalLib.cfg.txt file
cd bin cp LocalLib.cfg.txt LocalLib.cfg
- use vi to edit the LocalLib.cfg file and set the $twikiLibPath value to your twiki installation directory
vi LocalLib.cfg
- e.g. LocalLib.cfg will now have a value like
$twikiLibPath = "/home/mylogin/mydomain.com/twiki/lib";
- Here are some tips on how to use vi: http://www.cs.colostate.edu/helpdocs/vi.html
- Update the directory permissions from the twiki root directory:
cd cd mydomain.com/twiki chmod -R 755 pub chmod 644 `find pub -type f -print`
- Note that the ` in the last step is the backwards apostrophe, often under the tilde key on the keyword ~.
- Now create an .htaccess file in the bin directory so you can run the configuration script.
vi bin/.htaccess
- and give it one line:
SetHandler cgi-script
- Now you can run the configuration script at mydomain.com/twiki/bin/configure
Running the configuration script
- Go to mydomain.com/twiki/bin/configure
- At the top it might have a warning like "cannot find LocalSite.cfg" -- that's normal.
- You want to set the following values at least:
- General Path Settings
- Double check the paths in PubDir, TemplateDir, DataDir, and LocalesDir. If they look like /home/.something/mylogin/mydomain.com/blah change them to /home/mylogin/mydomain.com/blah
- Set TempFileDir to /home/mylogin/tmp/twiki
- Security Setup
- LoginManager: use None if you want everyone to be able to edit your wiki. Otherwise you can choose TemplateLogin to have TWiki manage logins and require registration in order to edit the wiki.
- AuthScripts: if LoginManager is None, then you probably want to make AuthScripts blank. Not sure on this, since I used TemplateLogin for LoginManager.
- Anti Spam Settings
- Email Padding: Put something in here, like 'NOSPAM'
- Mail and Proxies
- WebMasterEmail: enter the email address of whoever's in charge of the wiki, e.g. support@mydomain.com or wikiadmin@mydomain.com
- WebMasterName: Leave the default, or use something like MyCompany Wiki Support, or your name, I guess.
- STMP Mailhost: set to localhost
- General Path Settings
- Now click Next at the very bottom of the page
- You'll get a configuration password page -- enter a strong password at the bottom and click Change Password and Save
- After a few seconds you'll see a page listing all the changes. Scroll to the bottom and click Return to Configuration
- Now let's enable the WYSIWYG plugin for TWiki. Expand the Plugins section and check the WysiwygPluginEnabled checkbox.
- Click Next.
- At the top, enter the strong password you entered a few steps ago and click Save. Ok, now to do some additional administration.
Closing the holes
- go back to your shell login and switch to the twiki directory
cd cd mydomain.com/twiki
- Block access to private subdirectories with these steps
cp subdir-htaccess.txt data/.htaccess cp subdir-htaccess.txt lib/.htaccess cp subdir-htaccess.txt locale/.htaccess cp subdir-htaccess.txt templates/.htaccess
- configure access to the pub directory
cp pub-htaccess.txt pub/.htaccess
- configure the root directory access
cp root-htaccess.txt .htaccess
- edit the root .htaccess so that when users go to mydomain.com/twiki they get redirected to the right spot
vi .htaccess
- uncomment the last line (remove the #), fix the paths, and save the file. Note that the file is probably read-only, so use :x! to save your changes. The last line should look like (assuming your twiki is at mydomain/twiki)
Redirect /twiki/index.html http://www.mydomain.com/twiki/bin/view
- Prevent further configuration changes by setting the site config file to readonly
cd cd mydomain.com/twiki chmod 444 lib/LocalSite.cfg
- If in the future you want to run the configuration script again, set the lib/LocalSite.cfg permissions to 644.
Finish wiki permissions
- You should now be able to go to http://www.mydomain.com/twiki/
- Go ahead and register yourself as a new user
- Go to the http://www.mydomain.com/twiki/ home page, click TwikiGroups from the middle of the page
- Click TwikiAdminGroup and follow the instructions in the giant yellow box at the bottom

