210311 목 TIL

bongf·2021년 3월 11일
0

TIL

목록 보기
15/40
  • SSH, TOMCAT, APACHE

✔ Done

  • 코드스쿼드 수업 : aws로 인스턴스를 만들고, (git bash)ssh로 해당 서버에 접속한 뒤, 서버에 git clone으로 진행 중인 스프링 프로젝트를 웹 서버에 띄워봤다. 수업 내용 복습은 주말에 해야겟다.
  • 팀 코드리뷰로 파이로가 작성한 익셉션 헨들러를 사용한 것을 보았고 잘 이해되진 않았지만 후에 더 공부하면 좋을 것 같다.
  • 톰캣 아파치 ssh에 대해 얕게나마 개념을 알 수 있도록 학습했다.
  • h2의 옵션들에 대해 학습했다. 애매하게나마 알게 될 수 있었다.
  • 미션2pr을 보냈다.

📂 Feeling

  • 내일은 코드스쿼드 현장에 가는 날이다. 기대된다.

Good

Bad

  • h2 옵션들에 대해 이해가 안가서 이런 자료를 찾아보다가 시간을 많이 허비헀다. 지금 단계에서는 스프링이나 자바에 힘을 더 쏟아야 하는데 너무 시간을 많이 쏟지 않았나 싶다.

🗒 Learned

1. 톰캣, 아파치, SSH

  • AWS 수업을 듣다가 아파치 VS 톰캣, ssh에 관한 이야기가 나와 그룹원들끼리 얘기를 나눈 선에서 간단히 정리한다

(1-1) 톰캣 Tomcat, 아파치 Apache

  • 옛날 팀 버너스리 시절로 올라가면 톰캣은 없었다. HTML문서 전달이 목적이었으니까 아파치로도 충분했다.
    • 아파치 : 정적인 데이터를 처리하는 HTTP 웹서버.
  • 톰캣 : 동적인 데이터 처리하는 웹서버 + 서블릿 컨테이너
  • 아파치랑 톰캣은 원래 명확히 기술이 갈려
  • 근데 톰캣이 발전하면서 아파치의 기능도 가능, 하지만 여전히 둘이 같이 쓴다.

(1-2) SSH

  • 파이로님께서 톰캣과 아파치를 설명하면서 SSH를 들어주셨는데 이에 대한 개념이 없어 짧게 정리하고자 한다.
  • Secure Shell, 암호해독... 네트워크 프로토콜? == cryptographic network protoco for operating netwok services securely over an unsecured network : 암호를 해독한다는 말이 아니라 암호화된 방식으로 소통
  • 생활코딩
    • 원격지에 있는 컴퓨터( 내 앞에 있지 않고 멀리 떨어진 컴퓨터) 를 안전하게 제어하기 위한 프로토콜, 또는 이 프로토콜을 사용하는 프로그램들
    • Secure 안전! 아무도 가로채가지 못하게 하도록 통신 하는 것을 목적으로 나옴 ( 이전의 Telne이나 Rlogindp qlgo)
    • 그렇게때문에 clinet와 server사이에 암호화된 방식으로 데이터를 주고 받아
    • ssh 클라이언트 프로그램 필요. 맥은 기본 내장
  • 참고 https://jootc.com/p/201808031460

2. 코드스쿼드 210306-11 spirng-qna 2 실습

(2-1) mem, tcp 아직 잘모르겠지만 우선 내용 메모

  • 출처 http://www.h2database.com/html/features.html#in_memory_databases
  • jdbc:h2:mem >> 오직 하나의 connection 만 데이터베이스에 허용될 때
  • jdbc:he:mem:db1 >> 이렇게 db이름을 지정하면 여러 커넥션이 접근 가능하다.
  • jdbc:h2:tcp://localhost/mem:db1 >> in-memory database에 다른 컴퓨터나 다른 프로세스에서 접근하고자 한다면 TCP서버를 이용해야 한다. (서버모드) (데이터베이스 클라이언트를 통해 커넥션 하고자 할 때)

    In-Memory Databases
    For certain use cases (for example: rapid prototyping, testing, high performance operations, read-only databases), it may not be required to persist data, or persist changes to the data. This database supports the in-memory mode, where the data is not persisted.

In some cases, only one connection to a in-memory database is required. This means the database to be opened is private. In this case, the database URL is jdbc:h2:mem: Opening two connections within the same virtual machine means opening two different (private) databases.

Sometimes multiple connections to the same in-memory database are required. In this case, the database URL must include a name. Example: jdbc:h2:mem:db1. Accessing the same database using this URL only works within the same virtual machine and class loader environment.

To access an in-memory database from another process or from another computer, you need to start a TCP server in the same process as the in-memory database was created. The other processes then need to access the database over TCP/IP or TLS, using a database URL such as: jdbc:h2:tcp://localhost/mem:db1.

By default, closing the last connection to a database closes the database. For an in-memory database, this means the content is lost. To keep the database open, add ;DB_CLOSE_DELAY=-1 to the database URL. To keep the content of an in-memory database as long as the virtual machine is alive, use jdbc:h2:mem:test;DB_CLOSE_DELAY=-1.
- https://jehuipark.github.io/java/springboot-h2-tcp-setup


profile
spring, java학습

0개의 댓글