openresty.sh 621 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. cd /root
  3. tar -zxf openresty-{{ openresty_version }}.tar.gz
  4. cd openresty-{{ openresty_version }}
  5. ./configure \
  6. --prefix=/usr/local/openresty \
  7. --user=nginx \
  8. --group=nginx \
  9. --with-http_ssl_module \
  10. --with-http_stub_status_module \
  11. --with-http_gunzip_module \
  12. --with-http_gzip_static_module \
  13. --with-http_realip_module \
  14. {% if pcre_path %}
  15. --with-pcre={{ pcre_path }} \
  16. {% else %}
  17. --with-pcre \
  18. {% endif %}
  19. --with-pcre-jit \
  20. --with-http_flv_module \
  21. --with-file-aio \
  22. --with-http_addition_module \
  23. #--add-module=../ngx_cache_purge-master
  24. make -j{{ ansible_processor_vcpus }} && make install
  25. make clean
  26. cd ..