brunch

You can make anything
by writing

C.S.Lewis

by Master Seo May 11. 2020

354. 건강관리 서비스를 만들며 AWS 기능 사용

혼자말

네트워크니, 보안이니, 스토리지니 이것저것 공부해야 할것이 많다.

그냥 보이는것부터 하나씩 만들고, 나머지는 뒷단에서 처리해보자.

빨리 보여주고, 구축해야 하는 시대이다.

건강관리 서비스를 만들며 AWS 기능 1에서  100까지 사용해보자.



<1>  기획

서비스 만들어 보자

서비스를 만들며, 하나씩 보강해보자

나의 건강 확인서비스 (임의 데이터)

스마트폰으로 나의 건강상태를 확인하고,  나쁜 부분을 개선하고자 한다.  

혈압 점검

당뇨 점검



<2>  실행


1. Aws가입  https://brunch.co.kr/@topasvga/77


Default VPC


Default subnet



2. AWS EC2 하나 만들기

내IP만 SSH 접속되게 하기 - 다른곳에서는 서버 접속 하지 못하도록 하기



3. 별도의 Security Group을 만든다. http 허용 , https 허용 (  기존 Security Group에 추가 허용해도 된다.)

Instances 에서 Change Security Group에서 http, https를 추가해준다.



4. 고정IP(EIP)할당해서 IP변경되지 않도록 하기 : Elastic IPs


5. DNS서버에서 DNS등록하기

여기서는 route53에서 등록한다.



6. putty로 서버 접속하기


서버 시간 변경하기

[root@ip-172-31-4-225 ~]# rm /etc/localtime

rm: remove regular file ‘/etc/localtime’? y

[root@ip-172-31-4-225 ~]# ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime

[root@ip-172-31-4-225 ~]# date

Mon May 11 18:09:22 KST 2020



아마존 리눅스2 서버 호스트네임 변경하기  health.serverchk.com 으로 한다.

[root@ip-172-31-4-225 ~]# hostnamectl set-hostname

[root@ip-172-31-4-225 ~]# more /etc/sysconfig/network

NETWORKING=yes

NOZEROCONF=yes

hostname=health.serverchk.com


[root@ip-172-31-4-225 /etc]# more hosts

127.0.0.1   health.serverchk.com localhost.localdomain localhost4 localhost4.localdomain4


[root@ip-172-31-4-225 ~]# sync

[root@ip-172-31-4-225 ~]# reboot




8. apache 설치하기  https://brunch.co.kr/@topasvga/83



9. ftp 설치하기  https://brunch.co.kr/@topasvga/670

aws에서 ftp 열어주기



10.홈페이지 만들기 - Sample 소스로 html만들기. 나의 혈압, 당뇨 상태 수정

html 소스  https://www.w3schools.com/bootstrap/bootstrap_theme_me.asp
html 소스들https://brunch.co.kr/@topasvga/84

html  https://brunch.co.kr/@topasvga/375
html https://brunch.co.kr/@topasvga/162


소스 수정

[root@health html]# vi   index.html

 <head>

  <style>

  .bg-1 {

    background-color: #1abc9c; /* Green */

    color: #ffffff;

  }

  </style>

</head>

<body>

  <div class="container-fluid bg-1 text-center">

    <h1>My Health Check ?</h1>

    <img src="1.jpg" alt="blood">

    <h1> Blood pressure :  140   </h1>

    <img src="2.jpg" alt="disabetes">

    <h1> diabetes  :  5 </h1>

  </div>

</body>


  

11. 홈페이지 확인하기   http://health.serverchk.com/




12. 홈화면에 저장하기로 스마트폰에 저장하기



13. 개선

1) 방문자수를 알기 위해 카운터를 달아보자.

https://info.flagcounter.com/



2) DB를 사용해보자.

DB를 입력해 데이터를 화면에 보여주도록 해보자.

https://brunch.co.kr/@topasvga/1126



감사합니다.


매거진의 이전글 353.(이론정리) 비공인 AWS 보안가이드 120

작품 선택

키워드 선택 0 / 3 0

댓글여부

afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari