(For other ways to install Sputnik ,see Custom Installation).
UNIX (including OSX)
Required software
You will need wget and make for the installation. If you don't have them:
- On Ubuntu run "sudo apt-get install build-essentials"
- On OSX, install fink, then install wget and make with "fink install wget" and "fink install make"
Installation
- Create a local directory where Sputnik will live and
cdinto it. - Download and run the installation script.
You can do both with:
mkdir ~/sputnik
cd ~/sputnik
wget http://sputnik.freewisdom.org/files/sputnik_install_8_07_21.sh
sh sputnik_install_8_07_21.sh
Windows
Install Kepler 1.1 for windows using Kepler Installation instructions
Install Sputnik rocks using:
luarocks --from=http://sputnik.freewisdom.org/rocks/earth install sputnik
You will then need to create by hand the wiki-data directory and sputnik.ws / sputnik.cgi files (see below).
Running Sputnik with Xavante
You can now run Sputnik with Xavante, a webserver that comes with Kepler:
./bin/xavante_start
This will start Xavante on port 8080 by default. You can access Sputnik at http://localhost:8080/sputnik.ws.
If you are curious as to what is happening here, Xavante looks for "sputnik.ws" in ~/sputnik/kepler/htdocs directory.
sputnik.ws is a WSAPI application that looks like this:
require('sputnik')
return sputnik.new_wsapi_run_fn{
VERSIUM_PARAMS = { '/tmp/sputnik3/wiki-data/' },
BASE_URL = '/sputnik.ws',
}
Note that this application just calls Sputnik setting two parameters: VERSIUMPARAMS (which tells Sputnik where to store data) and BASEURL (which tells Sputnik what its URL is).
Running Sputnik with CGI
You can also run Sputnik through CGI with a web server like Apache. The installation
script created a sputnik.cgi file for you, so just copy it wherever your server
keeps the CGI files. For instance:
cd ..
sudo cp sputnik.cgi /usr/lib/cgi-bin/
If your cgi files are available via http://localhost/cgi-bin/ then you are done: just go to http://localhost/cgi-bin/sputnik.cgi.
If not, you'll need to edit sputnik.cgi, changing /cgi-bin/sputnik.cgi to whatever it needs to be changed to.
Note: If you do not have your server configured to run CGI, please read the documentation for your server. Unfortunately, configuring CGI varies from one server to another, and even for the same server between different distributions of Linux. We can't help you here.
Running Sputnik with FastCGI
To use FastCGI we need to install an extra rock:
./bin/luarocks install wsapi-fcgi
Then copy sputnik.cgi to your CGI directory as "sputnik.fcgi" and change ".cgi" to ".fcgi" everywhere in that file.
After the Installation
After the installation, register an account "Admin". Note that some of Sputnik's pages, such as "_navigation" are configured (by default) to only be editable by "Admin".
After that, go on to Configuration.