Skip to content

Latest commit

ย 

History

History
51 lines (40 loc) ยท 2.62 KB

Check_server_setting.md

File metadata and controls

51 lines (40 loc) ยท 2.62 KB

์„œ๋ฒ„ ํ™˜๊ฒฝ ์ฒดํฌ

์„ธํŒ…์„ ํ™•์ธํ•  ์ผ์ด ์žˆ์–ด์„œ ์ฐพ์•„๋ณด์•˜๊ณ , ์ด์ „์— ์•Œ๊ณ  ์žˆ๋˜ ๋‚ด์šฉ๊ณผ ์•Œ๊ฒŒ ๋œ ๋‚ด์šฉ์„ ๊ฐ„๋‹จํ•˜๊ฒŒ ์ •๋ฆฌํ•˜์˜€์Œ ๐Ÿ› 

๋ฉ”๋ชจ๋ฆฌ ํ™•์ธ

  • ํ„ฐ๋ฏธ๋„์— cat/proc/meminfo๋ฅผ ์ž…๋ ฅํ•˜๋ฉด, ๋ฉ”๋ชจ๋ฆฌ์— ๋Œ€ํ•œ ์ƒ์„ธ ์ŠคํŽ™์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Œ

  • ์ „์ฒด ๋ฉ”๋ชจ๋ฆฌ/ ์‚ฌ์šฉ์ค‘์ธ ๋ฉ”๋ชจ๋ฆฌ/ ๊ทธ ์™ธ ๊ณต์œ ๋ฉ”๋ชจ๋ฆฌ, ๋ฒ„ํผ, ์บ์‹œ๋ฉ”๋ชจ๋ฆฌ/ swap ์šฉ๋Ÿ‰์„ ํ™•์ธํ•˜๋ ค๋ฉด, free๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ๋จ

    • free ๋’ค์˜ ์˜ต์…˜๋“ค
      • free -h : (human-readable) ์‚ฌ๋žŒ์ด ์ฝ๊ธฐ ์‰ฌ์šด ๋‹จ์œ„๋กœ ์ถœ๋ ฅํ•ด์คŒ
      • free -b/-k/-m/-g : ์›ํ•˜๋Š” ๋‹จ์œ„(bytes/KB/MB/GB)๋กœ ์ถœ๋ ฅํ•ด์คŒ
      • free -t : ram ๋ฉ”๋ชจ๋ฆฌ ์ด ์šฉ๋Ÿ‰๊ณผ swap ๋ฉ”๋ชจ๋ฆฌ์˜ ํ•ฉ(total)์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Œ
  • ๋ฉ”๋ชจ๋ฆฌ ์ ์œ ์œจ ํ™•์ธ์€ top์ž…๋ ฅ ์‹œ ํ™•์ธ ๊ฐ€๋Šฅํ•จ

HDD ์šฉ๋Ÿ‰ ํ™•์ธ

  • df -h : HDD ์šฉ๋Ÿ‰ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด

CPU ์ƒ์„ธ ํ™•์ธ

  • ํ„ฐ๋ฏธ๋„์— cat/proc/cpuinfo๋ฅผ ์ž…๋ ฅํ•˜๋ฉด, CPU์— ๋Œ€ํ•œ ์ƒ์„ธํ•œ ์ •๋ณด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Œ
  • ์ฝ”์–ด ์ˆ˜๋Š” nproc์„ ์ž…๋ ฅํ•˜๋ฉด ํ™•์ธํ•  ์ˆ˜ ์žˆ์Œ

OS ํ™•์ธ

  • ํ„ฐ๋ฏธ๋„์— cat /etc/redhat-release๋ฅผ ์ž…๋ ฅํ•˜๋ฉด,OS ์ •๋ณด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Œ
  • ๋˜๋‹ค๋ฅธ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด OS ์ •๋ณด ํ™•์ธ ๊ฐ€๋Šฅํ•จ
    • cat /etc/*release*
    • cat /etc/issue
    • OS bit ํ™•์ธ = getconf LONG_BIT

port ์ฒดํฌ

  • netstat -nap : ์—ด๋ ค์žˆ๋Š” ๋ชจ๋“  ํฌํŠธ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด
  • netstat -nap | grep LISTEN : Listen ์ค‘์ธ ํฌํŠธ๋งŒ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด
  • netstat -nap | grep <port_num> : <port_num>์— ํ•ด๋‹นํ•˜๋Š” ํŠน์ • ํฌํŠธ์˜ ์ƒํƒœ๋งŒ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด

port ์—ด๊ธฐ

  • sudo iptables -I INPUT 1 -p tcp --dport <port_num> -j ACCEPT : <port_num>์— ํ•ด๋‹นํ•˜๋Š” ํฌํŠธ๋ฅผ openํ•˜๋Š” ๋ช…๋ น์–ด

๋„คํŠธ์›Œํฌ ์†๋„ ํ™•์ธ

  • yum install ethtool net-tools : centos์˜ ๊ฒฝ์šฐ, ethtool ํŒจํ‚ค์ง€ ์„ค์น˜ํ•˜๋Š” ๋ช…๋ น์–ด
  • ifconfig : ๋„คํŠธ์›Œํฌ ์ธํ„ฐํŽ˜์ด์Šค ํ™•์ธ
  • ethtool <net_interface_name> : ethtool์„ ํ†ตํ•ด ์›ํ•˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค ์ •๋ณด ์กฐํšŒ

๋‚ ์งœ/์‹œ๊ฐ„ ํ™•์ธ

  • date : ์„œ๋ฒ„์˜ ์‹œ๊ฐ„ ์ถœ๋ ฅ
  • timedatectl : ์ •๋ณดํ™•์ธ(local time, universal time, Timezone ...etc)
  • ์„œ๋ฒ„ ์‹œ๊ฐ„ ๋ณ€๊ฒฝ
    • ls /usr/share/zoneinfo/Asia : Seoul์˜ timezone ์ •๋ณด์— ํ•ด๋‹นํ•˜๋Š” ํŒŒ์ผ ์ฐพ๊ธฐ
    • mv /etc/localtime /etc/localtime_org : ๊ธฐ์กด ํŒŒ์ผ๋ฐฑ์—…ํ•œ ๋‹ค์Œ, ํ•ด๋‹นํ•˜๋Š” ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ๋งŒ๋“ค๊ธฐ
    • ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime

์ฐธ๊ณ