라즈베리파이에 SSH로 원격으로 접속하기
sudo raspi-config
Interfacing Options나, Interface Option 선택
SSH 선택하고 메세지가 나오면 yes 선택, enabled라고 뜨면 된 거 임!!
sudo reboot로 재부팅
라즈베리파이 터미널에서
hostname -I
으로 IP주소 확인
컴퓨터에 putty를 설치 https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Download PuTTY: latest release (0.76)
This page contains download links for the latest released version of PuTTY. Currently this is 0.76, released on 2021-07-17. When new releases come out, this page will update to contain the latest, so this is a good page to bookmark or link to. Alternativel
www.chiark.greenend.org.uk
Connection - Data를 선택한 다음 Prompt로 선택되어 있는지 확인
Session을 선택하고 라즈베리파이의 IP주소 입력한 다음 열기 선택

보안 알림이 표시되면 yes를 선택
라즈베리파이의 기본 로그인과 암호는 pi와 raspberry
비밀번호를 모르면 sudo raspi-config로 비밀번호 변경하기

이제 putty나 라즈베리파이 터미널 창에서 명령을 실행
sudo adduser --system ggc_user
sudo addgroup --system ggc_group

라즈베리파이 디바이스에 대한 보안을 개선하려면 시작 시 운영체제에서 하드링크와 소프트링크 보호를 활성화
cd /etc/sysctl.d
ls
명령을 실행하고 98-rpi.conf 파일로 이동
sudo nano 98-rpi.conf
텍스트 편집기를 사용해 파일 수정
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
파일 끝에 다음 두 줄을 추가
라즈베리파이를 재부팅
sudo sysctl -a 2> /dev/null | grep fs.protected
다음 명령을 실행했을 때 fs.protected_hardlinks = 1와 fs.protected_symlinks = 1가 보여야한다
cd /boot/
boot 디렉터리로 이동
sudo nano cmdline.txt
텍스트 편집기를 사용하여 위 파일을 열기
cgroup_enable=memory cgroup_memory=1
위 문장을 새 줄로 추가하지 말고 기존 줄의 끝에 추가
라즈베리파이 재부팅
cd /home/pi/Downloads
mkdir greengrass-dependency-checker-GGCv1.11.x
cd greengrass-dependency-checker-GGCv1.11.x
wget https://github.com/aws-samples/aws-greengrass-samples/raw/master/greengrass-dependency-checker-GGCv1.11.x.zip
unzip greengrass-dependency-checker-GGCv1.11.x.zip
cd greengrass-dependency-checker-GGCv1.11.x
sudo modprobe configs
sudo ./check_ggc_dependencies | more
AWS IoT Greengrass 샘플 리포지토리에서 Greengrass 종속성 확인 프로그램을 다운로드하여 실행
(위 문장들도 역시 putty나 라즈베리파이 터미널 안에서 실행)
AWS IoT에서 AWS IoT Greengrass 구성
https://docs.aws.amazon.com/ko_kr/greengrass/v1/developerguide/gg-config.html
AWS IoT에서 AWS IoT Greengrass 구성 - AWS IoT Greengrass
이 페이지에 작업이 필요하다는 점을 알려 주셔서 감사합니다. 실망시켜 드려 죄송합니다. 잠깐 시간을 내어 설명서를 향상시킬 수 있는 방법에 대해 말씀해 주십시오.
docs.aws.amazon.com
여기서 꼭 압축 파일 다운로드 받기!!!@!!!!!
마지막 11번 참고!
https://docs.aws.amazon.com/ko_kr/greengrass/v1/developerguide/what-is-gg.html#gg-core-download-tab
AWS IoT Greengrass란 무엇입니까? - AWS IoT Greengrass
스트림 관리자를 사용하여 데이터를 클라우드로 내보내는 경우AWS IoT Greengrass이전 v1.x 버전의 핵심 소프트웨어 v1.11.3. OTA 업데이트를 시도하면 스트림 관리자가 시작되지 않고 업데이트가 실패
docs.aws.amazon.com
자습서 살펴보면 위 링크로 연결되는데 여기서 Armv7l(배포 Raspbian) 다운로드하기!!!!!!!!

윈도우의 경우 WinSCP 이용해서 컴퓨터에 설치한 위 파일들을 라즈베리파이에 전송하기
https://winscp.net/eng/download.php
파일을 전송할 때는 home에다가 전송하면 된당
cd /home/pi
파일 이름을 치면 된당

sudo tar -xzvf hash-setup.tar.gz -C /greengrass
hash 부분에는 아까 다운로드한 보안 파일 10자리를 입력!!
루트 CA 인증서를 /greengrass/certs 폴더에 다운로드하기

cat 명령을 실행해서 파일 안을 볼 수 있다
cd /greengrass/ggc/core/
sudo ./greengrassd start
두 명령을 실행하면 Greengrass successfully started라는 문구와 PID number가 나오는데 이건 기록해두기!

ps aux | grep PID-number
위 명령으로 Greengrass가 작동하고 있는지 확인할 수 있다
'AWS > PROJECT' 카테고리의 다른 글
윈도우에 AWS CLI 설치하기 (0) | 2022.08.09 |
---|---|
AWS S3에 파일 업로드 해서 웹페이지 만들기 (0) | 2022.08.03 |
[AWS Greengrass] AWS IoT Greengrass 라즈베리파이 배포 오류 (0) | 2022.05.09 |
AWS Greengrass Lamdba (0) | 2022.04.15 |
라즈베리파이 온습도센서 값을 MariaDB에 저장하기 (0) | 2022.03.18 |