Skip to content

Instantly share code, notes, and snippets.

@croudsky croudsky/

Last active Aug 29, 2015
What would you like to do?
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のダウンロード ■■"
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
echo "■■ libmcryptのダウンロード ■■"
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 ~/.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 | patch -u php-build -
# 未検証ここまで
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/
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
You can’t perform that action at this time.