ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

๋ฐ˜์‘ํ˜•

โœ… [Ubuntu] ์šฐ๋ถ„ํˆฌ 22.04 ์„œ๋ฒ„ ์ดˆ๊ธฐ์„ค์ •

# ์—…๋ฐ์ดํŠธ ๊ฐ€๋Šฅํ•œ ํŒจํ‚ค์ง€ ํ™•์ธ
sudo apt-get update

# ์—…๊ทธ๋ ˆ์ด๋“œ
sudo apt-get upgrade

# ์˜์กด์„ฑ ๊ฒ€์‚ฌํ•ด์„œ ํ•„์š”ํ•œ ํŒจํ‚ค์ง€๋„ ๊ฐ™์ด ์—…๊ทธ๋ ˆ์ด๋“œ
sudo apt-get dist-upgrade

# ์ถ”๊ฐ€ ํŒจํ‚ค์ง€
sudo apt-get install vim less iputils-ping cron rsyslog git unzip tree net-tools multitail grc fail2ban

# vi์…‹ํŒ…
vi ~/.vimrc

" Syntax Highlighting
if has("syntax")
        syntax on
endif

set hlsearch
set autoindent
set cindent
"set nu
set smartindent
set tabstop=4
set expandtab
set shiftwidth=4
set showmatch
set backspace=indent,eol,start
" set ignorecase
" set smartcase
set ignorecase


" ๋งˆ์ง€๋ง‰์œผ๋กœ ์ˆ˜์ •๋œ ๊ณณ์— ์ปค์„œ๋ฅผ ์œ„์น˜ํ•จ
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "norm g`\"" |
\ endif

set laststatus=2
set statusline=\ %<%l:%v\ [%P]%=%a\ %h%m%r\ %F\

โœ… ์‹œ์Šคํ…œ์–ธ์–ด ์„ค์ •

# vi ํŽธ์ง‘
sudo vi /etc/default/locale

# ์ˆ˜์ •
LANG="ko_KR.UTF-8"
LANGUAGE="ko_KR:ko:en_US:en"

source /etc/default/locale

โœ… ์‹œ์Šคํ…œ ์‹œ๊ฐ„ ์„ค์ •

timedatectl set-timezone Asia/Seoul

โœ… ์„œ๋ฒ„ ์‹œ๊ฐ„ ๋™๊ธฐํ™”

# rdate ์„ค์น˜
sudo apt-get install rdate

# ์‹œ๊ฐ„๋™๊ธฐํ™” ์„œ๋ฒ„(NTP) ์‹œ๊ฐ„ ํ™•์ธ
rdate -p time.bora.net

# ์‹œ๊ฐ„ ๋™๊ธฐํ™”(NTP) ์„œ๋ฒ„ ๋ฆฌ์ŠคํŠธ
time.bora.net (LGU+)
time.nist.gov (NIST)

# ์‹œ๊ฐ„ ๋™๊ธฐํ™”(NTP์„œ๋ฒ„ -> ์šด์˜์ฒด์ œ(Linux))
rdate -s time.bora.net

# ํ˜„์žฌ ์šด์˜์ฒด์ œ(Linux)์‹œ๊ฐ„ ํ™•์ธ
date

# ํ•˜๋“œ์›จ์–ด(Server) ์‹œ๊ฐ„ ์กฐํšŒ
hwclock

# ์šด์˜์ฒด์ œ(Linux) -> ํ•˜๋“œ์›จ์–ด(Server) ์‹œ๊ฐ„ ๋™๊ธฐํ™”
hwclock -w

# ํ•˜๋“œ์›จ์–ด(Server) -> ์šด์˜์ฒด์ œ(Linux) ์‹œ๊ฐ„ ๋™๊ธฐํ™”
hwclock -s

# crontab์„ ์ด์šฉํ•œ ๋™๊ธฐํ™” ์ž‘์—…, ์šด์˜์ฒด์ œ(Linux)&ํ•˜๋“œ์›จ์–ด(Server) ๋™์‹œ์— ์‹œ๊ฐ„ ๋™๊ธฐํ™”
crontab -e
# ๋งค 5์‹œ๊ฐ„๋งˆ๋‹ค ํ•œ๋ฒˆ ์‹คํ–‰
0 */5 * * * rdate -s time.bora.net && hwclock -w &> /dev/null

# ๋งค์ผ 3์‹œ10๋ถ„๋งˆ๋‹ค ํ•œ๋ฒˆ ์‹คํ–‰
10 3 * * * rdate -s time.bora.net && hwclock -w &> /dev/null

 

#์ฐธ๊ณ 

https://zosystem.tistory.com/323

๊ณต์ง€์‚ฌํ•ญ
์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
์ตœ๊ทผ์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€
Total
Today
Yesterday
๋งํฌ
ยซ   2024/12   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
๊ธ€ ๋ณด๊ด€ํ•จ
๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (80)
๐Ÿ“บ Develop (0)
๐ŸŒ‹ Error Fixed (5)
๐Ÿ— Tool (5)
๐Ÿ’ป MacBook M1 (15)
๐Ÿ“ฆ ETC (1)

์ด ํฌ์ŠคํŒ…์€ ์ฟ ํŒก ํŒŒํŠธ๋„ˆ์Šค ํ™œ๋™์˜ ์ผํ™˜์œผ๋กœ, ์ด์— ๋”ฐ๋ฅธ ์ผ์ •์•ก์˜ ์ˆ˜์ˆ˜๋ฃŒ๋ฅผ ์ œ๊ณต๋ฐ›์Šต๋‹ˆ๋‹ค.