mediawiki Extension:Scribunto lua安裝

安裝http://lamp.sh/環境
Extension:Scribunto

https://www.mediawiki.org/wiki/Extension:Scribunto
Manual installation
Download and place the file(s) in a directory called Scribunto in your extensions/ folder.
Add the following code at the bottom of your LocalSettings.php:
require_once “$IP/extensions/Scribunto/Scribunto.php”;
$wgScribuntoDefaultEngine = ‘luastandalone’;

chmod a+x /path/to/extensions/Scribunto/engines/LuaStandalone/binaries/yourOS/lua

git clone https://gerrit.wikimedia.org/r/p/mediawiki/php/luasandbox.git

yum -y install lua lua-devel

cd luasandbox
phpize && ./configure && make && sudo make install

編譯好的檔案在:
/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/luasandbox.so

然後在php.ini中加入
extension=luasandbox.so
然後重新啟動apache
就可以用了

vi /usr/local/php/php.d/luasandbox.ini

[luasandbox]
extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/luasandbox.so