Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. require 'net/ssh'
  2.  
  3. Net::SSH.start('xx.xx.xxx.xxx', 'root', :password => "XxXxXxX") do |ssh|
  4.  
  5. # Execute Wazir-Init.sh file present in Home Directory
  6. ssh.exec "/home/wazir-init.sh"
  7. puts "Executing Wazir-init.sh"
  8.  
  9. end
  10.  
  11. #!/bin/sh
  12. sudo apt-get -y update
  13. sudo apt-get -y install git-core git curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
  14. sudo apt-get -y update
  15. gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
  16. curl -sSL https://get.rvm.io | bash -s stable --rails
  17. echo "source /usr/local/rvm/scripts/rvm" >> ~/.bashrc
  18. if [ -s "/usr/local/rvm/scripts/rvm" ] ; then
  19. echo "using root with source /usr/local/rvm/scripts/rvm"
  20. eval "ruby -v"
  21. echo "Ruby and Ruby on Rails Successfully Installed."
  22. eval "gem install bundler"
  23. else
  24. echo "ERROR: Wazir-RVM-E101"
  25. fi
  26. rm -rf wazir-init.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement