How do I install LiveCode Server?
The LiveCode Server product brings our english like language to the server environment. The server engine is a separate build of the LiveCode engine with specific syntax and functionality that makes it suitable for use in command-line contexts and, in particular, as a CGI processor.
This lesson will walk you through the steps required to install LiveCode Server on your platform.
LiveCode Server Distribution
When you purchase LiveCode Server, you will be emailed links to zip files containing the LiveCode Server distribution along with the login credentials. You can also get access to these links from the "My Products" area of the RunRev Store. To begin downloading, click on the link for your platform and enter the login credentials when prompted.
Once downloaded, you can unzip and explore the contents. Your LiveCode server package should look similar to the image above, containing the sever engine itself, the externals, the database drivers and the release notes. You are now ready to begin running LiveCode Server.
Command Line Mode
The LiveCode Server engine can be run in two modes: Command line mode and CGI mode. To run the engine in command line mode, open up a command prompt and execute the "livecode-server" ("livecode-server.exe" on Windows) binary, passing the script name you wish to run as the first argument.
Consider a script script named "myscript.lc" in the same folder as your LiveCode Server engine, containing the following commands:
put "Hello World!" && the date && the time
The image above demonstrates how to execute the script along with the expected output.
The second mode the LiveCode Server engine can be run in is CGI mode. Running LiveCode server in CGI mode allows you access your LiveCode script files using HTTP i.e. as web pages. For example, if you have a script named myscript.lc, when run in CGI mode, you will be able to access it by typing the URL of the script into your web browser (e.g. http://www.my_site.com/myscript.lc).
In order to do this, your machine must have a web server package installed and .lc file extensions mapped to the LiveCode Server engine.
The most common web server package available is Apache and is avaiable for most platforms. If you have access to your systems Apache configuration files, see the following lessons:
- How do I install LiveCode Server on OS X with Apache
- How do I install LiveCode Server on Windows with Apache
- How do I install LiveCode Server on Linux with Apache
If you don't have access to your system's Apache configuration, see the lesson "How do I install LiveCode Server with Apache via .htaccess?".
For more detailed information on installing LiveCode server, see the server release notes distributed with the server package.