ayumu_aoの日記

SIerから事業会社に転職したエンジニアがなにかを垂れ流してます

Rails環境構築メモ書き

Ruby on Rails環境構築のコマンドメモ

vagrantとかEC2で環境構築した際のコマンドメモです。

    1  ll
    2  ruby -v
    3  rbenv
    4  yum update
    5  sudo yum update
    6  git -v
    7  sudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison git
    8  git -v
    9  git --version
   10  git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
   11  echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
   12  echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
   13  source ~/.bashrc
   14  exec $SHELL -l
   15  git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
   16  cd ~/.rbenv/plugins/ruby-build
   17  sudo ./install.sh
   18  rbenv install -l
   19  rbenv install 2.4.0
   20  rbenv global 2.4.0
   21  ruby -v
   22  which gem
   23  which ruby
   24  rbenv versions
   25  gem install bundler --no-rdoc --no-ri
   26  sudo rbenv rehash
   27  rbenv rehash
   28  gem install rails
   2X  gem install bundler
   2X  gem install rdoc
   29  rbenv rehash
   30  rails -v
   31  which rails
   32  cd
   33  sudo yum -y install mariadb-server
   34  sudo vi /etc/my.cnf
   35  sudo systemctl start mariadb
   36  sudo systemctl enable mariadb
   37  sudo mysql_secure_installation
   38  mysql -u root -p
   39  sudo yum install mysql-devel
   40  gem install mysql2
   41  cd /vagrant_data/
   42  ll
   43  exit