LoginSignup
3
6

More than 3 years have passed since last update.

個人用パソコンセットアップ(mac)

Last updated at Posted at 2020-11-25

パソコンを変えたとき用のやることまとめ

vscodeダウンロード

homebrewのインストール

https://brew.sh/index_ja
ターミナルにペースト

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

gitのダウンロード

https://git-scm.com/download/mac
ターミナルにペースト

brew install git

vscodeとgitの接続

ユーザー名の登録

ターミナルにペースト

git config --global user.name "GitHubに登録しているユーザー名"

ユーザーアドレスの設定

ターミナルにペースト

git config --global user.email "GitHubに登録しているメールアドレス"

githubとvscodeの接続をオープンエディタの画面から?

なんか接続するための画面が出てくるのでそれを許可

ssh鍵を作成する

ターミナルに貼り付ける

ssh-keygen

これを入れたらとりあえずenterしたらpasを作成しろと出るので作成
そしてもう一度入力

ssh鍵の登録

ターミナルに貼る

ssh-add -K パスワードを入れたファイル?

正しく登録されたかの確認

ssh-add -l

鍵の中身をコピー

pbcopy < ファイル名

GithubのSettingsを開き、Githubに鍵登録
New SSH keyを押して鍵に命名
そして鍵部分に先程コピーされたものをそのまま入れる

鍵接続

ssh-add ファイル名.pub

vscode設定

code .を使えるようにする

command + shift + p
Shellと入れる
installを選ぶ

拡張機能

liveserverの追加

node周りセットアップ

nodebrewインストール

brew install nodebrew

node.jsインストール

先にディレクトリ作成してるといい感じ

mkdir -p ~/.nodebrew/src

安定版のをインストール

nodebrew install-binary stable

パスを通す

echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile

ngrokインストール

https://www.joint-media.co.jp/2844.html
brewでインストール

mySql接続

npm

npm install mysql

python

pythonを直接インストール

anacondaインストール

https://www.anaconda.com/products/individual
guiとcli両方インストールしてもいいかもしれない

セットアップ色々

https://prog-8.com/docs/python-env
これ通りにやれば基本間違いない

ターミナル起動自動化

https://ry0.github.io/blog/2015/10/21/open-terminal-shortcut/#gsc.tab=0
上記記事通り作成
command + shift + oで設定

vscodeからchromeを開く

下記コードを一番上のディレクトリに入れておく

alias chrome='open -a "Google Chrome"'

chromeと押すとchromeが開くようになる

完了

参考にさせていただいた記事

git登録周り
https://note.com/cd_ss_829/n/n4e7d80723381
https://qiita.com/yu0313/items/4f95fc0b7e544c42e107

公開鍵周り
https://www.velumi.com/guides/vs-code-get-permission-denied-publickey-mac/
https://qiita.com/luccafort/items/92d9643ac9ddecc0cadd
https://www.atnr.net/permission-denied-error-on-git-pushing/
https://qiita.com/takuyanin/items/c6a097028a837052c90c
https://qiita.com/tnatsume00/items/e147662368d02e6416d2

vscode設定周り
https://qiita.com/ayatokura/items/69c96306e3dee501e19b

3
6
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
3
6