Mac mini를 집에있는 공유기에 연결해 사용중
리눅스 OS를 사용할 때 보다 제약이 좀 있는 것 같다.
혹시나 정전이 났을경우 전기가 들어오면 자동으로 켜지는 기능을 설정 할 수 있다.(구글링 필요)
이번에 작성하려고 하는것은 docker 실행 시키기
아쉽게도 Mac에서 ssh를 통해 docker를 실행 시킬 수 없다. (colima를 쓰는 방법이 있긴함.)
teamviewer을 사용해 pc가 부팅되면 자동실행 + 로그인을 통해 원격으로 접속했는데
teamviewer은 pc를 이메일을 통해 인증해야하는 점과 소프트웨어가 유료 버전으로 유도가 되가는중이라 삭제
vnc를 통해 원격으로 간편하게 접속 할 수 있었다.
vnc 원격 설정
(ssh를 통해 접속해서도 설정 할 수 있어 외부에 있고 긴급할 때 굉장이 유용했다.)
예전에 구글링 하다 발견했는데 출처를 찾지 못했다.
# Step 1: Set priveleges
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
# Step 2: Allow VNC clients
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes
Starting...
Set the client options.
Done.
# Step 3: Set VNC password (change it at the end of the line (i.e. don't use supersecret))
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvncpw -vncpw supersecret
Starting...
Set the client options.
Done.
# Step 4: Restart service
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -console
Starting...
Stopped ARD Agent.
Stopped VNC Privilege Proxy
Stopped RFB Register MDNS
Done.
# Step 5: If no ARD services have been activated on the machine before, it is also necessary to run the following command
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate
Starting...
Activated Remote Management.
Done.
@zdj
중요한 점은 비밀번호 설정 시 어드민 계정의 비밀번호와 일치시켜야 접속이 되었다.(몇 일 고생함)
# Step 3: Set VNC password (change it at the end of the line (i.e. don't use supersecret))
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvncpw -vncpw 어드민 계정의 비밀번호와 일치 시켜야함
Starting...
Set the client options.
Done.
포트포워딩
5900 포트를 사용하기때문에 공유기를 통해 5900 포트를 서버에 할당해 주었다.
Finder -> Go -> Connect to server 통해 접속하면 별도 프로그램 없이 접속 할 수 있다.
도커 실행 시키기
VNC를 통해 화면을 제어 할 수 있어 여기서 바로 실행시키면 된다.
colima를 쓰기도 하는데
내 서버의 경우 colima를 쓰면 자주 다운되서
위 방법을 사용하기로 했다.