Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shimyounseob patch 1 #4885

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ title_separator : "-"
subtitle : # site tagline that appears below site title in masthead
name : "Your Name"
description : "An amazing website."
url : # the base hostname & protocol for your site e.g. "https://mmistakes.github.io"
url : "https://shimyounseob.github.io"
baseurl : # the subpath of your site, e.g. "/blog"
repository : # GitHub username/repo-name e.g. "mmistakes/minimal-mistakes"
teaser : # path of fallback teaser image, e.g. "/assets/images/500x300.png"
Expand Down
91 changes: 91 additions & 0 deletions _posts/2024-06-22-airflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
layout: single
title: "Airflow(1)"
---

### Airflow 설치 (1)

1. AWS EC2 프리티어 생성

2. EC2 생성 시 만든 키페어 (예 capstone.pem) 파일을
이용하여 ssh 로그인

3. 탄력적 IP 생성 후
생성한 인스턴스에 할당

4. **ssh 로 접속**

```
ssh -i "capstone.pem" [[email protected]
```


5. **EC2 스왑 파일 추가 (AWS 프리티어로 EC2를 사용하면서 발생하는 느려지는 문제 해결 방법)**
- swap 메모리를 할당

```
$ sudo dd if=/dev/zero of=/swapfile bs=128M count=16
```

- 스왑 파일에 대한 읽기 및 쓰기 권한 업데이트

```
$ sudo chmod 600 /swapfile
```

- Linux 스왑 영역을 설정

```
$ sudo mkswap /swapfile
```

- 스왑 공간에 스왑 파일을 추가하여 스왑 파일을 즉시 사용할 수 있도록 만듦

```
$ sudo swapon /swapfile
```

- 절차가 성공했는지 확인

```
$ sudo swapon -s
```

- /etc/fstab 파일을
편집하여 부팅 시 스왑 파일을 활성화

```
  $ sudo nano /etc/fstab
```

- 파일 끝에 다음 줄을 새로 추가하고 파일을 저장(Ctrl+x 누른 후 y)한 다음 종료

```
/swapfile swap swap defaults 0 0
```

- 확인

```
  $ free -h
```


6. 한국시간 설정

```
$ sudo rm /etc/localtime
```

```
$ sudo ln -s/usr/share/zoneinfo/Asia/Seoul/etc/localtime
```

- /etc/sysconfig/clock 파일을 열어 ZONE 값을 UTC에서 Asia/Seoul 으로 변경해준다.


```
$ sudo nano /etc/sysconfig/clock
```

7. AWS Console 에서 인스턴스 재부팅
Loading