ikiwiki/doc/tips/nearlyfreespeech.mdwn

96 lines
3.3 KiB
Plaintext
Raw Normal View History

[NearlyFreeSpeech.net](http://NearlyFreeSpeech.net) is a shared hosting
provider with very cheap pay as you go pricing. Here's how to install ikiwiki
there if you don't have a dedicated server.
2008-05-05 21:03:38 +02:00
## Register for an account and set up a site
2008-05-05 20:58:21 +02:00
After you [get an account](https://www.nearlyfreespeech.net/about/start.php),
create a site using their web interface.
Mine is named `ikiwiki-test` and I used their DNS instead of getting my
own, resulting in <http://ikiwiki-test.nfshost.com/>
They gave me 2 cents free funding for signing up, which is enough to pay
2008-05-06 00:59:02 +02:00
for 10 megabytes of bandwidth, or about a thousand typical page views at
2008-05-05 21:03:38 +02:00
their current rates. Plenty to decide if this is right for you. If it is,
$5 might be a good starting amount of money to put in your account.
2008-05-05 20:58:21 +02:00
## ssh in and configure the environment
ssh into their server using the ssh hostname and username displayed on
2008-05-05 21:03:38 +02:00
the site's information page. For me this was:
2008-05-05 20:53:31 +02:00
ssh joeyh_ikiwiki-test@ssh.phx.nearlyfreespeech.net
2008-05-05 20:58:21 +02:00
Now set up .profile to run programs from ~/bin.
2008-05-05 20:53:31 +02:00
2008-05-05 21:03:38 +02:00
cd $HOME
2008-05-05 20:58:21 +02:00
echo "PATH=$PATH:$HOME/bin" > .profile
. .profile
2008-05-05 20:53:31 +02:00
2008-05-05 20:58:21 +02:00
## Download an unpack ikiwiki
2008-05-05 20:53:31 +02:00
2008-05-05 20:58:21 +02:00
Use `wget` to [[download]] the ikiwiki tarball. Then unpack it:
2008-05-05 20:53:31 +02:00
tar zxvf ikiwiki*.tar.gz
2008-05-05 20:53:31 +02:00
2008-05-05 20:58:21 +02:00
## Install perl modules
Use CPAN to install the perl modules it uses into your home directory:
2008-05-05 20:53:31 +02:00
PERL5LIB=ikiwiki:ikiwiki/cpan:. PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'CPAN::Shell->install("Bundle::IkiWiki")'
PERL5LIB=ikiwiki:ikiwiki/cpan:. PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'CPAN::Shell->force(install => "Bundle::IkiWiki::Extras")'
2008-05-05 20:58:21 +02:00
(This will take a while. As long as the first command succeeds, ikiwiki will be
usable. The second command adds extra modules that some plugins use, and
installation of some of them might fail.)
## Build and install ikiwiki
2008-05-05 20:53:31 +02:00
cd ikiwiki
export MAKE=gmake
perl Makefile.PL INSTALL_BASE=$HOME PREFIX=
$MAKE
$MAKE install
2008-05-05 20:53:31 +02:00
2008-05-05 21:17:44 +02:00
## Set up a wiki in the usual way
2008-05-05 20:58:21 +02:00
With ikiwiki installed, you can follow the regular [[setup]] tutorial for
settng up your wiki. Make sure to set `destdir` to `/home/htdocs/` so that
the wiki is published on the web site. I recommend using git for revision
control; you can then clone your wiki's git repository as an offsite backup.
Here is an example of how I set up a wiki:
2008-05-05 20:53:31 +02:00
mkdir ~/wiki
cd ~/wiki
cp ~/ikiwiki/doc/ikiwiki.setup .
cp -r ~/ikiwiki/doc/examples/blog/* .
nano ikiwiki.setup
# Set destdir to /home/htdocs
# Set srcdir to /home/private/wiki
# Set url to http://yoursite.nfshost.com/ , set cgiurl likewise
# Uncomment the `rcs => "git"` line, and the cgi and git
# post-update wrapper blocks.
# Set the cgi wrapper path to /home/htdocs/ikiwiki.cgi
# Set the git wrapper path to /home/private/wiki.git/hooks/post-update
# Configure the rest to your liking and save the file.
ikiwiki-makerepo git . ../wiki.git
ikiwiki -setup ikiwiki.setup
2008-05-05 20:53:31 +02:00
2008-05-05 20:58:21 +02:00
## Clean up
Finally, you can save a _lot_ of disk space by cleaning up the ikiwiki
2008-05-05 21:39:36 +02:00
tarball and .cpan directory and a few other peices of cruft. Since you'll be
charged one cent per month per megabyte, this is a quick way to save several
dollars.
2008-05-05 20:58:21 +02:00
2008-05-05 21:39:36 +02:00
rm -rf ~/ikiwiki*.tar.gz ~/.cpan ~/ikiwiki ~/man ~/lib/perl5/5.8.8
That should cut things down to less than 4 megabytes. If you want to save
even more space, delete unused perl modules from ~/lib/perl5
2008-05-05 20:53:31 +02:00
2008-05-05 20:58:21 +02:00
## Enjoy!
Have fun and do good things. --[[Joey]]