본문으로 바로가기

리눅스 프로그램 설치(Source, RPM, YUM)

category IT/Linux 2022. 11. 7. 19:03

1. Source 

소스 파일을 받아 직접 설치하는 방식으로 최신버전 설치, 환경 설정 변경등이 가능하나 매우매우매우 불편하다.

중간에 에러 발생하는 경우가 많으니 에러 메시지 확인 및 검색 필요

   

    사용 방법

    1. 환경설정 : 설치 위치나 연관된 package 또는 lib 지정

./configure --prefix=설치 경로 --with-패키지명=패키지 경로 
./configure --prefix=/web/apr-util --with-apr=/web/apr

   

    2. 컴파일 : 사람이 식별할 수 있는 프로그래밍 언어로 작성된 코드를 기계어로 번역

make
make clean 을 사용해 취소 가능

 

    3. 설치

make install
make uninstall 을 사용해 취소 가능

 

     삭제는 설치된 디렉토리를 지우면 된다

 

 

2. RPM(Redhat Package Manager) 

wget-1.14-18.el7_6.1.x86_64.rpm

    1.14 : 버전

    18 : 릴리즈 번호

    el7 : el(Enterprise Linux)7, CentOS 용

    x86_64 : 파일 설치 가능 CPU bit

 

자주 쓰는 옵션 목록

    -ivh : 패키지 설치
    -Uvh : 패키지 설치 및 upgrade
    -qa : 설치된 패키지 확인
    -qi : 패키지의 자세한 정보
    -ql : 패키지와 관련된 파일 및 디렉토리 정보
    -qf : 파일과 관련된 패키지명 출력

    -e : 패키지 삭제

ivh, Uvh
qa
qi
ql
qf
e

3. YUM (Yellowdog Update modifed) 

자주 쓰는 command 목록

 

list : 패키지 목록 확인 (all or 빈칸 입력 시 모든 패키지 목록 보여줌)

yum list
yum list installed

yum list installed

info : 패키지 정보 확인

yum info 패키지명

yum info

 

install : 설치

yum install 패키지명
yum localinstall rpm 파일명 : 로컬의 rpm 파일을 사용해 설치
y : 설치, d : 다운로드, N : 취소

yum install

 

grouplist : 패키지 그룹 확인

yum grouplist 

yum grouplist

groupinfo : 그룹 패키지의 정보 확인 (띄어쓰기 때문에 "" 필수)

yum groupinfo "그룹 이름"

yum groupinfo

 

groupinstall : 그룹 패키지 설치

yum groupinstall "그룹 이름"

yum groupinstall
yum groupinstall

provides : 명령어나 파일이 어느 패키지 안에 들어있는지 확인하는 명령어

yum provides 파일명 or 명령어

 

check-update : 시스템에 설치된 패키지 중에서 업데이트가 가능한 패키지 목록 출력

yum check-update 패키지명

yum check-update

 

update : 패키지 업데이트, 패키지명 명시 안할 시 모든 패키지 업데이트

upgrade : update와 유사하나 현재 사용 안하는 패키지 삭제됨

remove : 설치한 패키지 삭제

yum remove 패키지명

yum remove

 

history : yum 사용 내역 확인

yum history
yum history info
yum history undo ID

 

yum history

 

yum history info
yum history undo

 

yum --help

더보기

# yum --help


Loaded plugins: fastestmirror
Usage: yum [options] COMMAND

List of Commands:

check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade      downgrade a package
erase          Remove a package or packages from your system
fs             Acts on the filesystem data of the host, mainly for removing docs/lanuages for minimal hosts.
fssnapshot     Creates filesystem snapshots, or lists/deletes current snapshots.
groups         Display, or use, the groups information
help           Display a helpful usage message
history        Display, or use, the transaction history
info           Display details about a package or group of packages
install        Install a package or packages on your system
list           List a package or groups of packages
load-transaction load a saved transaction from filename
makecache      Generate the metadata cache
provides       Find what package provides the given value
reinstall      reinstall a package
repo-pkgs      Treat a repo. as a group of packages, so we can install/remove all of them
repolist       Display the configured software repositories
search         Search package details for the given string
shell          Run an interactive yum shell
swap           Simple way to swap packages, instead of using shell
update         Update a package or packages on your system
update-minimal Works like upgrade, but goes to the 'newest' package match which fixes a problem that affects your system
updateinfo     Acts on repository update information
upgrade        Update packages taking obsoletes into account
version        Display a version for the machine and/or available repos.


Options:
  -h, --help            show this help message and exit
  -t, --tolerant        be tolerant of errors
  -C, --cacheonly       run entirely from system cache, don't update cache
  -c [config file], --config=[config file]
                        config file location
  -R [minutes], --randomwait=[minutes]
                        maximum command wait time
  -d [debug level], --debuglevel=[debug level]
                        debugging output level
  --showduplicates      show duplicates, in repos, in list/search commands
  -e [error level], --errorlevel=[error level]
                        error output level
  --rpmverbosity=[debug level name]
                        debugging output level for rpm
  -q, --quiet           quiet operation
  -v, --verbose         verbose operation
  -y, --assumeyes       answer yes for all questions
  --assumeno            answer no for all questions
  --version             show Yum version and exit
  --installroot=[path]  set install root
  --enablerepo=[repo]   enable one or more repositories (wildcards allowed)
  --disablerepo=[repo]  disable one or more repositories (wildcards allowed)
  -x [package], --exclude=[package]
                        exclude package(s) by name or glob
  --disableexcludes=[repo]
                        disable exclude from main, for a repo or for
                        everything
  --disableincludes=[repo]
                        disable includepkgs for a repo or for everything
  --obsoletes           enable obsoletes processing during updates
  --noplugins           disable Yum plugins
  --nogpgcheck          disable gpg signature checking
  --disableplugin=[plugin]
                        disable plugins by name
  --enableplugin=[plugin]
                        enable plugins by name
  --skip-broken         skip packages with depsolving problems
  --color=COLOR         control whether color is used
  --releasever=RELEASEVER
                        set value of $releasever in yum config and repo files
  --downloadonly        don't update, just download
  --downloaddir=DLDIR   specifies an alternate directory to store packages
  --setopt=SETOPTS      set arbitrary config and repo options
  --bugfix              Include bugfix relevant packages, in updates
  --security            Include security relevant packages, in updates
  --advisory=ADVS, --advisories=ADVS
                        Include packages needed to fix the given advisory, in
                        updates
  --bzs=BZS             Include packages needed to fix the given BZ, in
                        updates
  --cves=CVES           Include packages needed to fix the given CVE, in
                        updates
  --sec-severity=SEVS, --secseverity=SEVS
                        Include security relevant packages matching the
                        severity, in updates

  Plugin Options:

 

yum history help

더보기

# yum history help


Loaded plugins: fastestmirror
Invalid history sub-command, use: list, info, summary, repeat, redo, undo, new, rollback, addon, addon-info, stats, statistics, sync, synchronizepkg, pkgs, pkg-list, pkgs-list, package, package-list, packages, packages-list, pkg-info, pkgs-info, package-info, packages-info.

'IT > Linux' 카테고리의 다른 글

DHCP 서버 설정 (Linux)  (0) 2022.11.15
Linux Process  (0) 2022.11.08
리눅스로 만능 PXE 서버 만들기 - 3  (0) 2017.08.29
리눅스로 만능 PXE 서버 만들기 - 2  (1) 2017.08.19
리눅스로 만능 PXE 서버 만들기 - 1  (3) 2017.08.13