ใ…ค

๐Ÿ”ฐ(ํ•ด์™ธ) ์›Œ๋“œํ”„๋ ˆ์Šค ์„ค์น˜ ์ค€๋น„๋ฌผ

2023๋…„ ๋ฒ„์ „ ์›Œ๋“œํ”„๋ ˆ์Šค x ๋ผ์ดํŠธ์„ธ์ผ ์„ค์น˜ ๊ณผ์ •
1. ๋„๋ฉ”์ธ
2. ํ•ด์™ธ ๊ฒฐ์ œ ์นด๋“œ(๋งˆ์Šคํ„ฐ์นด๋“œ or ๋น„์ž์นด๋“œ or ๊ธฐํƒ€ ๋“ฑ๋“ฑ)
3. ์›Œ๋“œํ”„๋ ˆ์Šค ์„ค์น˜ ์‹œ๊ฐ„์€ ์•ฝ 1์‹œ๊ฐ„ ์ •๋„ ์†Œ์š”๋ฉ๋‹ˆ๋‹ค.(์ดˆ๋ณด๊ธฐ์ค€)

๐Ÿ”ฐ๋„๋ฉ”์ธ ๊ตฌ๋งคํ•˜๊ธฐ(Feat. ํ˜ธ์ŠคํŒ…KR)

์›Œ๋“œํ”„๋ ˆ์Šค๋ฅผ ์„ค์น˜ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๊ฐ€์žฅ๋จผ์ € ๋„๋ฉ”์ธ๋ถ€ํ„ฐ ๊ตฌ๋งคํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
๋„๋ฉ”์ธ ๊ฐ€๊ฒฉ์€ 1๋…„์„ ๊ธฐ์ค€์œผ๋กœ ํ•˜๋ฉฐ, ์œ ์ง€ ๋น„์šฉ์€ ๋งค๋…„ ์•ฝ 10,000์› ~ 20,000์› ์ •๋„์ž…๋‹ˆ๋‹ค.
ํ˜ธ์ŠคํŒ… ์—…์ฒด๋Š” ์นดํŽ˜24, ๊ฐ€๋น„์•„, ํ˜ธ์ŠคํŒ…KR ๋“ฑ๋“ฑ ๋งŽ์€ ์‚ฌ์ดํŠธ๊ฐ€ ์กด์žฌํ•ฉ๋‹ˆ๋‹ค.
๊ฐœ์ธ์ ์œผ๋กœ ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„  ํ˜ธ์ŠคํŒ…KR๋กœ ์ง„ํ–‰ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๐Ÿ”ฐ๋„๋ฉ”์ธ ์ข…๋ฅ˜(.COM ์ถ”์ฒœ)

๋„๋ฉ”์ธ ์ข…๋ฅ˜์—๋Š” .XYZ / .NET / CO.KR / .AI / .TV / .org / .Cloud๋“ฑ ๋‹ค์–‘ํ•˜๊ฒŒ ์กด์žฌํ•˜๋Š”๋ฐ ์ด๋Ÿฐ ๋„๋ฉ”์ธ์€ ๊ตฌ๋งคํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์„ ์ถ”์ฒœ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ๊ฐ€์žฅ ๋ฌด๋‚œํ•œ .COM ์œผ๋กœ ๊ตฌ๋งคํ•˜์„ธ์š”. ๋งŒ์›์ดํ•˜ ๋„๋ฉ”์ธ์€ ๊ตฌ๋งค ํ›„ 3๋…„ ํ›„์— ๊ฐ€๊ฒฉ์„ ์˜ฌ๋ฆฌ๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ€์žฅ ์ €๋ ดํ•œ ๋„๋ฉ”์ธ์€ ๊ฒฐ๊ตญ .COM์ž…๋‹ˆ๋‹ค.

๐Ÿ”ฐ์•„๋งˆ์กด ๋ผ์ดํŠธ์„ธ์ผ ์•”ํ˜ธํ‚ค ์ƒ์„ฑ

๋„๋ฉ”์ธ ๊ตฌ๋งค๊ฐ€ ์™„๋ฃŒ ๋˜์—ˆ๋‹ค๋ฉด, ์•„๋งˆ์กด ๋ผ์ดํŠธ์„ธ์ผ ์ธ์Šคํ„ดํŠธ์šฉ RSA ๋น„๋ฐ€๋ฒˆํ˜ธ ์ƒ์„ฑ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
ํ•˜๋‹จ ์ฒจ๋ฌด ๋œ ์•”ํ˜ธํ‚ค ์ƒ์„ฑ ํ”„๋กœ๊ทธ๋žจ์„ ๋‹ค์šด๋ฐ›์Šต๋‹ˆ๋‹ค.

PuTTY Key Generator ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰
ํ•˜๋‹จ Parameters RSA ์„ ํƒ, Number of bits in a generated Key: 2048 ์„ธํŒ… ํ›„
Generate ๋ฒ„ํŠผ ํด๋ฆญ,ํ›„ ๋งˆ์šฐ์Šค๋ฅผ ๊ณ„์† ์›€์ง์—ฌ์ค๋‹ˆ๋‹ค.!!!!
(์ฃผ์˜) ๋งˆ์šฐ์Šค๋ฅผ ์›€์ง์ด์ง€ ์•Š์œผ๋ฉด ์ง„ํ–‰์ด ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

Save public key(๊ณต๊ฐœํ‚ค) / Save private key(๊ฐœ์ธํ‚ค) ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
๊ณต๊ฐœํ‚ค๋Š” ๊ตฌ๋งคํ•œ ๋„๋ฉ”์ธ๋ช….pub / ๊ฐœ์ธํ‚ค๋Š” ๊ตฌ๋งคํ•œ ๋„๋ฉ”์ธ๋ช….ppk ์ €์žฅํ•ด์ฃผ์„ธ์š”.
ex) apple.pub / apple.ppk
ํ•ด๋‹น ์ €์žฅ ํŒŒ์ผ์€, ์„ค์น˜ ์‹œ ๊ณ„์† ์‚ฌ์šฉ๋  ํŒŒ์ผ์ด๊ธฐ ๋•Œ๋ฌธ์— ๊ผญ, USB๋‚˜ Email๋ฅผ ํ†ตํ•ด ๋ฐฑ์—…ํ•ด๋‘์–ด์•ผํ•ฉ๋‹ˆ๋‹ค.
์žƒ์–ด๋ฒ„๋ฆฌ๋ฉด ๋‚˜์ค‘์— ์ ‘์† ๋ฐ ๋ณต๊ตฌ๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

pub. ppk ํŒŒ์ผ์ƒ์„ฑ

๐Ÿ”ฐ์•„๋งˆ์กด ๋ผ์ดํŠธ์„ธ์ผ ํšŒ์›๊ฐ€์ž…

ํšŒ์›๊ฐ€์ž… ํ›„, ๋ฃจํŠธ์‚ฌ์šฉ์ž๋กœ ํšŒ์›๊ฐ€์ž…/๋กœ๊ทธ์ธ์„ ์™„๋ฃŒํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ”ฐ์•„๋งˆ์กด ๋ผ์ดํŠธ์„ธ์ผ ์ธ์Šคํ„ดํŠธ ์ƒ์„ฑ

์ธ์Šคํ„ดํŠธ ์ƒ์„ฑ ๋ฒ„ํŠผ ํด๋ฆญ, ์œ„์น˜๋Š” ์„œ์šธ Korea ํ”Œ๋žซํผ โžฅ Linux/unix ๋ธ”๋ฃจํ”„๋ฆฐํŠธ โžฅ OS์ „์šฉ โžฅ Ubuntu(20.04 LTS) ์„ ํƒ

๐Ÿ”ฐSSH ํผ๋ธ”๋ฆญํ‚ค ์—…๋กœ๋“œ

SSH ํ‚ค ํŽ˜์–ด ๋ณ€๊ฒฝ : ์ƒˆ๋กœ ์—…๋กœ๋“œ ์ด์ „์— PuTTY Key ์ƒ์„ฑํ–ˆ๋˜, ๋„๋ฉ”์ธ๋ช….pubํŒŒ์ผ ์„ ํƒ ํ›„ ํ‚ค ์—…๋กœ๋“œ

๐Ÿ”ฐ์ธ์Šคํ„ดํŠธ ํ”Œ๋žœ ์„ ํƒ

์ธ์Šคํ„ดํŠธ ํ”Œ๋žœ์„ ํƒ : ์ตœ์†Œ 10$/์›” ์š”๊ธˆ์ œ ์„ ํƒ (๊ทธ ์ดํ•˜ ์š”๊ธˆ์ œ๋Š” ์ถ”์ฒœํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.)
10๋‹ฌ๋Ÿฌ ์š”๊ธˆ์ œ ์ ˆ๋Œ€ ์ถ”์ฒœ!! (5๋‹ฌ๋Ÿฌ ๋ฏธ๋งŒ ์š”๊ธˆ์ œ๋Š” ์‚ฌ์ดํŠธ ๋‹ค์šด ํ˜„์ƒ์ด ์‹ฌํ•ฉ๋‹ˆ๋‹ค.)
์ธ์Šคํ„ดํŠธ ๋ฆฌ์†Œ์Šค ์ด๋ฆ„ : ๋„๋ฉ”์ธ ๋„ฃ์–ด์ฃผ๊ณ  ์ธ์Šคํ„ดํŠธ ์ƒ์„ฑ
(์ฃผ์˜)์ธ์Šคํ„ดํŠธ ์ƒ์„ฑ ํ›„, ํ™œ์„ฑํ™”๊นŒ์ง€๋Š” ์•ฝ 30์ดˆ ~ 1๋ถ„ ์ •๋„ ์‹œ๊ฐ„์ด ์†Œ์š”๋ฉ๋‹ˆ๋‹ค.
๋Œ€๊ธฐ ์ค‘ โ–ถ ์‹คํ–‰ ์ค‘์œผ๋กœ ๋ณ€๊ฒฝ(์ž ์‹œ ๊ธฐ๋‹ค๋ ค์ฃผ์„ธ์š”.)

30์ดˆ ํ›„, ์‹คํ–‰ ์ค‘์œผ๋กœ ๋ณ€๊ฒฝ๋ฉ๋‹ˆ๋‹ค.

๐Ÿ”ฐ์ธ์Šคํ„ดํŠธ ๊ณ ์ • IP ์—ฐ๊ฒฐ

๋„คํŠธ์›Œํ‚น โžฅ ๊ณ ์ • IP ์ƒ์„ฑ โžฅ์ธ์Šคํ„ดํŠธ์— ์—ฐ๊ฒฐ

๐Ÿ”ฐHttps ๊ทœ์น™์ถ”๊ฐ€

์•„๋งˆ์กด ๋ผ์ดํŠธ์„ธ์ผ ์ดˆ๊ธฐํ™”๋ฉด์œผ๋กœ ๋Œ์•„์™€์„œ ์ 3๊ฐœ ๋ˆ„๋ฅด๊ณ  ๊ด€๋ฆฌํ™”๋ฉด์œผ๋กœ ์ ‘์†

1. (๋ฉ”๋ชจ!!!) ํผ๋ธ”๋ฆญ IP (๊ณ ์ •IP)์ฃผ์†Œ๋Š” ๊ผญ ๋ฉ”๋ชจํ•ด๋‘์„ธ์š”.
2. ๋„คํŠธ์›Œํ‚น โžฅ ๊ทœ์น™ ์ถ”๊ฐ€ โžฅ HTTPS ์„ ํƒ โžฅ ์ƒ์„ฑ

HTTPS ๊ทœ์น™ ์ถ”๊ฐ€

๐Ÿ”ฐํ˜ธ์ŠคํŒ…KR ๋„๋ฉ”์ธ ์—ฐ๊ฒฐ

ํ˜ธ์ŠคํŒ… KR ์ ‘์† ํ›„ โžฅ ๋‚˜์˜์„œ๋น„์Šค โžฅ ๋„๋ฉ”์ธ๊ด€๋ฆฌ โžฅ ์ž‘์—… ํด๋ฆญ โžฅ DNS ๋ ˆ์ฝ”๋“œ ์„ค์ •

์ด 3๊ฐ€์ง€ ์ž‘์—…์„ ์ง„ํ–‰ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
๋ ˆ์ฝ”๋“œ ์ถ”๊ฐ€ ํด๋ฆญ ํ›„,
1. ์œ ํ˜• A / ์ด๋ฆ„ @ / ํผ๋ธ”๋ฆญ IP ์ฃผ์†Œ ๊ฐ’(์ˆซ์ž) TTL 3600 ๋“ฑ๋ก!
2. ์œ ํ˜• A / ์ด๋ฆ„ * / ํผ๋ธ”๋ฆญ IP ์ฃผ์†Œ ๊ฐ’(์ˆซ์ž) TTL 3600 ๋“ฑ๋ก!
3. CNAME A / ์ด๋ฆ„ www / ๊ตฌ๋งคํ•œ ๋„๋ฉ”์ธ.com TTL 3600 ๋“ฑ๋ก!

๐Ÿ”ฐPutty ํ”„๋กœ๊ทธ๋žจ ๋‹ค์šด๋กœ๋“œ

Putty ์‚ฌ์ดํŠธ์— ์ ‘์†ํ•˜์—ฌ, Alternative binary File์—์„œ SSH Putty.exe.ํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ”ฐํ”„๋ก์‹œ ๋„๊ธฐ

์œˆ๋„์šฐ ํ‚ค โžฅ ํ”„๋ก์‹œ ๊ฒ€์ƒ‰(๋„คํŠธ์›Œํฌ ๋ฐ ์ธํ„ฐ๋„ท) โžฅ ๋” or ๋„๊ธฐ

๐Ÿ”ฐPutty.exe ํ”„๋กœ๊ทธ๋žจ ์„ธํŒ…

PUTTY.exe ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ํ›„, Host Name ๊ตฌ๋งคํ•œ ๋„๋ฉ”์ธ ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅ
Saved Sessions ๋„๋ฉ”์ธ ์ฃผ์†Œ ์ž…๋ ฅ ํ›„, Save ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

์ขŒ์ธก Session โžฅ Connection โžฅ Data โžฅ Auto-login username = ubuntu ์ž…๋ ฅ!!!

์ขŒ์ธก Session โžฅ Connection โžฅ SSH โžฅ Auth Credintials = putty ์—์„œ ์ƒ์„ฑํ•œ .ppk(๊ฐœ์ธํ‚ค)ํŒŒ์ผ ์—…๋กœ๋“œ!
๋ฐ”๋กœ OPEN ๋ฒ„ํŠผ ๋ˆ„๋ฅด์ง€๋งˆ์„ธ์š”.!!

Session์œผ๋กœ ๋‹ค์‹œ ๋Œ์•„์™€์„œ Save ๋ฒ„ํŠผ ํ•œ๋ฒˆ ๋ˆ„๋ฅด๊ณ  ๊ทธ ํ›„, OPEN ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

OPEN ๋ฒ„ํŠผ ํด๋ฆญ ํ›„ Accept ๋ˆŒ๋Ÿฌ์„œ ์ง„ํ–‰

๐Ÿ”ฐ์›Œ๋“œํ”„๋ ˆ์Šค ์„ค์น˜ ์‹œ์ž‘

ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/Shit + inset (๋ถ™์—ฌ๋„ฃ๊ธฐ)
<์ž…๋ ฅ1>
sudo passwd root
New Password : ๋Œ€๋ฌธ์ž & ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ํฌํ•จํ•˜์—ฌ ์ž…๋ ฅ
Retype New Password : ๋‹ค์‹œ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. 
password updated successsfully ๋ฌธ๊ตฌ๊ฐ€ ๋‚˜์™€์•ผํ•ฉ๋‹ˆ๋‹ค.
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/Shit + inset (๋ถ™์—ฌ๋„ฃ๊ธฐ)
<์ž…๋ ฅ1>
sudo apt update
(์•ฝ 30์ดˆ์ • ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)
<์ž…๋ ฅ2>
sudo apt install mc
Do you want to continue? [Y/N] ์งˆ๋ฌธ์ด ๋‚˜์˜ค๋ฉด Y ์ž…๋ ฅ
(์•ฝ 30์ดˆ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)

<์ž…๋ ฅ3>
sudo apt update
์ž…๋ ฅ1 ๊ฒฐ๊ณผ๊ฐ’
์ž…๋ ฅ2 ๊ฒฐ๊ณผ๊ฐ’
์ž…๋ ฅ3 ๊ฒฐ๊ณผ๊ฐ’
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/Shit + inset (๋ถ™์—ฌ๋„ฃ๊ธฐ)
<์ž…๋ ฅ1>
sudo apt install nginx
Do you want to continue? [Y/N] ์งˆ๋ฌธ์ด ๋‚˜์˜ค๋ฉด Y ์ž…๋ ฅ
(์•ฝ 20์ดˆ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)

<์ž…๋ ฅ2>
sudo apt install mysql-server
Do you want to continue? [Y/N] ์งˆ๋ฌธ์ด ๋‚˜์˜ค๋ฉด Y ์ž…๋ ฅ
(์•ฝ 1๋ถ„ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)
์ž…๋ ฅ1/2 ๊ฒฐ๊ณผ๊ฐ’
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo su
์ž…๋ ฅ1 ๊ฒฐ๊ณผ๊ฐ’

ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo mysql

<์ž…๋ ฅ2>
(๋น„๋ฐ€๋ฒˆํ˜ธ๋Š” ๋Œ€๋ฌธ์ž & ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ํฌํ•จํ•˜์—ฌ ์ž…๋ ฅ)
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '๋น„๋ฐ€๋ฒˆํ˜ธ';
<์ž…๋ ฅ3>
exit ์ž…๋ ฅ ํ›„, ๋น ์ ธ๋‚˜์˜ต๋‹ˆ๋‹ค.
์ž…๋ ฅ1 ๊ฒฐ๊ณผ๊ฐ’
์ž…๋ ฅ2 ๊ฒฐ๊ณผ๊ฐ’
์ž…๋ ฅ3 ๊ฒฐ๊ณผ๊ฐ’
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo mysql_secure_installation
<์งˆ๋ฌธ1>
Enter password for user root: ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ
<์งˆ๋ฌธ2>
Press y|Y for Yes, any other key for No: Y ์ž…๋ ฅ
<์งˆ๋ฌธ3>
please enther 0 = Low, 1 = MEDIUM and 2 = STRONG: 2์ž…๋ ฅ 
<์งˆ๋ฌธ4>
Change the password for root? Y ์ž…๋ ฅ
<์งˆ๋ฌธ5>
(๋น„๋ฐ€๋ฒˆํ˜ธ๋Š” ๋Œ€๋ฌธ์ž & ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ํฌํ•จํ•˜์—ฌ ์ž…๋ ฅ)
New password:๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ
<์งˆ๋ฌธ6>
Re-enter new password:  ๋น„๋ฐ€๋ฒˆํ˜ธ ์žฌ์ž…๋ ฅ
<์งˆ๋ฌธ7>
Do you wish to contintue with the password provided? : Y ์„ ํƒ
<์งˆ๋ฌธ8>
Remove anonymous Users? Y์„ ํƒ
<์งˆ๋ฌธ9>
Disallow root login remotely? Y์„ ํƒ
<์งˆ๋ฌธ10>
Remove test database and access to it? Y์„ ํƒ
<์งˆ๋ฌธ11>
Reload privilege tables now? Y์„ ํƒ

All Done ๋‚˜์˜ค๋ฉด ์™„๋ฃŒ.!
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo apt install software-properties-common
Do you want to continue? [Y/N] ์งˆ๋ฌธ์ด ๋‚˜์˜ค๋ฉด Y ์„ ํƒ
(์•ฝ 10์ดˆ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)

<์ž…๋ ฅ2> 
sudo add-apt-repository ppa:ondrej/php
[Press [ENTER] to continue or Ctrl-c to cancel adding it.]?์—”ํ„ฐ ์„ ํƒ
(์•ฝ 30์ดˆ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)
์ž…๋ ฅ1 ๊ฒฐ๊ณผ๊ฐ’
์ž…๋ ฅ2 ๊ฒฐ๊ณผ๊ฐ’
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo apt update
(์•ฝ 10์ดˆ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo apt install php7.4-fpm php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip unzip -y
(์•ฝ 2 ~ 3๋ถ„ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)
์ž…๋ ฅ1 ๊ฒฐ๊ณผ๊ฐ’
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo nano /etc/nginx/sites-available/default
์•„๋ž˜ ๊ทธ๋ฆผ์ฒ˜๋Ÿผ ์ขŒ์ธก์— ์žˆ๋Š” (#)์ฃผ์„ 7๊ฐœ๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.
์ตœ์ข… ๊ฒฐ๊ณผ # 5๊ฐœ!! ๋‚จ์•„์•ผํ•ฉ๋‹ˆ๋‹ค.
Ctrl+X ๋ˆ„๋ฅด๊ณ  / YES ์ €์žฅ
#์ด ์ด 5๊ฐœ ๋‚จ์•„์•ผํ•ฉ๋‹ˆ๋‹ค.
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo service nginx restart

<์ž…๋ ฅ2>
sudo nano /var/www/html/info.php
ํŽธ์ง‘๊ธฐ ์•ˆ์— 
<?php phpinfo(); ?>
 ๋ถ™์—ฌ ๋„ฃ์–ด์Šต๋‹ˆ๋‹ค.
Ctrl + X ๋ˆ„๋ฅด๊ณ  / YES ์ €์žฅ
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo mysql -u root -p
Enter password : ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ

<์ž…๋ ฅ2>
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
์ž…๋ ฅ1/2 ๊ฒฐ๊ณผ
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
์•„์ด๋”” / ๋น„๋ฐ€๋ฒˆํ˜ธ๋Š” ๋Œ€์†Œ๋ฌธ์ž + ์ˆซ์ž + ํŠน์ˆ˜ํ‚ค
(์ค‘์š”!!)ํ•˜๋‹จ์ž‘์—… ์‹œ ์•„์ด๋””์™€ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ผญ ๋ฉ”๋ชจํ•ด๋‘์„ธ์š”.

<์ž…๋ ฅ1>
CREATE USER '์•„์ด๋””'@'localhost' IDENTIFIED BY '๋น„๋ฐ€๋ฒˆํ˜ธ';
<์ž…๋ ฅ2>
GRANT ALL ON *.* TO '์•„์ด๋””'@'localhost';
<์ž…๋ ฅ3>
GRANT ALL PRIVILEGES ON wordpress.* TO '์•„์ด๋””'@'localhost' WITH GRANT OPTION;
<์ž…๋ ฅ4>
SHOW GRANTS FOR '์•„์ด๋””'@'localhost';
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
FLUSH PRIVILEGES;

<์ž…๋ ฅ2>
exit
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
cd /tmp

<์ž…๋ ฅ2>
curl -LO https://wordpress.org/latest.tar.gz
(์•ฝ 1๋ถ„ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)

<์ž…๋ ฅ3>
tar xzvf latest.tar.gz
์ž…๋ ฅ1/2 ๊ฒฐ๊ณผ๊ฐ’
์ž…๋ ฅ3 ๊ฒฐ๊ณผ๊ฐ’
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php

<์ž…๋ ฅ2>
sudo cp -a /tmp/wordpress/. /var/www/html/wordpress/
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ>
sudo chown -R www-data:www-data /var/www/html/wordpress

<์ž…๋ ฅ>
sudo chmod -R 755 /var/www/html/wordpress/

<์ž…๋ ฅ1>
sudo nano /etc/nginx/sites-available/wordpress
๋นˆ ํŽธ์ง‘ ๊ณต๊ฐ„์— ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ๋ถˆ์—ฌ ๋„ฃ์–ด์ฃผ์„ธ์š”.
<์ž…๋ ฅ2>
server {
listen 80;
listen [::]:80;
root /var/www/html/wordpress;
index index.php index.html index.htm;
server_name ๋„๋ฉ”์ธ ์ฃผ์†Œ.com; 
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

<์ž…๋ ฅ3>
Ctrl + X ๋ˆ„๋ฅด๊ณ  Y ์ €์žฅ
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/
<์ž…๋ ฅ2>
sudo systemctl reload nginx
์ž…๋ ฅ 1/2 ๊ฒฐ๊ณผ๊ฐ’
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)  / (Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo systemctl reload nginx
<์ž…๋ ฅ2>
sudo unlink /etc/nginx/sites-enabled/default
<์ž…๋ ฅ3>
sudo systemctl reload nginx
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo nano /var/www/html/wordpress/wp-config.php

DB_NAME database_name_here ๋Œ€์‹ ์—'wordpress'์ž…๋ ฅ
DB_USER 'username_here' ๋Œ€์‹ ์— '์•„์ด๋””ID'์ž…๋ ฅ
DB_PASSWORD = ๋น„๋ฐ€๋ฒˆํ˜ธ๋Š” ๋ณธ์ธ '๋น„๋ฐ€๋ฒˆํ˜ธPW' ์ž…๋ ฅ

(์ฃผ์˜!!)์•„์ด๋””์™€ ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ๋‹ค๋ฅด๋ฉด, ์ง„ํ–‰์ด ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
[์•„์ด๋”” ๋น„๋ฐ€๋ฒˆํ˜ธ๋Š” ์œ„์—์„œ ๋งŒ๋“ค์—ˆ๋˜ ๊ฑฐ ๋„ฃ์œผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.]

์›Œ๋“œํ”„๋ ˆ์Šค ํ‚ค ์ƒ์„ฑ ์‚ฌ์ดํŠธ์— ์ ‘์†ํ•˜์—ฌ ๋ชจ๋‘ ๋ณต์‚ฌํ•˜์—ฌ, ํ•˜๋‹จ ๋‚ด์šฉ์„ ๋ณ€๊ฒฝํ•ด์ฃผ์‹œ๋ฉด๋ฉ๋‹ˆ๋‹ค.
(์ฃผ์˜!!) ๋‹ค๋ฅธ ๋ช…๋ น์–ด๊ฐ€ ์ง€์›Œ์ง€์ง€ ์•Š๋„๋ก ํ•ด์ฃผ์„ธ์š”.

ํ‚ค ์ƒ์„ฑ ํ›„ ๋ณต์‚ฌ
๊ธฐ์กด ๋‚ด์šฉ ์‚ญ์ œ ํ›„
์ƒˆ๊ฒƒ์œผ๋กœ ๊ต์ฒด!
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)  / (Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
define('FS_METHOD', 'direct');
define( 'WP_MEMORY_LIMIT', '512M' );
 /*Thatโ€™s all, ~ ์•„๋ž˜์— ๋ถ™์—ฌ๋„ฃ์–ด์ฃผ์„ธ์š”.
Ctrl + X ๋ˆ„๋ฅด๊ณ  Y ์ €์žฅ
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo nano /etc/php/7.4/fpm/php.ini
Ctrl + W (๋‹จ์–ด์ฐพ๊ธฐ) ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜์—ฌ ํ•ด๋‹น ๋ณ€์ˆ˜๋ฅผ
์ฐพ์•„์„œ ๊ฐ’์„ ์•„๋ž˜์™€ ๊ฐ™์ด ๋ณ€๊ฒฝํ•ดํ•ฉ๋‹ˆ๋‹ค.

post_max_size = 128M
upload_max_filesize = 128M
max_input_vars = 3000 (Max_input_vars์˜ ๊ฒฝ์šฐ์—๋Š” ์•ž์— ; <- ์ฃผ์„์ฒ˜๋ฆฌ ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค.(;์ฃผ์„์ œ๊ฑฐ)ํ•ด์ฃผ์„ธ์š”.
max_input_time = 3000 (๋™์ผ ๋‹จ์–ด๊ฐ€ ์žˆ์–ด 2๋ฒˆ ๊ฒ€์ƒ‰ ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.)
max_execution_time = 300
memory_limit = 512M
Ctrl+ X ๋ˆ„๋ฅด๊ณ  Y ์ €์žฅ
<์ž…๋ ฅ1>
sudo systemctl reload nginx
<์ž…๋ ฅ2>
systemctl restart nginx.service php7.4-fpm.service
์ž…๋ ฅ1/2 ๊ฒฐ๊ณผ๊ฐ’
์›Œ๋“œํ”„๋ ˆ์Šค ์„ธํŒ…์ด ์™„๋ฃŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
ํฌ๋กฌ์ฐฝ์— F6์„ ๋ˆŒ๋Ÿฌ ๋„๋ฉ”์ธ ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅ ํ•ด์ฃผ์„ธ์š”.
(ํ˜น์‹œ๋ผ๋„ ์ฐฝ์ด ๋œจ์ง€ ์•Š๋Š”๋‹ค๋ฉด, ํฌ๋กฌ์˜ ๊ฒฝ์šฐ ์ฟ ํ‚ค ์ œ๊ฑฐ or ์—ฃ์ง€ ๋ธŒ๋ผ์šฐ์ €๋กœ ์ ‘์† ํ•ด๋ณด์„ธ์š”.)
์›Œ๋“œํ”„๋ ˆ์Šค ์ฐฝ์ด ๋œจ๋ฉด, ํ•œ๊ตญ์–ด๋ฅผ ์ฐพ์•„์„œ ๊ณ„์† ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค. 
์‚ฌ์ดํŠธ ์ œ๋ชฉ : ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ
์‚ฌ์šฉ์ž๋ช… : ๋ณ€๊ฒฝ ๋ถˆ๊ฐ€๋Šฅ
๋น„๋ฐ€๋ฒˆํ˜ธ : 
์ด๋ฉ”์ผ์„ ์ž…๋ ฅ :

์ž…๋ ฅ ํ›„, ์›Œ๋“œํ”„๋ ˆ์Šค ์„ค์น˜ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฆ…๋‹ˆ๋‹ค.
์›Œ๋“œํ”„๋ ˆ์Šค ๋กœ๊ทธ์ธ ๋ฐฉ๋ฒ•์€ ๋„๋ฉ”์ธ์ฃผ์†Œ.com/wp-admin (์ž…๋ ฅํ•ด์ฃผ์‹œ๋ฉด ๋กœ๊ทธ์ธ ์ฐฝ์ด ๋‚˜ํƒ€๋‚ฉ๋‹ˆ๋‹ค.) /wp-admin์€ ๊ผญ ์†Œ๋ฌธ์ž!

๐Ÿ”ฐSSL ์„ค์น˜๋ฐฉ๋ฒ•

ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo su
<์ž…๋ ฅ2>
sudo apt-get update
<์ž…๋ ฅ3>
sudo apt-get install software-properties-common
<์ž…๋ ฅ4>
sudo add-apt-repository ppa:certbot/certbot
[Enter]์—”ํ„ฐ!
(์•ฝ 10์ดˆ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)
<์ž…๋ ฅ5>
sudo apt-get install python3-certbot-nginx
Do you want to continue? [Y/n] Y ์ž…๋ ฅ
(์•ฝ 10์ดˆ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)
<์ž…๋ ฅ5>
sudo service nginx restart
<์ž…๋ ฅ1>
sudo certbot --nginx -d ๋„๋ฉ”์ธ์ฃผ์†Œ.com
<์ž…๋ ฅ2>
Enter email address : ์ด๋ฉ”์ธ์ฃผ์†Œ ์ž…๋ ฅ
<์งˆ๋ฌธ1>
(A)gree/(C)ancel: A์„ ํƒ
<์งˆ๋ฌธ2>
(Y)es/(N)o: Y์„ ํƒ
(์•ฝ 10์ดˆ ์„ค์น˜๊ณผ์ •์ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.)
<์งˆ๋ฌธ3>
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2 ์„ ํƒ
ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ>
sudo dpkg-reconfigure tzdata
Asia ์„ ํƒ Seoul ์„ ํƒ

๐Ÿ”ฐFTP ์ ‘์†

ํ•˜๋‹จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. Ctrl + C (๋ณต์‚ฌ)/(Shift + inset) ๋ถ™์—ฌ๋„ฃ๊ธฐ
<์ž…๋ ฅ1>
sudo nano /etc/ssh/sshd_config
<์ž…๋ ฅ2>
# the setting of "PermitRootLogin without-password".
๋ถ€๋ถ„ ์ง€์šฐ๊ณ  PermitRootLogin yes ์œผ๋กœ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค.
Ctrl + X ๋ˆ„๋ฅด๊ณ  Y ์ €์žฅ

<์ž…๋ ฅ3>
sudo cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
<์ž…๋ ฅ4>
sudo service ssh restart

์ž…๋ ฅ1/2 ๊ฒฐ๊ณผ๊ฐ’
์ž…๋ ฅ 3/4๊ฐ’