[Sputnik-list] Sputnik on WSAPI, and almost zero-config
Yuri Takhteyev
yuri at sims.berkeley.edu
Wed Jan 2 03:42:52 GMT+3 2008
Sputnik is now a WSAPI app and is nearly zero-config.
See http://sputnik.freewisdom.org/en/New_Installation for the detailed
installation instructions, listing all the different options, but at
the high level, the new installation procedure is the following:
1. Install Lua, locally or system wide. Doing so with Kepler is
recommended, but you can build your own Lua environment if you want.
If you use the Kepler installer, you can delete most of the files that
it creates: just leave "bin", "include" and "share/lua/5.1/wsapi." If
you choose to build your own environment, you'll have to install
WSAPI. (You can just copy it share/lua/5.1/wsapi from a Kepler
installation.)
2. Either install LuaRocks and use it to install Sputnik _or_ download
http://media.freewisdom.org/etc/sputnik-8.01.01.zip and copy
everything from "dependencies" and "modules" to your
share/lua/5.1/wsapi.
3. Create a sputnik.cgi file. If you are using Kepler without
LuaRocks, it would be as simple as
#!/home/joe/sputnik/bin/lua5.1
require"wsapi.cgi"
require"sputnik"
SPUTNIK_CONFIG = {
VERSIUM_PARAMS = { dir = "/home/joe/sputnik/wiki-data" },
BASE_URL = "/cgi-bin/sputnik.cgi"
}
wsapi.cgi.run(sputnik.run)
If you are not using Kepler, you'll have to add a few lines to set up
your paths in the beginning:
LUA_DIR="/home/joe/sputnik/"
package.path =
LUA_DIR.."/share/lua/5.1/?.lua;"..LUA_DIR.."/share/lua/5.1/?/init.lua;"..package.path
package.cpath = LUA_DIR.."/lib/lua/5.1/?.so;"..package.cpath
And for LuaRocks, you'll have to add require"luarocks.require" after that.
And you'll have to create the directory where the data will be stored
(SPUTNIK_CONFIG.VERSIUM_PARAMS.dir), and set permissions on it. There
is no other installation: the default pages will be created when you
try to access them.
- yuri
--
http://sputnik.freewisdom.org/
More information about the Sputnik-list
mailing list