nginx.sh 567 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. fw_installed nginx && return 0
  3. VERSION="1.12.0"
  4. NGINX_HOME=$IROOT/nginx
  5. fw_get -O http://nginx.org/download/nginx-${VERSION}.tar.gz
  6. fw_untar nginx-${VERSION}.tar.gz
  7. cd nginx-${VERSION}
  8. # There is no --quiet flag that I could find...
  9. echo "Configuring nginx..."
  10. ./configure --prefix=$NGINX_HOME > /dev/null
  11. echo "Compiling and installing nginx..."
  12. make --quiet
  13. make --quiet install
  14. echo "export NGINX_HOME=${NGINX_HOME}" > $IROOT/nginx.installed
  15. echo -e "export PATH=\$NGINX_HOME/sbin:\$PATH" >> $IROOT/nginx.installed
  16. source $IROOT/nginx.installed