Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'net/ssh'
- Net::SSH.start('xx.xx.xxx.xxx', 'root', :password => "XxXxXxX") do |ssh|
- # Execute Wazir-Init.sh file present in Home Directory
- ssh.exec "/home/wazir-init.sh"
- puts "Executing Wazir-init.sh"
- end
- #!/bin/sh
- sudo apt-get -y update
- 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
- sudo apt-get -y update
- gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
- curl -sSL https://get.rvm.io | bash -s stable --rails
- echo "source /usr/local/rvm/scripts/rvm" >> ~/.bashrc
- if [ -s "/usr/local/rvm/scripts/rvm" ] ; then
- echo "using root with source /usr/local/rvm/scripts/rvm"
- eval "ruby -v"
- echo "Ruby and Ruby on Rails Successfully Installed."
- eval "gem install bundler"
- else
- echo "ERROR: Wazir-RVM-E101"
- fi
- rm -rf wazir-init.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement