on
[AWS] 입문, 서버 생성, 사용법 공부
[AWS] 입문, 서버 생성, 사용법 공부
https://ap-northeast-2.console.aws.amazon.com/ec2/v2/home?region=ap-northeast-2#Instances:
[
https://ap-northeast-2.console.aws.amazon.com/ec2/v2/home?region=ap-northeast-2#Instances
ap-northeast-2.console.aws.amazon.com
](https://ap-northeast-2.console.aws.amazon.com/ec2/v2/home?region=ap-northeast-2#Instances)
AWS 가입 후 위 링크로 재접속 ( EC2 매니지먼트 페이지 )
오른쪽 상단 인스턴스 버튼 클릭
18.04 LTS 버전 선택
t2.micro 선택 후 오른쪽 하단 검토 및 시작
키페어 생성 후 인스턴스 시작 클릭 ( 키페어 저장위치 꼭 기억. 따로 이메일, usb등에 백업 보관 )
생성 완료. 인스턴스 보기 클릭!
생성된 인스턴스 ID 클릭
퍼블릭 IPv4 주소 복사 후 아래 링크 git 설치
https://gitforwindows.org/
[
Git for Windows
Git for Windows focuses on offering a lightweight, native set of tools that bring the full feature set of the Git SCM to Windows while providing appropriate user interfaces for experienced Git users and novices alike. Git BASH Git for Windows provides a BA
gitforwindows.org
](https://gitforwindows.org/)
git 설치 후 git bash 실행
ssh -i (키페어위치) ubuntu@퍼블릭 IPv4 주소
(다운받은 키페어 파일을 그대로 드래그 온 드랍) 또는 (파일 위치 입력)
yes 입력
위 화면처럼 나오면 생성한 서버 컴퓨터에 접속 완료!
기본적인 명령어
mkdir 폴더명 // 폴더생성
ls // 내 위치에서 디렉토리 확인
cd 폴더명 // 폴더로 진입
cd .. // 폴더 나가기
filezilla-project.org/
[
FileZilla - The free FTP solution
Overview Welcome to the homepage of FileZilla®, the free FTP solution. The FileZilla Client not only supports FTP, but also FTP over TLS (FTPS) and SFTP. It is open source software distributed free of charge under the terms of the GNU General Public Licen
filezilla-project.org
](https://filezilla-project.org/)
fileZilla 설치
FTP ( file transfer protocol ) 프로그램
설치 후 실행
빨간 네모 박스 클릭 후
New site 클릭하여 사이트 생성
프로토콜 : SFTP
호스트 : AWS 에서 생성한 서버의 IPv4 주소
포트 : 22
로그온 유형 : 키 파일
사용자 : ubuntu
키 파일 위치 : 위에서 저장한 AWS 키파일 위치 지정
후 연결하면 접속 완료
좌측이 내 컴퓨터, 우측이 서버 컴퓨터
test.py 0.00MB initial_ec2.sh 0.00MB
한방에 서버 명령어 세팅하기 ( 스파르타코딩클럽 웹개발 종합반 자료 )
서버 컴퓨터에 새 폴더 생성 후 위 파일 업로드
git bash 창에 명령어 입력
sudo chmod 755 initial_ec2.sh // 1번
./initial_ec2.sh
마구마구 설치가 된다!
python3 -> python, pip3 -> pip 등의
초보자를 위한 명령어 간소화 + 설치 간소화라고 일단 이해
app.py 0.00MB
파이참으로 app.py 서버 구동 후
파일질라로 서버에 app.py 업로드
git bash 창에 명령어 입력
pip install flask
pip install pymongo
( pip 란? python 라이브러리. python 패키지 설치 도움 )
또 마구마구 설치가 된다!
python app.py 명령어 입력하여 서버 실행!
다시 AWS EC2 - 인스턴스 - 보안 탭 - 보안 그룹 클릭
인바운드 규칙 편집 클릭!
사진처럼 5000, 80, 27017 포트 위치 무관으로 설정 후 규칙 저장!
드디어
IPv4 주소:5000
입력하면 내 서버에서 실행되는 페이지에 접속!
from http://firstquarter.tistory.com/65 by ccl(A) rewrite - 2021-05-10 20:00:33