0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

HomebrewとMysqlの環境構築 

Last updated at Posted at 2019-11-20

Homwbrewを用意する

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"  

必要に応じて

brew update

権限の変更

sudo chown -R `whoami`:admin /usr/local/bin

rubyインストール

brew install rbenv ruby-build

rbenvをターミナルから使えるように

 echo 'eval "$(rbenv init -)"' >> ~/.zshrc

zshrcの変更を反映

source ~/.zshrc

readlineをインストール

brew install readline

brew link readline --force

rubyインストール

RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline)"

rbenv install

mysqlをインストール

@以下はお好み?
brew install mysql@5.6

brew  reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/f171f1c74/Formula/mysql@5.6.rb

自動起動設定

mkdir ~/Library/LaunchAgents 

ln -sfv /usr/local/opt/mysql\@5.6/*.plist ~/Library/LaunchAgents

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql\@5.6.plist 

ターミナルで使えるように

echo 'export PATH="/usr/local/opt/mysql@5.6/bin:$PATH"' >> ~/.zshrc

source ~/.zshrc
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?