Created
October 10, 2013 04:52
-
-
Save carlcrott/6913208 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GHGVC install script for rails application | |
# Written by Carl Crott <[email protected]> | |
sudo apt-get -y install git-core curl locate | |
git clone http://github.com/delinquentme/ghgvc.git | |
curl -L https://get.rvm.io | bash -s stable --ruby | |
## RVM reqs | |
sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion | |
RVM_DIR=$(which rvm) | |
if [ $RVM_DIR ]; then | |
echo "RVM confirmed" | |
echo "export rvm_trust_rvmrcs_flag=1" > ~/.rvmrc #auto-trust .rvmrc flags | |
source ~/.rvmrc | |
rvm install ruby-1.9.3-p125 | |
rvm --default use ruby-1.9.3-p125 | |
cd ghgvc/ | |
sudo git checkout name_indexing | |
bundle install --without development | |
# build out net-cdf parsing | |
sudo apt-get -y install netcdf-bin libnetcdf-dev | |
cd /home/ubuntu/.rvm/rubies/ruby-1.9.3-p125/bin/ | |
rvm --default use ruby-1.9.3-p125 | |
wget http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/release/ruby-netcdf-0.6.6.tar.gz | |
tar -zxvf ruby-netcdf-0.6.6.tar.gz && cd ruby-netcdf-0.6.6/ | |
ruby -rubygems extconf.rb --with-narray-include=/home/ubuntu/.rvm/gems/ruby-1.9.3-p125@ghgvc/gems/narray-0.6.0.8/ | |
# edit make makefile per: | |
#https://bbs.archlinux.org/viewtopic.php?id=163623 | |
sudo make | |
sudo make install | |
cd ../ && sudo rm -rf ruby-netcdf* | |
# build out and workaround for specifying production | |
RAILS_ENV=production bundle exec rake db:create db:schema:load | |
else | |
echo " SSH back in to re-source RVM " | |
exit | |
fi | |
cat << 'EOF' > /config/setup_load_paths.rb | |
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') | |
begin | |
gems_path = ENV['MY_RUBY_HOME'].split(/@/)[0].sub(/rubies/,'gems') | |
ENV['GEM_PATH'] = "#{gems_path}:#{gems_path}@global" | |
require 'rvm' | |
RVM.use_from_path! File.dirname(File.dirname(__FILE__)) | |
rescue LoadError | |
raise "RVM gem is currently unavailable." | |
end | |
end | |
# If you're not using Bundler at all, remove lines bellow | |
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__)) | |
require 'bundler/setup' | |
EOF | |
## MySQL reqs | |
sudo apt-get -y install libxslt-dev libxml2-dev libsqlite3-dev libmysqlclient-dev | |
cd ~/ghgvc/ | |
###### Server Configs ### | |
sudo useradd deploy | |
sudo apt-get -y update && sudo apt-get -y upgrade | |
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl git-core python-software-properties | |
gem install passenger | |
#passenger-install-nginx-module | |
rvmsudo -E /home/ubuntu/.rvm/wrappers/ruby-1.9.3-p125@ghgvc/ruby /home/ubuntu/.rvm/gems/ruby-1.9.3-p125@ghgvc/gems/passenger-4.0.19/bin/passenger-install-nginx-module | |
sudo chown -R ubuntu /home/ubuntu/ghgvc/* | |
echo 1.9.3-p125@ghgvc >> .ruby-version | |
wget -O init-deb.sh http://library.linode.com/assets/660-init-deb.sh | |
sudo mv init-deb.sh /etc/init.d/nginx | |
sudo chmod +x /etc/init.d/nginx | |
sudo /usr/sbin/update-rc.d -f nginx defaults | |
cat <<'EOF' > ~/ghgvc/config/database.yml | |
development: | |
adapter: mysql2 | |
database: ghgvc_dev | |
pool: 5 | |
timeout: 5000 | |
test: | |
adapter: sqlite3 | |
database: db/test.sqlite3 | |
pool: 5 | |
timeout: 5000 | |
production: | |
adapter: sqlite3 | |
database: db/prod.sqlite3 | |
pool: 5 | |
timeout: 5000 | |
EOF | |
# irb | |
# require 'numru/netcdf' | |
sudo service nginx stop | |
sudo rm /opt/nginx/conf/nginx.conf | |
sudo cat <<'EOF' > nginx.conf | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
passenger_root /home/ubuntu/.rvm/gems/ruby-1.9.3-p125@ghgvc/gems/passenger-4.0.19; | |
passenger_ruby /home/ubuntu/.rvm/wrappers/ruby-1.9.3-p125@ghgvc/ruby; | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
root /home/ubuntu/ghgvc/public; # <--- be sure to point to 'public'! | |
passenger_enabled on; | |
index index.html index.htm; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
} | |
} | |
EOF | |
sudo cp nginx.conf /opt/nginx/conf/nginx.conf | |
sudo service nginx start | |
sudo apt-add-repository -y ppa:chris-lea/node.js | |
sudo apt-get -y install nodejs | |
sudo service nginx restart | |
echo "Nginx configured" | |
echo "Installing ghgvcR libs" | |
cd ~/ | |
git clone http://github.com/delinquentme/ghgvcR | |
git clone http://github.com/PecanProject/pecan | |
echo "deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu precise/" >> /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get -y install libcurl4-gnutls-dev r-cran-xml | |
# devtools: | |
#http://stackoverflow.com/questions/16467725/r-devtools-github-install-fails | |
echo "configure R and devtools for ghgvcR code" | |
#git clone git://github.com/hadley/devtools.git && R CMD build devtools | |
#R CMD install devtools_1.3.99.tar.gz /home/ubuntu/R/x86_64-pc-linux-gnu-library/2.14/ | |
#sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu `lsb_release -s -c`/" > /etc/apt/sources.list.d/R.list | |
#sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 | |
#sudo apt-get -y update && sudo apt-get -y upgrade | |
#sudo apt-get -y install build-essential git gfortran openmpi-bin libhdf5-openmpi-dev r-base-core jags liblapack-dev libnetcdf-dev netcdf-bin bc libcurl4-openssl-dev curl udunits-bin libudunits2-dev libmysqlclient-dev | |
#sudo apt-get -y install libgdal1-dev libproj-dev | |
#echo 'install.packages("devtools", repos="http://cran.rstudio.com/")' | R --vanilla | |
#echo 'install.packages("devtools", repos="http://cran.rstudio.com/")' | R --vanilla | |
sudo apt-get -y install gksu | |
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 | |
gpg -a --export E084DAB9 | sudo apt-key add - | |
sudo echo "deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu precise/" >> /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get -y install r-base | |
######################## | |
sudo cat <<'EOF' > ./build_ghgvcR.r | |
install.packages("devtools") # this causes issues on ubuntu 12.04 | |
install.packages("RCurl"); install.packages("rjson"); install.packages("httr") | |
library(devtools) | |
install("~/ghgvcR/") | |
install("/home/thrive/rails_projects/PEcAn/utils") | |
EOF | |
############################## | |
sudo chmod 0755 ./build_ghgvcR.r && ./build_ghgvcR.r | |
cd ~/ghgvcR/ | |
sudo chmod 0755 /src/ghgvc_script.R | |
./src/ghgvc_script.R | |
#sudo apt-get -y install r-base-core=2.15.3* r-recommended=2.15.3* r-doc-html=2.15.3* r-base=2.15.3* | |
#$IP_ADDY=$(curl http://canhazip.com/) | |
#http://ec2-184-73-47-14.compute-1.amazonaws.com/ | |
echo "GHGVC Server build complete." | |
#ssh -v -i ~/.ec2/ec2.pem [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@ip-10-145-231-204:~$ sudo nano ghgvc.sh | |
ubuntu@ip-10-145-231-204:~$ sudo chmod 0755 ghgvc.sh | |
ubuntu@ip-10-145-231-204:~$ sudo ./ghgvc.sh | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
curl is already the newest version. | |
The following extra packages will be installed: | |
git git-man liberror-perl | |
Suggested packages: | |
git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn git-email git-gui gitk gitweb | |
The following NEW packages will be installed: | |
git git-core git-man liberror-perl locate | |
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. | |
Need to get 6,840 kB of archives. | |
After this operation, 15.6 MB of additional disk space will be used. | |
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main liberror-perl all 0.17-1 [23.8 kB] | |
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main git-man all 1:1.7.9.5-1 [630 kB] | |
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main git amd64 1:1.7.9.5-1 [6,087 kB] | |
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main git-core all 1:1.7.9.5-1 [1,384 B] | |
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe locate amd64 4.4.2-4ubuntu1 [98.0 kB] | |
Fetched 6,840 kB in 0s (13.4 MB/s) | |
Selecting previously unselected package liberror-perl. | |
(Reading database ... 47481 files and directories currently installed.) | |
Unpacking liberror-perl (from .../liberror-perl_0.17-1_all.deb) ... | |
Selecting previously unselected package git-man. | |
Unpacking git-man (from .../git-man_1%3a1.7.9.5-1_all.deb) ... | |
Selecting previously unselected package git. | |
Unpacking git (from .../git_1%3a1.7.9.5-1_amd64.deb) ... | |
Selecting previously unselected package git-core. | |
Unpacking git-core (from .../git-core_1%3a1.7.9.5-1_all.deb) ... | |
Selecting previously unselected package locate. | |
Unpacking locate (from .../locate_4.4.2-4ubuntu1_amd64.deb) ... | |
Processing triggers for initramfs-tools ... | |
update-initramfs: Generating /boot/initrd.img-3.2.0-53-virtual | |
Processing triggers for man-db ... | |
Setting up liberror-perl (0.17-1) ... | |
Setting up git-man (1:1.7.9.5-1) ... | |
Setting up git (1:1.7.9.5-1) ... | |
Setting up git-core (1:1.7.9.5-1) ... | |
Setting up locate (4.4.2-4ubuntu1) ... | |
Cloning into 'ghgvc'... | |
remote: Counting objects: 2157, done. | |
remote: Compressing objects: 100% (971/971), done. | |
remote: Total 2157 (delta 1201), reused 2087 (delta 1139) | |
Receiving objects: 100% (2157/2157), 1.08 GiB | 34.98 MiB/s, done. | |
Resolving deltas: 100% (1201/1201), done. | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 184 100 184 0 0 182 0 0:00:01 0:00:01 --:--:-- 220 | |
100 15779 100 15779 0 0 12470 0 0:00:01 0:00:01 --:--:-- 906k | |
Please read and follow further instructions. | |
Press ENTER to continue. | |
Downloading RVM from wayneeseguin branch stable | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 124 100 124 0 0 3572 0 --:--:-- --:--:-- --:--:-- 4960 | |
100 1082k 100 1082k 0 0 4320k 0 --:--:-- --:--:-- --:--:-- 4320k | |
Creating group 'rvm' | |
Installing RVM to /usr/local/rvm/ | |
Installation of RVM in /usr/local/rvm/ is almost complete: | |
* First you need to add all users that will be using rvm to 'rvm' group, | |
and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`. | |
* To start using RVM you need to run `source /etc/profile.d/rvm.sh` | |
in all your open shell windows, in rare cases you need to reopen all shell windows. | |
# ubuntu, | |
# | |
# Thank you for using RVM! | |
# I sincerely hope that RVM helps to make your life easier and more enjoyable!!! | |
# | |
# ~Wayne | |
# In case of problems: | |
# run and read: rvm notes | |
# read docs: http://rvm.io/ | |
# talk to us: http://webchat.freenode.net/?channels=rvm (http://freenode.net/faq.shtml#plusr) | |
# read cheatsheet: http://cheat.errtheblog.com/s/rvm | |
# watch screencast: http://screencasts.org/episodes/how-to-use-rvm | |
# open a bug report: https://github.com/wayneeseguin/rvm/issues | |
rvm 1.23.0 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] | |
Searching for binary rubies, this might take some time. | |
Checking requirements for ubuntu. | |
Installing requirements for ubuntu. | |
Updating system...................................... | |
Installing required packages: gawk, g++, gcc, make, libc6-dev, libreadline6-dev, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, pkg-config, libffi-dev....................................................................................................................................................................................... | |
Requirements installation successful. | |
ruby-2.0.0-p247 - #configure | |
ruby-2.0.0-p247 - #download | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 19.0M 100 19.0M 0 0 3928k 0 0:00:04 0:00:04 --:--:-- 4546k | |
ruby-2.0.0-p247 - #validate archive | |
ruby-2.0.0-p247 - #extract | |
ruby-2.0.0-p247 - #validate binary | |
ruby-2.0.0-p247 - #setup | |
Saving wrappers to '/usr/local/rvm/wrappers/ruby-2.0.0-p247'........ | |
ruby-2.0.0-p247 - #importing default gemsets, this may take time....................... | |
Creating alias default for ruby-2.0.0-p247. | |
Recording alias default for ruby-2.0.0-p247. | |
Creating default links/files | |
Saving wrappers to '/usr/local/rvm/bin'........ | |
* To start using RVM you need to run `source /usr/local/rvm/scripts/rvm` | |
in all your open shell windows, in rare cases you need to reopen all shell windows. | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev' | |
Note, selecting 'libncurses5-dev' instead of 'ncurses-dev' | |
autoconf is already the newest version. | |
automake is already the newest version. | |
bison is already the newest version. | |
git-core is already the newest version. | |
libncurses5-dev is already the newest version. | |
libreadline6 is already the newest version. | |
libreadline6-dev is already the newest version. | |
libtool is already the newest version. | |
libyaml-dev is already the newest version. | |
zlib1g is already the newest version. | |
zlib1g-dev is already the newest version. | |
libc6-dev is already the newest version. | |
libsqlite3-0 is already the newest version. | |
libsqlite3-dev is already the newest version. | |
libssl-dev is already the newest version. | |
openssl is already the newest version. | |
sqlite3 is already the newest version. | |
The following extra packages will be installed: | |
dpkg-dev fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapr1 libaprutil1 libdb4.8 libdpkg-perl libneon27-gnutls libsvn1 libxslt1.1 | |
Suggested packages: | |
debian-keyring subversion-tools db4.8-util | |
The following NEW packages will be installed: | |
build-essential dpkg-dev fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapr1 libaprutil1 libdb4.8 libdpkg-perl libneon27-gnutls libsvn1 libxml2-dev | |
libxslt1-dev libxslt1.1 subversion | |
The following packages will be upgraded: | |
curl | |
1 upgraded, 16 newly installed, 0 to remove and 37 not upgraded. | |
Need to get 4,528 kB of archives. | |
After this operation, 14.5 MB of additional disk space will be used. | |
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libdb4.8 amd64 4.8.30-11ubuntu1 [679 kB] | |
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libapr1 amd64 1.4.6-1 [89.6 kB] | |
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libaprutil1 amd64 1.3.12+dfsg-3 [74.6 kB] | |
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libneon27-gnutls amd64 0.29.6-1ubuntu1 [76.4 kB] | |
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libsvn1 amd64 1.6.17dfsg-3ubuntu3.3 [820 kB] | |
Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libxslt1.1 amd64 1.1.26-8ubuntu1.3 [167 kB] | |
Get:7 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libdpkg-perl all 1.16.1.2ubuntu7.1 [180 kB] | |
Get:8 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main dpkg-dev all 1.16.1.2ubuntu7.1 [469 kB] | |
Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main build-essential amd64 11.5ubuntu2.1 [5,816 B] | |
Get:10 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main curl amd64 7.22.0-3ubuntu4.3 [138 kB] | |
Get:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main fakeroot amd64 1.18.2-1 [87.2 kB] | |
Get:12 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libalgorithm-diff-perl all 1.19.02-2 [50.7 kB] | |
Get:13 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libalgorithm-diff-xs-perl amd64 0.04-2build2 [12.4 kB] | |
Get:14 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libalgorithm-merge-perl all 0.08-2 [12.7 kB] | |
Get:15 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libxml2-dev amd64 2.7.8.dfsg-5.1ubuntu4.6 [805 kB] | |
Get:16 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libxslt1-dev amd64 1.1.26-8ubuntu1.3 [564 kB] | |
Get:17 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main subversion amd64 1.6.17dfsg-3ubuntu3.3 [297 kB] | |
Fetched 4,528 kB in 1s (4,045 kB/s) | |
Selecting previously unselected package libdb4.8. | |
(Reading database ... 51153 files and directories currently installed.) | |
Unpacking libdb4.8 (from .../libdb4.8_4.8.30-11ubuntu1_amd64.deb) ... | |
Selecting previously unselected package libapr1. | |
Unpacking libapr1 (from .../libapr1_1.4.6-1_amd64.deb) ... | |
Selecting previously unselected package libaprutil1. | |
Unpacking libaprutil1 (from .../libaprutil1_1.3.12+dfsg-3_amd64.deb) ... | |
Selecting previously unselected package libneon27-gnutls. | |
Unpacking libneon27-gnutls (from .../libneon27-gnutls_0.29.6-1ubuntu1_amd64.deb) ... | |
Selecting previously unselected package libsvn1. | |
Unpacking libsvn1 (from .../libsvn1_1.6.17dfsg-3ubuntu3.3_amd64.deb) ... | |
Selecting previously unselected package libxslt1.1. | |
Unpacking libxslt1.1 (from .../libxslt1.1_1.1.26-8ubuntu1.3_amd64.deb) ... | |
Selecting previously unselected package libdpkg-perl. | |
Unpacking libdpkg-perl (from .../libdpkg-perl_1.16.1.2ubuntu7.1_all.deb) ... | |
Selecting previously unselected package dpkg-dev. | |
Unpacking dpkg-dev (from .../dpkg-dev_1.16.1.2ubuntu7.1_all.deb) ... | |
Selecting previously unselected package build-essential. | |
Unpacking build-essential (from .../build-essential_11.5ubuntu2.1_amd64.deb) ... | |
Preparing to replace curl 7.22.0-3ubuntu4.2 (using .../curl_7.22.0-3ubuntu4.3_amd64.deb) ... | |
Unpacking replacement curl ... | |
Selecting previously unselected package fakeroot. | |
Unpacking fakeroot (from .../fakeroot_1.18.2-1_amd64.deb) ... | |
Selecting previously unselected package libalgorithm-diff-perl. | |
Unpacking libalgorithm-diff-perl (from .../libalgorithm-diff-perl_1.19.02-2_all.deb) ... | |
Selecting previously unselected package libalgorithm-diff-xs-perl. | |
Unpacking libalgorithm-diff-xs-perl (from .../libalgorithm-diff-xs-perl_0.04-2build2_amd64.deb) ... | |
Selecting previously unselected package libalgorithm-merge-perl. | |
Unpacking libalgorithm-merge-perl (from .../libalgorithm-merge-perl_0.08-2_all.deb) ... | |
Selecting previously unselected package libxml2-dev. | |
Unpacking libxml2-dev (from .../libxml2-dev_2.7.8.dfsg-5.1ubuntu4.6_amd64.deb) ... | |
Selecting previously unselected package libxslt1-dev. | |
Unpacking libxslt1-dev (from .../libxslt1-dev_1.1.26-8ubuntu1.3_amd64.deb) ... | |
Selecting previously unselected package subversion. | |
Unpacking subversion (from .../subversion_1.6.17dfsg-3ubuntu3.3_amd64.deb) ... | |
Processing triggers for man-db ... | |
Setting up libdb4.8 (4.8.30-11ubuntu1) ... | |
Setting up libapr1 (1.4.6-1) ... | |
Setting up libaprutil1 (1.3.12+dfsg-3) ... | |
Setting up libneon27-gnutls (0.29.6-1ubuntu1) ... | |
Setting up libsvn1 (1.6.17dfsg-3ubuntu3.3) ... | |
Setting up libxslt1.1 (1.1.26-8ubuntu1.3) ... | |
Setting up libdpkg-perl (1.16.1.2ubuntu7.1) ... | |
Setting up dpkg-dev (1.16.1.2ubuntu7.1) ... | |
Setting up build-essential (11.5ubuntu2.1) ... | |
Setting up curl (7.22.0-3ubuntu4.3) ... | |
Setting up fakeroot (1.18.2-1) ... | |
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode. | |
Setting up libalgorithm-diff-perl (1.19.02-2) ... | |
Setting up libalgorithm-diff-xs-perl (0.04-2build2) ... | |
Setting up libalgorithm-merge-perl (0.08-2) ... | |
Setting up libxml2-dev (2.7.8.dfsg-5.1ubuntu4.6) ... | |
Setting up libxslt1-dev (1.1.26-8ubuntu1.3) ... | |
Setting up subversion (1.6.17dfsg-3ubuntu3.3) ... | |
Processing triggers for libc-bin ... | |
ldconfig deferred processing now taking place | |
SSH back in to re-source RVM | |
ubuntu@ip-10-145-231-204:~$ logout | |
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 | |
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0 | |
debug1: channel 0: free: client-session, nchannels 1 | |
Connection to ec2-54-211-180-228.compute-1.amazonaws.com closed. | |
Transferred: sent 6176, received 70384 bytes, in 416.9 seconds | |
Bytes per second: sent 14.8, received 168.8 | |
debug1: Exit status 0 | |
thrive@thrive-laptop:~$ echo "###############################\n############ SSHd BACK IN ##############"\n####################### | |
###############################\n############ SSHd BACK IN ##############n####################### | |
thrive@thrive-laptop:~$ ssh -v -i ~/.ec2/ec2.pem [email protected] | |
OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009 | |
debug1: Reading configuration data /home/thrive/.ssh/config | |
debug1: Reading configuration data /etc/ssh/ssh_config | |
debug1: Applying options for * | |
debug1: Connecting to ec2-54-211-180-228.compute-1.amazonaws.com [54.211.180.228] port 22. | |
debug1: Connection established. | |
debug1: identity file /home/thrive/.ec2/ec2.pem type -1 | |
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1.1 | |
debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.1 pat OpenSSH* | |
debug1: Enabling compatibility mode for protocol 2.0 | |
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7 | |
debug1: SSH2_MSG_KEXINIT sent | |
debug1: SSH2_MSG_KEXINIT received | |
debug1: kex: server->client aes128-ctr hmac-md5 none | |
debug1: kex: client->server aes128-ctr hmac-md5 none | |
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent | |
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP | |
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent | |
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY | |
debug1: Host 'ec2-54-211-180-228.compute-1.amazonaws.com' is known and matches the RSA host key. | |
debug1: Found key in /home/thrive/.ssh/known_hosts:96 | |
debug1: ssh_rsa_verify: signature correct | |
debug1: SSH2_MSG_NEWKEYS sent | |
debug1: expecting SSH2_MSG_NEWKEYS | |
debug1: SSH2_MSG_NEWKEYS received | |
debug1: SSH2_MSG_SERVICE_REQUEST sent | |
debug1: SSH2_MSG_SERVICE_ACCEPT received | |
debug1: Authentications that can continue: publickey | |
debug1: Next authentication method: publickey | |
debug1: Offering public key: [email protected] | |
debug1: Authentications that can continue: publickey | |
debug1: Trying private key: /home/thrive/.ec2/ec2.pem | |
debug1: read PEM private key done: type RSA | |
debug1: Authentication succeeded (publickey). | |
debug1: channel 0: new [client-session] | |
debug1: Requesting [email protected] | |
debug1: Entering interactive session. | |
debug1: Sending environment. | |
debug1: Sending env LANG = en_US.utf8 | |
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-53-virtual x86_64) | |
* Documentation: https://help.ubuntu.com/ | |
System information as of Thu Oct 10 04:51:33 UTC 2013 | |
System load: 0.33 Processes: 65 | |
Usage of /: 60.9% of 7.87GB Users logged in: 0 | |
Memory usage: 14% IP address for eth0: 10.145.231.204 | |
Swap usage: 0% | |
Graph this data and manage this system at https://landscape.canonical.com/ | |
Get cloud support with Ubuntu Advantage Cloud Guest: | |
http://www.ubuntu.com/business/services/cloud | |
Use Juju to deploy your cloud instances and workloads: | |
https://juju.ubuntu.com/#cloud-precise | |
Last login: Thu Oct 10 04:44:09 2013 from 66.233.132.203 | |
ubuntu@ip-10-145-231-204:~$ ./ghgvc | |
-bash: ./ghgvc: Is a directory | |
ubuntu@ip-10-145-231-204:~$ ./ghgvc.sh | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
git-core is already the newest version. | |
locate is already the newest version. | |
curl is already the newest version. | |
0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded. | |
fatal: destination path 'ghgvc' already exists and is not an empty directory. | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 184 100 184 0 0 529 0 --:--:-- --:--:-- --:--:-- 661 | |
100 15779 100 15779 0 0 38859 0 --:--:-- --:--:-- --:--:-- 38859 | |
Please read and follow further instructions. | |
Press ENTER to continue. | |
bash: line 584: /usr/local/rvm/RELEASE: Permission denied | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev' | |
Note, selecting 'libncurses5-dev' instead of 'ncurses-dev' | |
autoconf is already the newest version. | |
automake is already the newest version. | |
bison is already the newest version. | |
git-core is already the newest version. | |
libncurses5-dev is already the newest version. | |
libreadline6 is already the newest version. | |
libreadline6-dev is already the newest version. | |
libtool is already the newest version. | |
libyaml-dev is already the newest version. | |
zlib1g is already the newest version. | |
zlib1g-dev is already the newest version. | |
build-essential is already the newest version. | |
curl is already the newest version. | |
libc6-dev is already the newest version. | |
libsqlite3-0 is already the newest version. | |
libsqlite3-dev is already the newest version. | |
libssl-dev is already the newest version. | |
libxml2-dev is already the newest version. | |
libxslt1-dev is already the newest version. | |
openssl is already the newest version. | |
sqlite3 is already the newest version. | |
subversion is already the newest version. | |
0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded. | |
RVM confirmed | |
mkdir: cannot create directory `/usr/local/rvm/log/ruby-1.9.3-p125': Permission denied | |
Could not detect ruby version/name for installation, please be more specific. | |
RVM is not a function, selecting rubies with 'rvm use ...' will not work. | |
You need to change your terminal emulator preferences to allow login shell. | |
Sometimes it is required to use `/bin/bash --login` as the command. | |
Please visit https://rvm.io/integration/gnome-terminal/ for a example. | |
Branch name_indexing set up to track remote branch name_indexing from origin. | |
Switched to a new branch 'name_indexing' | |
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! | |
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir': Permission denied - /home/ubuntu/ghgvc/.bundle (Errno::EACCES) | |
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir' | |
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p' | |
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each' | |
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p' | |
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:203:in `each' | |
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/settings.rb:127:in `set_key' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/settings.rb:17:in `[]=' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/settings.rb:79:in `without=' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/cli.rb:237:in `install' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/bin/bundle:23:in `load' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/bin/bundle:23:in `<main>' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/bin/ruby_executable_hooks:15:in `eval' | |
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/bin/ruby_executable_hooks:15:in `<main>' | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following extra packages will be installed: | |
libgfortran3 libhdf5-serial-1.8.4 libnetcdf6 | |
Suggested packages: | |
netcdf-doc | |
The following NEW packages will be installed: | |
libgfortran3 libhdf5-serial-1.8.4 libnetcdf-dev libnetcdf6 netcdf-bin | |
0 upgraded, 5 newly installed, 0 to remove and 37 not upgraded. | |
Need to get 3,075 kB of archives. | |
After this operation, 11.5 MB of additional disk space will be used. | |
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libgfortran3 amd64 4.6.3-1ubuntu5 [357 kB] | |
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe libhdf5-serial-1.8.4 amd64 1.8.4-patch1-3ubuntu2 [1,408 kB] | |
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe libnetcdf6 amd64 1:4.1.1-6 [481 kB] | |
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe libnetcdf-dev amd64 1:4.1.1-6 [644 kB] | |
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe netcdf-bin amd64 1:4.1.1-6 [185 kB] | |
Fetched 3,075 kB in 0s (5,901 kB/s) | |
Selecting previously unselected package libgfortran3. | |
(Reading database ... 51834 files and directories currently installed.) | |
Unpacking libgfortran3 (from .../libgfortran3_4.6.3-1ubuntu5_amd64.deb) ... | |
Selecting previously unselected package libhdf5-serial-1.8.4. | |
Unpacking libhdf5-serial-1.8.4 (from .../libhdf5-serial-1.8.4_1.8.4-patch1-3ubuntu2_amd64.deb) ... | |
Selecting previously unselected package libnetcdf6. | |
Unpacking libnetcdf6 (from .../libnetcdf6_1%3a4.1.1-6_amd64.deb) ... | |
Selecting previously unselected package libnetcdf-dev. | |
Unpacking libnetcdf-dev (from .../libnetcdf-dev_1%3a4.1.1-6_amd64.deb) ... | |
Selecting previously unselected package netcdf-bin. | |
Unpacking netcdf-bin (from .../netcdf-bin_1%3a4.1.1-6_amd64.deb) ... | |
Processing triggers for man-db ... | |
Setting up libgfortran3 (4.6.3-1ubuntu5) ... | |
Setting up libhdf5-serial-1.8.4 (1.8.4-patch1-3ubuntu2) ... | |
Setting up libnetcdf6 (1:4.1.1-6) ... | |
Setting up libnetcdf-dev (1:4.1.1-6) ... | |
Setting up netcdf-bin (1:4.1.1-6) ... | |
Processing triggers for libc-bin ... | |
ldconfig deferred processing now taking place | |
./ghgvc.sh: line 32: cd: /home/ubuntu/.rvm/rubies/ruby-1.9.3-p125/bin/: No such file or directory | |
RVM is not a function, selecting rubies with 'rvm use ...' will not work. | |
You need to change your terminal emulator preferences to allow login shell. | |
Sometimes it is required to use `/bin/bash --login` as the command. | |
Please visit https://rvm.io/integration/gnome-terminal/ for a example. | |
--2013-10-10 04:51:55-- http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/release/ruby-netcdf-0.6.6.tar.gz | |
Resolving www.gfd-dennou.org (www.gfd-dennou.org)... 130.54.59.159 | |
Connecting to www.gfd-dennou.org (www.gfd-dennou.org)|130.54.59.159|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 74868 (73K) [application/x-gzip] | |
ruby-netcdf-0.6.6.tar.gz: Permission denied | |
Cannot write to `ruby-netcdf-0.6.6.tar.gz' (Permission denied). | |
tar (child): ruby-netcdf-0.6.6.tar.gz: Cannot open: No such file or directory | |
tar (child): Error is not recoverable: exiting now | |
tar: Child returned status 2 | |
tar: Error is not recoverable: exiting now | |
ruby: No such file or directory -- extconf.rb (LoadError) | |
make: *** No targets specified and no makefile found. Stop. | |
make: *** No rule to make target `install'. Stop. | |
Could not locate Gemfile | |
ubuntu@ip-10-145-231-204:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment