Login
or
register
Overview
Overview
Why Lua?
Vision
General FAQ
Credits
Getting Started
Installation
Hello World
Web Servers
Getting Help
Status
News
Releases
Community
Overview
Dev Team
Mailing List
UNIX Installation
Anonymous users must enter
captcha
below.
Don't put anything here
Don't put anything here
Page Parameters
Page Name (for URL)
Page Title
Don't put anything here
Show Advanced Options
Category
Prototype
Page Content
# New Installation Using WSAPI The Kepler Installer is no longer supported and should not be used for new installations. Instead, follow the instructions on the [WSAPI](http://wsapi.luaforge.net/) page. ## Old Installation Procedures For those still using the [Kepler Installer](http://www.keplerproject.org/keplerinstaller/), here are the old instructions: #### Unix All-In-One Installation v1.1 Unix users can enjoy the latest release of Kepler Installer using an all-in-one installer that includes everything you'll need (Lua, LuaRocks and the necessary modules). Note: if you are using Ubuntu, you may need to install the readline and build-essential packages using,<br/> `sudo apt-get install libreadline-dev build-essential` Get the Kepler installer from [LuaForge](http://luaforge.net/frs/?group_id=104). The kepler installer is called `kepler-install-x.y-z`. Make sure the script has the right permissions: `chmod +x kepler-install-x.y-z` #### Choosing where to install files To install in your home directory use `./kepler-install-x.y-z --prefix=$HOME` To install in the `/usr/local` default prefix (as root) use `sudo ./kepler-install-x.y-z` Note: if you need to use a different configuration, check `./kepler-install-x.y-z --help` for the installer's options. #### The installation The installer will then show where everything will be installed and you cancel the process if needed. Once confirmed the configuration options, the installer installs Lua 5.1, LuaRocks, the base modules, and Xavante on the respective places. #### Testing if everything is OK Once the installer is finished, just run `xavante_start` and check [http://localhost:8080](http://localhost:8080) to see Xavante running! #### Installation via LuaRocks luarocks install kepler-xavante #### Troubleshooting KEPLER_WEB command not found If you get error `KEPLER_WEB: command not found` you need something like this: luarocks install kepler-xavante KEPLER_WEB=/var/www Look at [this thread]: http://lists.luaforge.net/pipermail/kepler-project/2009-April/003261.html #### Using CGI/FastCGI The instructions below work either for CGI or FastCGI, assuming you have the correct Apache module (mod\_cgid or mod\_fcgid). For FastCGI, just replace `cgilua.cgi` with `cgilua.fcgi` in the instructions. If you already have a web server like Apache, running CGILua via CGI is the simplest option. Assuming you've installed Kepler in `~/kepler`, just copy `cgilua.cgi` to your cgi-enabled directory: cp ~/kepler/bin/cgilua.cgi ~/mysite/cgi-bin/cgilua.cgi * With [shared hosting](http://www.webhostingsearch.com/shared-web-hosting.php) your hosting company will tell you where you are supposed to put CGI scripts. On your own machine, this would probably ``/var/www`` by default. ``cgilua.cgi`` is just a wrapper, however, so you will need a LuaPage page to actually see something in the browser. You can start with the pages sitting in ~/kepler/htdocs, but you'll need to copy them to your site directory: cp -r ~/kepler/htdocs/* ~/media.freewisdom.org/keplertest/ Now you can finally see CGILua in action: go to a URL like: [http://media.freewisdom.org/keplertest/cgilua.cgi/keplertest/test.lp](http://media.freewisdom.org/keplertest/cgilua.cgi/keplertest/test.lp) Note that what follows ``cgilua.cgi`` must be a path to the ``.lp`` file _from the top of your site directory_. I.e., http://media.freewisdom.org/keplertest/cgilua.cgi + /keplertest/test.lp **Notes:** If you get a "500" error when accessing the page, check your permissions. Some hosts, e.g. [Webfaction](http://webfaction.com/), are picky about the permissions for your script. On the one hand, you must give other users permission to run it, on the other hand, some servers do not like it if you give other users ability to edit the file. (This is a security precaution.) "chmod 711" would usually work. ("711" = full access to yourself, only execute permissions for others.) You might need to set the same permissions on the directory where the ``cgilua.cgi`` is located. In our case, we would enter: chmod 711 ~/media.freewisdom.org/keplertest/cgilua.cgi chmod 711 ~/media.freewisdom.org/keplertest #### Configuring CGI on a Mac Assuming you have enabled Apache to serve pages on your Mac (start the *System Preferences/Sharing/Personal Web Sharing* service for that), you have two options to use Kepler - either in your home directory or in the system wide Apache directory. In the first case, your HTML files should go to the `~/Sites` directory and in the second they would go to the `/Library/WebServer/Documents` directory. But what about the `cgi` launcher? If you want to access your Kepler scripts with a URL like `servername/cgi-bin/cgilua.cgi/index.lp` then you should copy the `cgilua.cgi` file to `/Library/WebServer/CGI-Executables` and things should work fine if the file `index.lp` is in the `/Library/WebServer/Documents` directory. To reach documents elsewhere, say in your user-specific Sites directory, use a URL s.a. `servername/cgi-bin/cgilua.cgi/~user/test.lp`. Note that Finder localizes the name of the Sites folder for non-english users; it's still the same folder underneath. For more details on how to configure Apache on your Mac you can check this O'Reilly article: [Apache Web-Serving with Mac OS X](http://www.oreillynet.com/pub/a/mac/2001/12/07/apache.html). The Apache configuration file at `/etc/httpd/httpd.conf` has rather good comments, too. #### Using Mod-Rewrite to Hide the URL You should now be able to call a [[Lua Page]] or a [[Lua Script]], but you must use a somewhat unwieldy URL. You can fix it with ``.htaccess``: RewriteEngine On RewriteBase / RewriteRule ^myapp/(.*)$ /keplertest/cgilua.cgi/keplertest/$1 [L] Now instead of using the long URL, I can refer to test.lp file with just http://media.freewisdom.org/myapp/test
Don't put anything here
About this Edit
Minor Edit
Edit Summary
Don't put anything here
Don't put anything here
Powered by
Sputnik
|
XHTML 1.1