RPM Options for RedHat Fedora Centos Installs

RPM์— ๋Œ€ํ•ด ์•Œ์•„๋ณด์•„์š”

RPM (RedHat Package Manager)

  • RedHat ๊ณ„์—ด์˜ linux distro์—์„œ ์‚ฌ์šฉํ•˜๋Š” package management system

  • FOSS (Free and open-source software)

  • windows์˜ setup.exe ์™€ ์œ ์‚ฌํ•œ ์„ค์น˜ ํŒŒ์ผ

  • ํ™•์žฅ์ž๋ช…์€ *.rpm ์ด๋ฉฐ, ์ด๋ฅผ package๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค

RPM ํŒŒ์ผ ํ˜•์‹

name-version-release.os.architecture.rpm
  • where:

    • name

      • pacakage name

    • version

      • packaged software์˜ version

    • release

      • ํ•ด๋‹น RPM package์˜ release ๋ฒˆํ˜ธ

        • ์ˆ˜์ •๋˜์–ด ๋ฐฐํฌ๋œ ํšŸ์ˆ˜

    • os

      • ๋ฐฐํฌํŒ(OS) version

        • CentOS๋ฅผ ํฌํ•จํ•œ RHEL(RedHat EnterPrise Linux)์˜ ๊ฒฝ์šฐ, OS version์„ rpm package file ์ด๋ฆ„์— ์‚ฌ์šฉํ•œ๋‹ค

    • architecture

      • RMP package์˜ architecture (CPU)

        • package๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋Š” CPU๋ฅผ ์˜๋ฏธํ•œ๋‹ค

  • ex)

    • gedit-2.6.1-1.fc11.i586.rpm

    • mysql-connector-java-5.1.25-3.el7.noarch.rpm

RPM Commands

rpm [option] [rpm package file or rpm package ์ด๋ฆ„]

์กฐํšŒ

rpm -qa
rpm -qa [package ์ด๋ฆ„]
rpm -qa | grep [package ์ด๋ฆ„]

์„ค์น˜

rpm -Uvh [package file]
  • U option

    • package๋ฅผ ์„ค์น˜ํ•˜๋˜, ๋งŒ์•ฝ ์ด๋ฏธ ์„ค์น˜๋˜์–ด ์žˆ๋‹ค๋ฉด upgrade ํ•˜๋ผ

  • v option

    • pcakge ์„ค์น˜ ์‹œ ์„ค์น˜ ๊ณผ์ •์„ ์ถœ๋ ฅํ•˜๋ผ

  • h option

    • ์„ค์น˜ ์ง„ํ–‰๋ฅ ์„ # ๋กœ ์ฑ„์›Œ์„œ ํ™”๋ฉด์— ์ถœ๋ ฅํ•˜๋ผ

์‚ญ์ œ

rpm -e [package name]
  • erase option์„ ์‚ฌ์šฉํ•˜์—ฌ ์‚ญ์ œํ•œ๋‹ค

์„ค์น˜๋œ package๋“ค์˜ consistency ํ™•์ธ

rpm -aV --nofiles --nodigest

"broken" package ์‚ญ์ œ

rpm -e -vv --allmatches --nodeps --noscripts --notriggers package_name

Last updated