Skip to content

Instantly share code, notes, and snippets.

@umihico
Last active December 30, 2018 03:02
Show Gist options
  • Save umihico/591f0d3e07b2efda3896443edbd253ef to your computer and use it in GitHub Desktop.
Save umihico/591f0d3e07b2efda3896443edbd253ef to your computer and use it in GitHub Desktop.
setup scripts for baby EC2

setup scripts for baby EC2

How to run

curl https://gist.githubusercontent.com/umihico/591f0d3e07b2efda3896443edbd253ef/raw/install-selector.sh|sudo bash

That's it!

How to use

You'll see menu after curl command above.

MENUS
A:sudo yum -y update
B:sudo yum -y install BASICS
C:timezone to Tokyo
D:install rbenv
E:install pyenv
F:install selenium
G:set git account
H:install docker
I:upload custom ssh welcome screen
J:install google-drive
type alphabets you want:

so type ABCEFGI as example

type alphabets you want:ABCEFGI

then installation will be started.

echo MENUS
echo "A:sudo yum -y update"
echo "B:sudo yum -y install BASICS"
echo "C:timezone to Tokyo"
echo "D:install rbenv"
echo "E:install pyenv"
echo "F:install selenium"
echo "G:set git account"
echo "H:install docker"
echo "I:upload custom ssh welcome screen"
echo "J:install google-drive"
echo "K:install rmate"
echo "L:install java"
read -p 'type alphabets you want:' alphabets
if echo alphabets | grep -q A; then
sudo yum -y update
fi
if echo alphabets | grep -q B; then
sudo yum -y install gcc gcc-c++ make git openssl-devel bzip2-devel zlib-devel readline-devel sqlite-devel tmux libevent libevent-devel
fi
if echo alphabets | grep -q C; then
sudo ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
fi
if echo alphabets | grep -q D; then
curl https://gist.githubusercontent.com/umihico/c925549e74eccd1690287c6dee8e53af/raw/rbenv-ec2-setup.sh|sudo bash -xv
fi
if echo alphabets | grep -q E; then
curl https://gist.githubusercontent.com/umihico/397b0e21a4d5f954ba35416aa28e8b3f/raw/pyenv-ec2-setup.sh|sudo bash -xv
fi
if echo alphabets | grep -q F; then
curl https://gist.githubusercontent.com/umihico/538217c829b6ab34e3ecba32eff22112/raw/selenium-setup-ec2.sh|sudo bash -xv
fi
if echo alphabets | grep -q G; then
git config --global --unset user.email
git config --global --unset user.name
git config --global --add user.email umihico@users.noreply.github.com
git config --global --add user.name umihico
ssh -o StrictHostKeyChecking=no -T git@github.com
ssh -o StrictHostKeyChecking=no -T git@bitbucket.org
fi
if echo alphabets | grep -q H; then
sudo yum -y install docker
sudo service docker start
sudo chkconfig docker on
fi
if echo alphabets | grep -q I; then
curl https://gist.githubusercontent.com/umihico/2b3d28010ab185999eb6eef50ac7c3d7/raw/18e3912d391d711c0915aaa772e40043afcd9e79/install|sudo bash -xv
fi
if echo alphabets | grep -q J; then
curl -JLO https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA&export=download
sudo mv gdrive-linux-x64 /usr/local/bin
sudo chmod +x /usr/local/bin/gdrive-linux-x64
fi
if echo alphabets | grep -q K; then
sudo curl -Lo /usr/local/bin/rmate https://raw.githubusercontent.com/textmate/rmate/master/bin/rmate
sudo chmod +x /usr/local/bin/rmate
fi
if echo alphabets | grep -q J; then
sudo yum -y remove java-1.7.0-openjdk.x86_64
sudo yum -y install java-1.8.0-openjdk-devel.x86_64
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment