Last active
August 29, 2015 14:05
-
-
Save croudsky/e0d76bd94e9928c81a88 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
set -e | |
source ~/.bash_profile | |
echo "■■ Updates packages. Asks for your password. ■■" | |
sudo yum update -y | |
echo "■■ Installs packages. Give your password when asked. ■■" | |
sudo yum groupinstall -y 'Development tools' | |
sudo yum install -y git mysql-server gcc gcc-c++ make openssl-devel re2c libmcrypt libmcrypt-devel libxml2-devel bison bison-devel curl-devel libjpeg-devel libpng-devel libmcrypt-devel readline-devel libtidy-devel libxslt-devel httpd-devel enchant-devel libXpm libXpm-devel freetype-devel t1lib t1lib-devel gmp-devel libc-client-devel libicu-devel oniguruma-devel net-snmp net-snmp-devel bzip2-devel libtool-ltdl-devel subversion httpd ImageMagick ImageMagick-devel libmcrypt-devel | |
sudo chmod -R 777 /usr/local/ | |
echo "■■ re2cのダウンロード ■■" | |
wget http://downloads.sourceforge.net/project/re2c/re2c/0.14.3/re2c-0.14.3.tar.gz | |
tar zxvf re2c-0.14.3.tar.gz | |
cd re2c-0.14.3 | |
sudo ./configure --prefix=/usr/local/re2c-0.14.3 | |
sudo make && make install | |
cd | |
echo "■■ libmcryptのダウンロード ■■" | |
wget http://elders.princeton.edu/data/puias/unsupported/6/x86_64/libmcrypt-2.5.8-9.puias6.x86_64.rpm | |
wget http://elders.princeton.edu/data/puias/unsupported/6/x86_64/libmcrypt-devel-2.5.8-9.puias6.x86_64.rpm | |
sudo rpm -ivh libmcrypt-2.5.8-9.puias6.x86_64.rpm | |
sudo rpm -ivh libmcrypt-devel-2.5.8-9.puias6.x86_64.rpm | |
echo "■■ anyenv のインストール ■■" | |
git clone https://github.com/riywo/anyenv ~/.anyenv | |
echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(anyenv init -)"' >> ~/.bash_profile | |
source ~/.bash_profile | |
echo "■■ phpenv のインストール ■■" | |
anyenv install phpenv | |
echo "■■ rbenv のインストール ■■" | |
anyenv install rbenv | |
echo "■■ ndenv のインストール ■■" | |
anyenv install ndenv | |
# exec $SHELL -l | |
source ~/.bash_profile | |
echo "■■ php のインストール ■■" | |
# ここは未検証 | |
echo "--with-apxs2=/usr/bin/apxs2" >> ~/.anyenv/envs/phpenv/plugins/php-build/share/php-build/default_configure_options | |
cd ~/.anyenv/envs/phpenv/plugins/php-build/bin | |
curl https://gist.githubusercontent.com/tkuchiki/10112836/raw/php-build.patch | patch -u php-build - | |
cd | |
# 未検証ここまで | |
phpenv install 5.4.28 | |
phpenv global 5.4.28 | |
phpenv rehash | |
echo "■■ ruby のインストール ■■" | |
rbenv install 2.2.2 | |
rbenv global 2.2.2 | |
echo "■■ node のインストール ■■" | |
ndenv install v0.12.7 | |
ndenv global v0.12.7 | |
ndenv rehash | |
cd /usr/local/src/ | |
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2 | |
tar jxvf phantomjs-1.9.0-linux-x86_64.tar.bz2 | |
sudo cp phantomjs-1.9.0-linux-x86_64/bin/phantomjs /usr/bin/ | |
echo "■■ ruby_gems のインストール ■■" | |
gem install bundler | |
rbenv rehash | |
sudo chmod -R 755 /usr/local/ | |
echo -n "Should be mysql: " | |
mysql --version | |
echo -n "Should be ruby 2.2.2: " | |
ruby -v | cut -d " " -f 2 | |
echo -n "Should be php: " | |
php -v | cut -d " " -f 2 | |
echo -n "Should be phantomjs: " | |
phantomjs --version | |
echo "おめでとうございます!終了です。 | |
もしバージョンが一致する場合は、すべてが正確にインストールされています。 | |
エラーが示される場合、自動ではインストールできなかった可能性があります。 | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment