nginx.sh 535 B

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