Lua is undoubtedly an air of the East - "simple but not simple," I like it.
My development machine is: RedHat Linux AS 5
First, Lua's official website (http://www.lua.org/) Download the latest release package (PS: I downloaded the lua-5.1.4.tar.gz release package, all of this version of the following steps for the sample, Please download the specific version for their own to make the relevant changes.)
Secondly, the use of tar-xzvf / path-to-your-lua-tar-file-folder/lua-5.1.4.tar.gz command to extract, will get a lua-5.1.4 folder.
Third, use cd / path-to-your-lua-tar-file-folder/lua-5.1.4 the current working directory to lua-5.1.4 folder.
Fourth, run the make command, you will see the following prompt:
where PLATFORM is one of these:
aix ansi bsd freebsd generic linux macosx mingw posix solaris
See INSTALL for complete instructions.
View your platform name is in the support list, if you continue to run make PLATFORM command, or according to the INSTALL lua that we can choose to run the make generic command (PS: I am here is compiled for linux, that make linux). Compilation is successful under normal circumstances, if the compiler error that you need to go check the RPWT (ha ha, joke slightly ~ because I do not know how to compile error excluded).
Finally, run make install command
At this point, lua language environment has been successfully installed in the terminal, enter the command into the lua lua command-line now!
print ('Hello, world!')
Well, maybe write a little more Lua:
io.write ('Hello, world!')
Oh, and finally recommended a lua entry Notes: Lua script syntax description (http://www.cnblogs.com/ly4cn/archive/2006/08/04/467550.html)