java

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐฐํฌํ•˜๊ธฐ(3)-mysql์„ค์ •ํ•˜๊ธฐ

dev_summer 2020. 11. 12. 16:35

 

1. mysql์—ฐ๊ฒฐํ•˜๊ธฐ

 

ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค๋•Œ ์ปจํ…์ŠคํŠธํŒจ์Šค๋ฅผ /๋กœ ์„ค์ •ํ•˜์ง€์•Š๊ณ  ๊ฐ๊ฐ ์„ค์ •ํ•ด์ฃผ๋ฉด ์˜ค๋ฅ˜๊ฐ€ ๋‚˜์ง€ ์•Š์„ ์ˆ˜๋„ ์žˆ๋‹ค.

์šฐ๋ฆฌํ”„๋กœ์ ํŠธ๋Š” ์ปจํ…์ŠคํŠธํŒจ์Šค๊ฐ€ /์„ค์ •๋˜์–ด์žˆ์–ด์„œ ์•„๋ž˜์ฒ˜๋Ÿผ ๊ฐ๊ฐ์˜ ์„ค์ •์„ ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.

 

์˜ค๋ฅ˜์ฝ”๋“œ๋ฅผ ๋ณผ์ˆ˜ ์žˆ๋Š” ํŒŒ์ผ,

๋ฆฌ๋ˆ…์Šค์—์„œ๋Š” ๋กœ๊ทธํ™•์ธ์€ caralina.out์—์„œ ํ™•์ธํ•ด์•ผํ•œ๋‹ค.

 

 

 

 

 

 

์˜ค๋ฅ˜๋ฅผ ํ™•์ธํ•ด๋ณด๋ฉด null์ด๋– ์žˆ๋‹ค. ๊ฒฝ๋กœ ์ž์ฒด๋ฅผ ๋ชป์ฐพ๊ณ  ์žˆ๋‹ค.

webapp์— ์žˆ๋Š” context๋ฅผ mysql์„ ๋ฐ”๋ผ๋ณด๋˜๊ฐ€ webapps์— ์žˆ๋Š” context๋ฅผ ๋ฐ”๋ผ๋ณด๊ฒŒ ํ•ด์•ผํ•œ๋‹ค.

๊ธฐ์กด์— ์ปจํ…์ŠคํŠธ๋ฅผ ์ˆ˜์ •ํ•˜์˜€๊ธฐ๋•Œ๋ฌธ์— ์ผ๋ฐ˜์ ์œผ๋กœ /์œผ๋กœ ๊ฐ€๋ฉด ํ†ฐ์บฃ์˜ ์ปจํ…์ŠคํŠธ๋ฅผ ๋ฐ”๋ผ๋ณด๊ฒŒ๋œ๋‹ค.

์•„ํŒŒ์น˜ ๋‚ด๋ถ€์— ํ•˜๋‚˜์˜ ํ”„๋กœ์ ํŠธ๋งŒ ์ž‡์„๋•Œ ํŒจ์Šค๋ฅผ / ๋กœ ์„ค์ •ํ•œ๋‹ค.

์˜ˆ๋ฅผ๋“ค์–ด PC๋ฒ„์ „, ๋ชจ๋ฐ”์ผ๋ฒ„์ „ ๋“ฑ์˜ ํŒจ์Šค๋“ค์ด ์กด์žฌํ•œ๋‹ค. ๊ฐ๊ฐ์˜ ํ”„๋กœ์ ํŠธ์˜ ํŒจ์Šค๋“ค์ด ์กด์žฌํ•œ๋‹ค.

์ด ํ”„๋กœ์ ํŠธ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๊ณณ์ด ์•„ํŒŒ์น˜ํ†ฐ์บฃ, ๊ฐ๊ฐ์˜ ํ”„๋กœ์ ํŠธ๋“ค์—์˜ ํŒจ์Šค๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜์žˆ๋‹ค.

 

 

 

 

 

 

2. mysql ํ•œ๊ธ€ ์„ค์ • ํ•˜๊ธฐ

ํ‘ธํ‹ฐ๋กœ ppk๋„ฃ๊ณ  ์ ‘์†, mysql ํ•œ๊ธ€์ธ์ฝ”๋”ฉ ์„ค์ •ํ•˜๊ธฐ

 

 

 

 

 

 

 

 

 

 

 

 

 

3. winscp๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ฐฐํฌํ•˜๊ธฐ

 

*winscp

https://winscp.net/eng/download.php

 

WinSCP :: Official Site :: Download

WinSCP 5.17 Download WinSCP 5.17 is a major application update. New features and enhancements include: Improvements to sessions and workspace management, so that WinSCP can now easily restore tabs that were open when it was last closed. Hardware-accelerate

winscp.net

 

22๋ฒˆ ํฌํŠธ๋กœ ํŒŒ์ผ์ „์†กํ• ์ˆ˜์žˆ๋Š” ํ”„๋กœ๊ทธ๋žจ

 

๋‚˜์˜ private key๋ฅผ ๊ฐ€์ ธ์™€์„œ ์จ์•ผํ•จ.

 

์ €์žฅํ•œ ์™€๋ฅดํŒŒ์ผ์„ ๋“œ๋ž˜๊ทธํ•˜์—ฌ ์˜ฎ๊น€

 

 

 

ํ‘ธํ‹ฐ์™€ ๊ฐ™์€ ํฌํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ๋•Œ๋ฌธ์— ํ‘ธํ‹ฐ๋Š” ๊ผญ ๊บผ์ค˜์•ผํ•œ๋‹ค.

root์œผ๋กœ๋Š” ์ ‘์† x ubuntu ๋กœ ์ ‘์†ํ•˜์—ฌ์•ผ ํ•œ๋‹ค.

 

 

cd๋Š” ๋ณต์‚ฌ

md๋Š” ์ž˜๋ผ๋‚ด๊ธฐ


 

 

 

 

 

* ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด ์ดํ•ดํ•˜๊ธฐ

-       rwx       r-x         r-x            root           root

      ์†Œ์œ ์ž    ๊ทธ๋ฃน    ๋ชจ๋“ ์‚ฌ๋žŒ      ์†Œ์œ ์ž          ๊ทธ๋ฃน

- ์ง๋Œ€๊ธฐ ํŒŒ์ผ, ํด๋”๋ฉด D๋ผ๊ณ  ๋œธ

- rwx : 3๋น„ํŠธ๋กœ ์ด 0~7๊ฐ€์ง€์˜ ์ผ์„ ํ• ์ˆ˜์žˆ๋‹ค. 7์˜ ๊ถŒํ•œ์„ ๊ฐ–๊ณ  ์žˆ์œผ๋ฉด r(๋ฆฌ๋“œ),w(์“ฐ๊ธฐ,์ˆ˜์ •),x(์‹คํ–‰)ํ• ์ˆ˜์žˆ๊ณ  ๊ทธ๋ฃน์˜ ๊ถŒํ•œ์€ 5์ด๊ณ  ๋ชจ๋“ ์‚ฌ๋žŒ์˜ ๊ถŒํ•œ๋˜ํ•œ 5์ด๋‹ค.

- chmod : ๊ถŒํ•œ ๋ณ€๊ฒฝ ๋ชจ๋“œ , ๋ฃจํŠธ๋กœ ์ ‘์†ํ•˜์—ฌ chmod 646 ํŒŒ์ผ๋ช…์„ํ•˜๋ฉด ํŒŒ์ผ์— ๋Œ€ํ•œ ๊ถŒํ•œ์„ 646์œผ๋กœ ์„ค์ •ํ• ์ˆ˜ ์žˆ๋‹ค.

*bind address ์—์Šคํ์—˜์„ ํ—ˆ์šฉํ•  ip, ์™ธ๋ถ€์—์„œ ์ ‘์†ํ•  ์ผ์ด ์—†๊ธฐ๋–„๋ฌธ์—

0.0.0.0 , * ์€ ๋ชจ๋‘ ํ—ˆ์šฉ์ด๋ผ๋Š” ๋œป ์‹œํ—˜์— ๋‚˜์˜จ๋Œ•