Skip to content

Instantly share code, notes, and snippets.

@cyx
Created April 18, 2014 23:31
Show Gist options
  • Save cyx/11068495 to your computer and use it in GitHub Desktop.
Save cyx/11068495 to your computer and use it in GitHub Desktop.
Install uwsgi with lua support
#!/bin/bash
# The MIT License (MIT)
#
# Copyright (c) 2014 Cyril David <cyx@cyx.is>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
##############################################################################
# # README
#
# If you haven't installed lua, you can use this installer script:
# http://github.com/cyx/lua-setup
#
# This script assumes a debian like system
#
##############################################################################
## clear previous sudo privileges out of respect
sudo -k
## prerequisites
sudo apt-get install python-dev
(cd /tmp;
curl -O https://gist.githubusercontent.com/cyx/11068300/raw/9e6f511117d7d79936f2d20ebb74f81ace76c24b/lua5.2.pc ;
sudo mv lua5.2.pc /usr/lib/pkgconfig/lua5.2.pc
curl -O http://projects.unbit.it/downloads/uwsgi-2.0.3.tar.gz
tar zxvf uwsgi-2.0.3.tar.gz
(cd uwsgi-2.0.3;
UWSGICONFIG_LUAPC=lua5.2 make lua
sudo install uwsgi /usr/local/bin
)
# cleanup
sudo rm -rf /tmp/lua5.2.pc /tmp/uwsgi-2.0.3.tar.gz /tmp/uwsgi-2.0.3
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment