[AWS] EC2 SecureCRT 로 접속하기
IT/기타2020. 6. 22. 16:47
1. SecureCRT 접속
- Hostname : 퍼블릭 IP or 퍼블릭 DNS (ex: ec2-3-128-117-114.us-east-2.compute.amazonaws.com)
- Username : ec2-user
- Authentication-PublicKey-Properites...
- use identity or certificate file : AWS에서 다운받은 Pem 파일 선택
2. 접속 성공
'IT > 기타' 카테고리의 다른 글
[SAML Test] 1. Setup a Single Sign On SAML Test Environment with Docker and NodeJS (0) | 2020.09.07 |
---|---|
[SAML Test] 2. CentOS 8 nvm을 이용한 node.js 설치 (0) | 2020.09.07 |
Jira API token 생성 (Issue does not exist or you do not have permission to see it) (0) | 2020.06.23 |
Jira 설치 (docker) (0) | 2020.06.23 |
json-server (docker) (0) | 2020.06.17 |
json-server (docker)
IT/기타2020. 6. 17. 13:32
1. docker image : vimagick/json-server
(https://hub.docker.com/r/vimagick/json-server)
2. docker 에서 json-server 설치
- docker-compose.yml
json-server:
image: vimagick/json-server
command: -H 0.0.0.0 -p 3000 -w db.json
ports:
- "3000:3000"
volumes:
- ./data:/data
restart: always
- docker-compose up -d
[root@localhost ~]# docker-compose up -d
Creating root_json-server_1 ... done
- http://아이피:3000 접속
3. 테스트 (curl)
- data/db.json
[root@localhost ~]# curl http://localhost:3000/db
{
"posts": [
{
"id": 1,
"title": "json-server",
"author": "typicode"
}
],
"comments": [
{
"id": 1,
"body": "some comment",
"postId": 1
}
],
"profile": {
"name": "typicode"
}
- POST : 레코드 추가
[root@localhost ~]# curl -i -X POST -H 'Content-Type: application/json' -d '{"id":2,"title":"test","author":"tester"}' http://localhost:3000/posts
HTTP/1.1 201 Created
X-Powered-By: Express
Vary: Origin, X-HTTP-Method-Override, Accept-Encoding
Access-Control-Allow-Credentials: true
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Access-Control-Expose-Headers: Location
Location: http://localhost:3000/posts/2
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
Content-Length: 54
ETag: W/"36-/lxOJ9UlKz12ZxEx1xqB+hE3CK8"
Date: Wed, 17 Jun 2020 05:22:03 GMT
Connection: keep-alive
{
"id": 2,
"title": "test",
"author": "tester"
}
- PUT : 레코드 수정
[root@localhost ~]# curl -i -X PUT -H 'Content-Type: application/json' -d '{"title":"test1","author":"tester1"}' http://localhost:3000/posts/2
HTTP/1.1 200 OK
X-Powered-By: Express
Vary: Origin, Accept-Encoding
Access-Control-Allow-Credentials: true
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
Content-Length: 56
ETag: W/"38-hQWeLGNyekH8SKlDj7CMiHCakTA"
Date: Wed, 17 Jun 2020 05:25:09 GMT
Connection: keep-alive
{
"title": "test1",
"author": "tester1",
"id": 2
}
- DELETE : 레코드 삭제
[root@localhost ~]# curl -i -X DELETE http://localhost:3000/posts/2
HTTP/1.1 200 OK
X-Powered-By: Express
Vary: Origin, Accept-Encoding
Access-Control-Allow-Credentials: true
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
Content-Length: 2
ETag: W/"2-vyGp6PvFo4RvsFtPoIWeCReyIC8"
Date: Wed, 17 Jun 2020 05:20:33 GMT
Connection: keep-alive
{}
'IT > 기타' 카테고리의 다른 글
[SAML Test] 1. Setup a Single Sign On SAML Test Environment with Docker and NodeJS (0) | 2020.09.07 |
---|---|
[SAML Test] 2. CentOS 8 nvm을 이용한 node.js 설치 (0) | 2020.09.07 |
Jira API token 생성 (Issue does not exist or you do not have permission to see it) (0) | 2020.06.23 |
Jira 설치 (docker) (0) | 2020.06.23 |
[AWS] EC2 SecureCRT 로 접속하기 (0) | 2020.06.22 |