업무용으로 MacBook Pro 16형 M1을 수령해서 오랜만에 새로 세팅해 보았습니다.

기존 개발환경 백업
기존 개발환경 중 다음것들을 백업하고 파일들은 cloud로 백업하였습니다.
- IntelliJ : export settings로 설정을 백업해도 되지만, 깔끔하게 새로 설정하고 싶어서 기존에 사용중인 vm options 들을 메모장에 백업하였습니다.
- VSCode : https://bit.ly/3nPCKqd 참고하여 설정을 백업
- Postman : 동기화하여 싱크
- 기타 App들의 설정들은 캡쳐
맥북 기본 설정
개인적으로 선호하는 키보드/폰트/finder로 변경하였습니다.
- shift + space 한글전환 : http://dobiho.com/691/ –> 60번 말고, 61번을 수정
- function key 변경 : https://support.apple.com/ko-kr/HT204436
- d2 coding 폰트 설치 : https://jamie95.tistory.com/63
- finder 정렬 옵션 변경 : https://pncom.tistory.com/22
xcode, brew, git
개발환경 세팅을 위해 xcode -> brew -> git 순서로 설치하였습니다.
- xcode command line tools
$ xcode-select --install
- brew : https://brew.sh/index_ko 참고
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ brew update && brew upgrade // 최신으로 업그레이드
$ brew doctor // 문제 없는지 확인
- git
$ brew install git
$ git config --global user.name "kimstar"
$ git config --global user.email "kimstar@~~~.com"
이후 사내 개발환경을 위해 python 3.10.0과 인증서 생성을 추가 진행하였습니다.
설치 – App Store
앱스토어에서 다음 APP을 설치하였습니다.
- melon : 음악
- magnet : 창 배치
- pixea : 이미지 뷰어
- monosnap : 캡쳐
- 반디집 : 압축
설치 – Inhouse Store
업무용 노트북이라 인증된 app만 설치하도록 되어 있어서, 절차를 통해 다음 app 들을 설치하였습니다.
- alfred : app 런처
- amphetamine : 맥북 잠깨우기
- balsamiq mockups : 목업
- iterm2 : 터미널
- jdk : java 개발
- jetbrains toolbox : intelliJ 등 관리
- mysqlworkbench : mysql 개발도구
- postman : rest 개발용
- python : 개발용
- slack : 커뮤니케이션
- sourcetree : git 처리
- visual studio code : 에디터
- vmware horizon client : 데스크톱 가상화
- zeplin : 디자인 협업
- zoom : 재택근무용
설치 – 기타
다음 app 들은 다운로드하여 설치하였습니다.
- Itsycal : 달력 / http://mowglii.com/
- Logitech Options : 마우스 제어 / https://www.logitech.com/ko-kr/product/options
- MonitorControl : 모니터 볼륨 제어 / https://monitorcontrol.app/
vscode 설치
visual studio code는 설정을 복원하여 빠르게 복원할 수 있었습니다.
- 설정 백업 및 복원 : https://bit.ly/3nPCKqd
- 참고 : https://www.youtube.com/watch?v=bS9yTI2fC0w
node / nvm
nvm을 사용하여 node를 설치하였습니다.
- 참고 : https://gist.github.com/falsy/8aa42ae311a9adb50e2ca7d8702c9af1
- 공식 : https://github.com/nvm-sh/nvm
- 설치
$ sudo curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ source ~/.bash_profile
$ nvm ls
$ nvm install 10
$ nvm use 10
$ nvm alias default 10
- IntelliJ
- Preference > Language > Node.js > 버전 선택
- 설정없이 default 버전쓰려면 재부팅
java, tomcat, intelliJ
java 개발환경을 설정하였습니다. kotlin, python 등은 IntelliJ에서 설정하였습니다.
- jdk : https://hongku.tistory.com/367
- tomcat : https://eunoia3jy.tistory.com/31
- jetbrain toolbox 설치후 intellij 최신버전 설치 : https://www.jetbrains.com/ko-kr/toolbox-app/
hosts
web 개발환경을 위해 hosts 파일에 원하는 사용중인 도메인을 세팅하였습니다.
$ sudo vi /etc/hosts
127.0.0.1 local.kimstar.kr
$ dscacheutil -flushcache
vi ~/.bash_profile
맥북에서는 zsh을 기본 쉘로 변경이 가능하지만, 업무용 노트북에서 해당 설정이 막혀 있습니다. 이때문에 bash을 기본으로 사용하고, 각 app 별로 zsh을 기본 쉘로 설정하여 사용중입니다.
사용중인 bash 환경은 다음과 같습니다.
# PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home
PATH="${PATH}:${JAVA_HOME}/bin"
export PATH
# KIMSTAR
export LANG=en_US.UTF-8
alias ll='ls -alF'
alias h='history'
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
vi ~/.vimrc
개인적으로 선호하는 vim 설정입니다.
set ai
set si
set cindent
set shiftwidth=4
set tabstop=4
set ignorecase
set hlsearch
set expandtab
set background=dark
set nocompatible
set fileencodings=utf-8,euc-kr
set bs=indent,eol,start
set history=1000
set ruler
set nobackup
set title
set showmatch
set nowrap
set wmnu
set paste
syntax on
mysql
개발환경을 위해 local에 mysql 서버 및 테이블이 필요하여 설정을 추가하였습니다.
- mysql 설치 : https://shanepark.tistory.com/41
- mysql 자동실행 : https://solbel.tistory.com/1446
$ brew install mysql // mysql 설치
$ brew services start mysql // mysql 서비스 실행
$ mysql -uroot // root 권한으로 연결 (password 없음)
- https://goddaehee.tistory.com/278 참고하여 user / database / table 설정
zsh
iterm2에서 zsh을 기본으로 사용하고 있습니다.
- https://support.apple.com/ko-kr/HT208050
- iterm2 : https://ooeunz.tistory.com/21
- intellj / vscode : https://jojoldu.tistory.com/400
- zsh 에서 bash 설정 읽기 : https://dejavuqa.tistory.com/383
- iterm2 한글깨짐 : https://ifuwanna.tistory.com/267
- 기본언어 변경 : https://gem1n1.tistory.com/8
- 참고 : https://subicura.com/2017/11/22/mac-os-development-environment-setup.html#터미널-설정
- 내 설정 추가사항
- Preference > profiles > General > Command : custom shell : /bin/zsh
- Preference > profiles > Window > Transperency : 1, Culumes: 200, Rows: 35
- Preference > profiles > Sessiong > [V] when idel 0 every 60 sec
vi ~/.zshrc
zsh을 위한 설정을 추가하였습니다. 마지막 if 구문은 bash 설정을 읽어오는 부분입니다.
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="agnoster"
source $ZSH/oh-my-zsh.sh
export LANG=en_US.UTF-8
# KIMSTAR
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}
plugins=(
git
zsh-syntax-highlighting
zsh-autosuggestions
)
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
fi
참고
- 니꼴라스 M1 설정 : https://youtu.be/B26yiuC5zPM
- MacOS 개발환경 : https://subicura.com/2017/11/22/mac-os-development-environment-setup.html







[…] 참고 : http://kimstar.kr/9442/ […]