GithubHelp home page GithubHelp logo

dev-setup's Introduction

開発環境構築の手引書

Macにインストールすべきもの

  • Android Studio
  • XCode
  • Chrome
  • Firefox
  • VScode
  • Google日本語入力
  • Slack
  • Docker

ターミナルを通して揃えるもの

  • homebrew
  • nodebrew
  • MySQL
  • npmパッケージ
  • sshの設定

homebrew

以下のコマンドでインストールできる。

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

参考:
http://brew.sh/index_ja.html

homebrew で入れるもの

  • MySQL
  • git
  • $ brew install yarn --without-node

nodebrew

フロントエンドをやる上で必須。
以下のコマンドでインストール。

$ curl -L git.io/nodebrew | perl - setup
$ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile && source ~/.bash_profile

参考:
http://gin0606.hatenablog.com/entry/2013/11/25/163607

後は、設定していくだけ。nodebrew -Vで使い方が表示される。

MySQL

homebrewでインストール。Node.jsで使うのなら、npmパッケージもインストールする。

$ brew install mysql
$ npm install -S mysql

起動

$ mysql.server start

停止

$ mysql.server stop

npmパッケージ

必要なパッケージをグローバルインストールしておく。以下は一例。

$ npm install -g mocha forever nodemon

その他、必要に応じてインストールしていく。frontendディレクトリを参照。

sshの設定

GitHubとの通信に必須。

まず、鍵を入れるフォルダに移動。そして、まだ鍵が存在しないことを確認。

$ cd ~/.ssh
$ ls

鍵を生成。

$ ssh-keygen -t rsa

このコマンドの後、エンターを押す。続いて、パスフレーズを2回求められるので、入力する。

これで、id_rsaid_rsa.pubが生成される。

GitHubの設定ページにて、sshを登録。id_rsa.pubの中身を貼り付ければよい。
以下のコマンドで、接続を確認できる。

macOS Sierra の場合

macOS Sierra では、sshを使ったリモートとの接続を行うために、さらに手続きが必要になる。~/.sshに、configというファイルを作成し、以下のように記述する。

HostKeyAlgorithms +ssh-dss
Host *  
    UseKeychain yes
    AddKeysToAgent yes

参考:

プロジェクト開始時のGitHubの設定

  1. git initでローカルリポジトリを作成
  2. GitHubのページで、対応するリモートリポジトリを作成
  3. git remote add origin リモートリポジトリのパス
    • こうすると、リモートリポジトリを、originという識別子で登録できる。
  4. git push -u origin リモートリポジトリのブランチ名
    • こうすると、現在のブランチの内容を、リモートリポジトリにプッシュする。
    • -uオプションをつけることで、ローカルとリモートを上手く紐付けてくれる。
  5. vim .gitignoreで、ignoreの設定を行う

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.