openresty.sh 694 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. fw_depends lua
  3. fw_installed openresty && return 0
  4. OPENRESTY_VERSION="1.11.2.1"
  5. OPENRESTY=$IROOT/openresty
  6. OPENRESTY_HOME=$OPENRESTY-$OPENRESTY_VERSION
  7. fw_get -O http://openresty.org/download/openresty-$OPENRESTY_VERSION.tar.gz
  8. fw_untar openresty-$OPENRESTY_VERSION.tar.gz
  9. cd openresty-$OPENRESTY_VERSION
  10. ./configure --with-http_postgres_module --prefix=$OPENRESTY_HOME --with-luajit-xcflags="-DLUAJIT_NUMMODE=2 -O3" --with-cc-opt="-O3" -j4
  11. make -j4 --quiet
  12. make --quiet install
  13. echo "export OPENRESTY_HOME=${OPENRESTY_HOME}" > $IROOT/openresty.installed
  14. echo -e "export PATH=\$OPENRESTY_HOME/nginx/sbin:\$PATH" >> $IROOT/openresty.installed
  15. source $IROOT/openresty.installed