Guest User

Untitled

a guest
Jun 18th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. apt-get install -q -y libcurl4-openssl-dev
  4. gem update passenger
  5.  
  6. /opt/ruby-enterprise/bin/passenger-install-nginx-module << EOF
  7.  
  8. 1
  9. /opt/nginx
  10.  
  11. EOF
  12.  
  13. PASSENGER_VERSION=`gem search -l passenger | cut -d ')' -f 1 - | cut -d '(' -f 2 - | cut -d ',' -f 1`
  14.  
  15. cp /opt/nginx/conf/nginx.conf "/opt/nginx/conf/nginx.conf.before_passenger$PASSENGER_VERSION"
  16.  
  17. sed -i 's|passenger_root .*|passenger_root /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.0;|g' /opt/nginx/conf/nginx.conf
  18.  
  19. service nginx stop
  20. sleep 5
  21. service nginx start
Add Comment
Please, Sign In to add comment