728x90
- HomeBrew 로 설치하는 방법
brew install nginx
- 부팅 시 nginx 가 자동 실행되게 하려면 .plist 파일을 이용하는 방법보다는 brew services 명령어로 한번에 설정하게 하는 방법이 편하다.
$ ls /usr/local/Cellar/nginx/1.29.5/homebrew.mxcl.nginx.plist
/usr/local/Cellar/nginx/1.29.5/homebrew.mxcl.nginx.plist
$ sudo brew services start nginx
Password:
Warning: Taking root:admin ownership of some nginx paths:
/usr/local/Cellar/nginx/1.29.5/bin
/usr/local/Cellar/nginx/1.29.5/bin/nginx
/usr/local/opt/nginx
/usr/local/opt/nginx/bin
/usr/local/var/homebrew/linked/nginx
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: nginx must be run as non-root to start at user login!
==> Successfully started `nginx` (label: homebrew.mxcl.nginx)
- 명령어 실행 후, 정말로 자동 실행이 설정되어 있는지 확인하기 위해 /Library/LaunchDaemons/homebrew.mxcl.nginx.plist 내용을 확인할 수 있다.
$ cat /Library/LaunchDaemons/homebrew.mxcl.nginx.plist | grep -A 1 RunAtLoad
<key>RunAtLoad</key>
<true/>
- 서비스 시작 및 종료
$ sudo brew services start nginx
$ sudo brew services stop nginx'Engineering > Mac' 카테고리의 다른 글
| altool 오류 on Mac (3) | 2024.10.31 |
|---|---|
| 서비스 데몬 시작/등록 on MacOS (0) | 2024.08.14 |
| Command Line Developer Tool 무한 반복 설치 on Mac OS (3) | 2024.07.22 |
| No suitable application records were found. Verify your bundle identifier is correct 해결 (0) | 2023.12.15 |
| posix_spawn failed in Mac 해결 (0) | 2023.11.15 |