【학습 메모】AWS(Apache 방화벽 Elastic IP 주소)
1. 목표 산출물

2. 서버 구축 작업 절차
1.EC2 인스턴스 설치
2.Apache 설치 ← 이번에는 여기
- SSH로 서버에 로그인
- Apache 설치 ← 이번에는 여기
3. 방화벽 설정 ← 이번에는 여기
3.Apache 설치
Apache를 설치하기 전에 먼저 EC2 인스턴스를 업데이트합니다.
$ sudo yum update -y
yum:Linux(서버 OS) 패키지(라이브러리)
yum update: yum으로 저장한 내용을 최신 버전으로 만들기
sudo : 루트 권한으로 실행
※로그인시에는 EC2 유저로 하고 있지만, 「yum」의 조작을 하는 경우는 sudo가 필요
-y:Yes라는 의미
여러가지 설치되므로, 「완료했습니다!」라고 하는 표시가 되면, Apache를 인스톨 한다
$ sudo yum -y install httpd
$ sudo systemctl start httpd.service
httpd.service:Apache
$ sudo systemctl status httpd.service
active(runnning)
기타 확인할 명령
프로세스 (실행중인 프로그램)를 표시하는 명령으로 Apache를 확인하는 방법
$ ps -axu
ps : Linux에서 실행중인 프로세스를 표시하는 명령
-axu : ax가 모든 프로세스를 표시하고, u가 메모리와 사용량을 포함하여 표시합니다.
"/usr/sbin/httpd"가 있으면 httpd=Apache가 실행되고 있다고 확인할 수 있다.
짜내고 싶을 때는, 「grep httpd」등의 커멘드로 하면 좋다.
grep : 검색하고 표시하는 명령
4.Apache 자동 시작
자동 시작을 설정하는 명령은 다음과 같습니다.
$ sudo systemctl enable httpd.service
설정할 수 있는지 확인하는 명령은 다음과 같습니다.
$ sudo systemctl is-enabled httpd.service
"enabled"가 표시되면 자동 시작 설정 완료
5. 방화벽 설정
네트워크를 무단 액세스로부터 보호하기 위해 "통신 좋은 통신만을 통해, 그 이외는 통과하지 않는다"기능의 총칭

AWS에서는 보안 그룹이 방화벽 역할을 한다

<흐름>
1. 보안 그룹 열기
2. 인바운드 규칙 추가
3. IP 주소를 추가하여 연결 완료
1. 보안 그룹 열기
보안 그룹 필드를 클릭

2. 인바운드 규칙 추가

3. IP 주소를 추가하여 연결 완료
이런 이미지가 되면 OK

6.Elastic IP 주소 정보
EC2 인스턴스의 퍼블릭 IP는, 기동·정지하면 다른 IP 어드레스가 할당된다. ElasticIP 주소를 사용하면 IP 주소를 고정할 수 있습니다.

따라서 다음 작업을 수행합니다.

왼쪽의 "Elastic IP"를 클릭한 후 새 주소 할당을 클릭하고 "할당"을 선택합니다.

그러면 ElasticIP가 할당되어 IP 주소가 확보 된 상태가됩니다. 따라서 다음과 같은 연결로 연결을 수행합니다.

이 화면에서,
· 자원 유형
· 인스턴스
· 개인 IP 주소
등 필요 사항을 선택하여 끈을

ElasticIP 주소는 "공용 IP ..."라고 설명한 주소를 나타냅니다.

이것을 http상에서 리퀘스트를 보내면, 무사히 Apache의 화면이 돌아온다.
**※이것을 해두지 않으면 과금될 우려가 있으므로 반드시 할 것
7.후 정리
Elastic IP 주소 열기
EC2 인스턴스 중지
순서대로 스쿠쇼에서 설명




이것으로 완료. 흠, 길었다.
Reference
이 문제에 관하여(【학습 메모】AWS(Apache 방화벽 Elastic IP 주소)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/sakamiti_46/items/1937c1c0a8a8c89b1b06텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)