]> sipb.mit.edu Git - ikiwiki.git/blob - doc/tips/nearlyfreespeech.mdwn
formatting
[ikiwiki.git] / doc / tips / nearlyfreespeech.mdwn
1 [NearlyFreeSpeech.net](http://NearlyFreeSpeech.net) is a shared hosting
2 provider with very cheap pay as you go pricing. Here's how to install ikiwiki
3 there if you don't have a dedicated server.
4
5 * [Get an account](https://www.nearlyfreespeech.net/about/start.php).
6 * Create a site using their web interface. Mine is named `ikiwiki-test` and I
7   used their DNS instead of getting my own, resulting in
8   <http://ikiwiki-test.nfshost.com/>
9 * Fund it. (Or don't. They gave me 2 cents free funding for signing up, which
10   is enough to pay for 10 megabytes of hosting, or about a thousand typical 
11   page views at their current rates.)
12 * `ssh` into their server using the ssh hostname and username displayed on
13   the site's information page. For me this was
14
15         ssh joeyh_ikiwiki-test@ssh.phx.nearlyfreespeech.net
16
17 * Set up .profile to use your home directory.
18
19         echo "PATH=$PATH:$HOME/bin" > $HOME/.profile
20         . $HOME/.profile
21
22 * You'll be in the htdocs directory by default, where public web pages are
23   put, so before installing ikiwiki, `cd $HOME`
24 * Use `wget` to [[download]] the ikiwiki tarball.
25 * Unpack ikiwiki.
26
27         tar zxvf ikiwiki*.tar.gz
28
29 * Use CPAN to install the perl modules it uses into your home directory:
30   (This will take a while. As long as the first command succeeds, ikiwiki will be
31   usable. The second command adds extra modules that some plugins use, and
32   installation of some of them might fail.)
33
34         PERL5LIB=ikiwiki:ikiwiki/cpan:. PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'CPAN::Shell->install("Bundle::IkiWiki")'
35         PERL5LIB=ikiwiki:ikiwiki/cpan:. PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'CPAN::Shell->force(install => "Bundle::IkiWiki::Extras")'
36
37 * Now build and install ikiwiki into your home directory.
38
39         cd ikiwiki
40         export MAKE=gmake
41         perl Makefile.PL INSTALL_BASE=$HOME PREFIX=
42         $MAKE
43         $MAKE install
44
45 * With ikiwiki installed, you can follow the regular [[setup]] tutorial for
46   settng up your wiki. Make sure to set `destdir` to `/home/htdocs/` so that
47   the wiki is published on the web site. I recommend using git for revision
48   control; you can then clone your wiki's git repository as an offsite backup.
49   Here is an example of how I set up a wiki:
50
51         mkdir ~/wiki
52         cd ~/wiki
53         cp ~/ikiwiki/doc/ikiwiki.setup .
54         cp -r ~/ikiwiki/doc/examples/blog/* .
55         nano ikiwiki.setup
56         # Set destdir to /home/htdocs
57         # Set srcdir to /home/private/wiki
58         # Set url to http://yoursite.nfshost.com/ , set cgiurl likewise
59         # Uncomment the `rcs => "git"` line, and the cgi and git
60         # post-update wrapper blocks.
61         # Set the cgi wrapper path to /home/htdocs/ikiwiki.cgi
62         # Set the git wrapper path to /home/private/wiki.git/hooks/post-update
63         # Configure the rest to your liking and save the file.
64         ikiwiki-makerepo git . ../wiki.git
65         ikiwiki -setup ikiwiki.setup
66
67 * Finally, you can save a _lot_ of disk space by cleaning up the ikiwiki
68   tarball and .cpan directory.
69
70         rm -rf ~/ikiwiki*.tar.gz ~/.cpan
71
72 Have fun and do good things. --[[Joey]]