50
52

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.

Macを買った時最初にすること

Last updated at Posted at 2016-03-19

はじめに

新人のみなさん、こんにちは!

最近家にも会社にも新しいMacがやってきて、何入れるんだっけ〜?Rubyってどうやってインストールするんだっけ〜?となってやや辛い思いをしたので、みなさんが辛い思いをしないようにMacを会社からもらったり、個人で買ったりした時にインストールしておいたほうがよいものをまとめておきます。

よかったら参考にしてね!

でも、これ超自分用だから、仮想環境とかGoとかElixirとかフロントエンド系のセットアップの仕方やGemってなんだ!?みたいな分からないことは優しい先輩に訊いてね!

GUIインストール編

まずは以下のソフトをダウンロードしよう!

  • Xcode
    • iOSアプリ開発しない人も落としておこう!
  • Google Chrome
    • ついでにFirefoxダウンロードするのも(・∀・)イイネ!!
  • CotEditor
    • 軽いメモ帳。Miでもおk。
  • Sequale Pro
    • MySQLのGUIツールだよ。MySQL WorkBenchもオススメ!
  • SourceTree
    • GitのGUIツールだよ。でも、最初はコマンドラインで勉強するのも(・∀・)イイネ!!
  • Cyberduck
    • FTPクライアントだけど正直使いづらいので、財力があれば、Transmitを買おう!
  • iTerm2
    • 最近はデフォルトのターミナルも悪くない。
  • Atom
    • 開発エディタは宗教戦争になりがちだけど、自分が使いやすいものを選ぼう。
    • Atomの設定なら、以下の記事がオススメ。
    • http://qiita.com/rei-m/items/9de2aea80043d1d1fbf6
    • 僕はPhpStormを使ってるのは秘密だ!

CUIインストール編

基本セットアップ

開発言語に依らず、以下の作業は行っておくのがベター。

公開鍵作成

$ ssh-keygen -t rsa

隠しファイル表示

$ defaults write com.apple.finder AppleShowAllFiles -boolean true
$ killall Finder

Xcodeインストール

$ xcode-select --install

Homebrewインストール

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

.bash_profile作成

$ vi .bash_profile
$ export PATH=/usr/local/bin:$PATH
$ source .bash_profile

各種ライブラリインストール

Ruby使いならインストールしておいたほうがベター。

$ brew tap homebrew/dupes
$ brew install libxml2 libxslt
$ brew install libiconv

Gitインストール

プリインされてるけど、brewで管理したいので!

$ brew install git

Opensslインストール

$ brew install openssl
$ brew link openssl --force

curlインストール

$ brew install curl --with-nghttp2 --with-openssl
$ brew link curl --force

各種開発言語編

ここからは各開発言語のインストール方法を紹介するので、必要に応じてインストールしてね!

nodeインストール

nodeは開発で使わなくても、色々なツールで利用するので、入れておいて損はない。

$ brew install node

PHPインストール

$ brew install php56 --with-homebrew-curl --with-homebrew-openssl
$ brew install php56-mcrypt

Ruby / Railsインストール

$ brew update
$ brew install rbenv rbenv-gem-rehash ruby-build
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ echo 'export PATH="$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile
$ source ~/.bash_profile
$ rbenv install 2.2.3
$ rbenv global 2.2.3
$ gem i rails --no-ri --no-rdoc
$ gem install bundler

MySQLインストール

mysql_secure_installationはセキュリティの設定だけど、基本的には全部Yesでおk。

$ brew install mysql
$ mysql_secure_installation

Nginxインストール

会社がApacheを使っている場合は素直にApacheをインストールしよう。

$ brew install nginx

おわりに

この記事を読んでくれた新人の方で、上記作業を自動化してくれる人待っています!

(変なテンションで書いてごめんなさい)

50
52
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
50
52

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?