# Development Settings on Mac
# 맥 터미널에서 VSCode 실행
$ vi ~/.zshrc
# ~/.zshrc
code () { VOCODE_CWD ="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
$ source ~/.zshrc
1
2
3
4
5
6
2
3
4
5
6
# .net core sdk on mac
$ brew cask install dotnet-sdk
1
# cmder
# 전반적인 설정
# zsh-autosuggestion color
.zshrc
에 다음 라인 추가
# zsh-autosuggestion suggest color
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=23'
1
2
2
# Visual Studio for Mac
PC 및 Mac용 Visual Studio 비교 (opens new window)
# brew 업데이트
$ brew update
$ brew upgrade
$ brew cleanup
$ brew doctor
1
2
3
4
2
3
4
# php 개발환경 설정
php.ini 위치
/usr/local/etc/php/5.6/php.ini
/usr/local/etc/php/7.0/php.ini
/usr/local/etc/php/7.1/php.ini
/usr/local/etc/php/7.2/php.ini
/usr/local/etc/php/7.3/php.ini
/usr/local/etc/php/7.4/php.ini
1
2
3
4
5
6
2
3
4
5
6
php.ini
타임존 설정
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Seoul
1
2
3
4
2
3
4
- php 설치 후 설정과정 중, 403 Forbidden 현상 발생 시
httpd.conf
변경 필요
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch ".ht*">
# Require all denied
Require all granted
</FilesMatch>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
- $ curl -L https://gist.githubusercontent.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2/raw > /usr/local/bin/sphp $ chmod +x /usr/local/bin/sphp
# PHP on VS Code
# VisualStudio 2019 Community
인코딩 문제 발생 시
# mac 에서 윈도우용 키보드 사용 시
시스템 환경설정 > 키보드
# jdk 설치
- openjdk 저장소 추가
$ brew tap AdoptOpenJDK/openjdk
1
설치할 자바 버전 확인
Java version JDK JRE OpenJDK8 with Hotsopt JVM adoptopenjdk8 adoptopenjdk8-jre OpenJDK8 with OpenJ9 JVM adoptopenjdk8-openj9 adoptopenjdk8-openj9-jre OpenJDK8 with OpenJ9 JVM, large heap* adoptopenjdk8-openj9-large adoptopenjdk8-openj9-jre-large OpenJDK9 with Hotsopt JVM adoptopenjdk9 n/a OpenJDK10 with Hotsopt JVM adoptopenjdk10 n/a OpenJDK11 with Hotsopt JVM adoptopenjdk11 adoptopenjdk11-jre OpenJDK11 with OpenJ9 JVM adoptopenjdk11-openj9 adoptopenjdk11-openj9-jre OpenJDK11 with OpenJ9 JVM, large heap* adoptopenjdk11-openj9-large adoptopenjdk11-openj9-jre-large OpenJDK12 with Hotsopt JVM adoptopenjdk12 adoptopenjdk12-jre OpenJDK12 with OpenJ9 JVM adoptopenjdk12-openj9 adoptopenjdk12-openj9-jre OpenJDK12 with OpenJ9 JVM, large heap* adoptopenjdk12-openj9-large adoptopenjdk12-openj9-jre-large OpenJDK13 with Hotsopt JVM adoptopenjdk13 adoptopenjdk13-jre OpenJDK13 with OpenJ9 JVM adoptopenjdk13-openj9 adoptopenjdk13-openj9-jre OpenJDK13 with OpenJ9 JVM, large heap* adoptopenjdk13-openj9-large adoptopenjdk13-openj9-jre-large brew cask install version
$ brew cask install adoptopenjdk8
$ java -version
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_265-b01)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.265-b01, mixed mode)
1
2
3
4
5
2
3
4
5
# pyenv, python, anaconda (python 개발환경과 비교 필요)
- (BigSur 기준) pyenv 로 python 3.8.6 과 anaconda3-5.3.1 설치 기준
$ brew install pyenv
or
$ brew upgrade pyenv
# zlib, bzip2 관련 warning 오류 시 (.zshrc 설정은 아래로)
$ brew install zlib bzip2
$ pyenv install --list # 설치 가능한 python 패키지 리스트
# anaconda3-5.3.1
$ pyenv install anaconda3-5.3.1
# python 3.8.6
$ pyenv install 3.8.6
$ pyenv versions # 현재 설치된 패키지 확인
# 기본으로 anaconda3-5.3.1 을 설정
$ pyenv global anaconda3-5.3.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# .zshrc 내의 pyenv 부분
# for pyenv
#CFLAGS="-I$(brew --prefix openssl)/include"
#LDFLAGS="-L$(brew --prefix openssl)/lib"
export LDFLAGS="-L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib"
export CPPFLAGS="-I$(brew --prefix zlib)/include -I$(brew --prefix bzip2)/include"
export PATH="$HOME/.pyenv/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
TIP
# Redis
$ brew install redis
$ redis-server --version
Redis server v=6.0.10 sha=00000000:0 malloc=libc bits=64 build=5e44a839a3d17a99
# installation location : /usr/local/Cellar/redis/...
# 설정 파일 : /usr/local/etc/redis.conf
# Starting/Stopping the Redis server as a background service
$ brew services start redis
$ brew services stop redis
# check
$ redis-cli ping
PONG
$ redis-cli monitor
# connect to a different redis server or port
$ redis-cli -h <address> -p <port>
# List users
$ redis-cli ACL LIST
# Continous stat
$ redis-cli --stat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- test
# 실행
$ redis-server
# 클라이언트로 접속
$ redis-cli
127.0.0.1:6379> set shockz https://shockzinfinity.github.io
OK
127.0.0.1:6379> get shockz
"https://shockzinfinity.github.io"
127.0.0.1:6379> keys *
1) "shockz"
127.0.0.1:6379> quit
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12