Skip to content

Instantly share code, notes, and snippets.

@ymurase
Created October 15, 2014 08:09
Show Gist options
  • Save ymurase/fbb924dc85e12f0781d4 to your computer and use it in GitHub Desktop.
Save ymurase/fbb924dc85e12f0781d4 to your computer and use it in GitHub Desktop.
OACIS installation script
#!/bin/bash
#########################################
# OACIS installer for Ubuntu14.04 64bit #
#########################################
#build environment
sudo su - -c "
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list
apt-get update
apt-get install -y vim openssh-server git build-essential curl mongodb-org libgdbm-dev libncurses5-dev automake libtool bison libffi-dev gnuplot
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -A INPUT -p tcp -s localhost --dport 3000 -j ACCEPT
iptables -A INPUT -p tcp --dport 3000 -j DROP"
#install rvm and ruby
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 1.9.3
rvm use 1.9.3 --default
gem install bundler
#ssh setting
echo -e "\n" | ssh-keygen -N ""
cat $HOME/.ssh/id_rsa.pub > $HOME/.ssh/authorized_keys
chmod 600 $HOME/.ssh/authorized_keys
#install OACIS
git clone https://github.com/crest-cassia/oacis.git
cd oacis
git checkout master
git pull origin master
git pull origin master --tags
bundle install --path=vendor/bundle
bundle exec rake daemon:start
#open web viewer
firefox localhost:3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment