Install nginx + lua + redis

Source: Internet
Author: User
Tags install redis
: This article describes how to install nginx + lua + redis. For more information about PHP tutorials, see. Install luajit2.0.2

Wget http://luajit.org/download/LuaJIT-2.0.0-beta9.tar.gz

Tar zxvf LuaJIT-2.0.0-beta9.tar.gz

Cd LuaJIT-2.0.0-beta9

Make

Sudo make install PREFIX =/usr/local/luajit

Install ngx-devel-kit, lua-nginx-module, and echo-nginx-module

Cd/usr/local/

Git clone https://github.com/simpl/ngx_devel_kit

Git clone https://github.com/agentzh/echo-nginx-module

Git clone https://github.com/chaoslawful/lua-nginx-module

Luajit environment variable

Export LUAJIT_LIB =/usr/local/luajit/lib

Export LUAJIT_INC =/usr/local/luajit/include/luajit-2.0

Install nginx

Wget nginx.org/download/nginx-1.6.3.tar.gz

Tar zxvf nginx-1.6.3.tar.gz

Cd nginx-1.6.3./configure -- prefix =/usr/local/nginx -- with-ld-opt = "-Wl,-rpath, $ LUAJITLIB "-- add-module =/usr/local/ngxDevel_kit -- add-module =/usr/local/echo-nginx-module -- add-module =/usr/local/lua-nginx-module

Make-j2

Make install

Verify/usr/local/nginx-V

Install redis-lua

Git clone https://github.com/nrk/redis-lua

Cp redis-lua/src/redis. lua/usr/local/share/lua/5.1/redis. lua

Install lua-socket2.0.2

Wget http://luaforge.net/frs/download.php/2664/luasocket-2.0.2.tar.gz

Tar zxvf luasocket-2.0.2.tar.gz

Cd luasocket-2.0.2

Vim config

LUAINC=-I/usr/local/luajit/libLUAINC=-I/usr/local/luajit/include/luajit-2.0

Make

Make install

Redis yum install redis

The above introduces the installation of nginx + lua + redis, including some content, and hope to be helpful to friends who are interested in PHP tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.