Use of Openresty
For specific tutorials, refer to: http://jinnianshilongnian.iteye.com/blog/2186270
This is just a record of my own environmental build-up process.
The system is using Ubuntu-14.04.1-server-amd64.iso
All operations are using the sudo right ...
First refer to http://blog.chinaunix.net/uid-8721861-id-2017178.html solution apt-get Install media change:please Insert the disc Labeled's question:
In the/etc/apt/sources.list file, comment out the CDROM line, and then execute the apt-get update under the Deb repository
And then
- Apt-get Install Libreadline-dev libncurses5-dev libpcre3-dev Libssl-dev perl
Later through wget to http://openresty.org/download the latest version, and then unzip.
After sudo mkdir/usr/servers and sudo mkdir/usr/lua
Then unzip the openresty directory to execute ./configure--prefix=/usr/servers, then sudo make && make install.
During the absence of make, the sudo apt-get install make is executed first.
And then to the/usr/servers directory.
In Nginx to find the Nginx conf file, first the errorlog comments removed, and then the location of the section to change as shown
Then go to/usr/lua under the new A.lua, enter the following content
After saving, switch to Nginx's sbin directory to execute sudo./nginx
The native IP is 192.168.1.105 so:
Visit http://192.168.1.105/See Hello,this is from Lua
Visit Http://192.168.1.105/lua See from Lua
OK, here the environment is basically set up, the subsequent need to learn LUA grammar and how to operate Redis
Nginx+lua Study notes-Environment building