반응형
개요
구성환경
CentOS 7.6
1. Yum Repository 목록
shell> yum repolist Loaded plugins: fastestmirror, langpacks Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast Loading mirror speeds from cached hostfile * base: data.aonenetworks.kr * epel: www.ftp.ne.jp * extras: data.aonenetworks.kr * updates: mirror.kakao.com repo id repo name status !base/7/x86_64 CentOS-7 - Base 10,097 !epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,501 !extras/7/x86_64 CentOS-7 - Extras 307 !okay/7/x86_64 Extra OKay Packages for Enterprise Linux - x86_64 7,474 !updates/7/x86_64 CentOS-7 - Updates 1,010 repolist: 32,389 shell> |
2. 패키지 정보
- 아래는 시스템에 설치된 패키지와 yum 저장소에서 사용가능한 패키지 정보를 출력
shell> yum info httpd Loaded plugins: fastestmirror, langpacks Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast Loading mirror speeds from cached hostfile * base: data.aonenetworks.kr * epel: www.ftp.ne.jp * extras: data.aonenetworks.kr * updates: mirror.kakao.com Installed Packages Name : httpd Arch : x86_64 Version : 2.4.6 Release : 88.el7.centos Size : 9.4 M Repo : installed Summary : Apache HTTP Server URL : http://httpd.apache.org/ License : ASL 2.0 Description : The Apache HTTP Server is a powerful, efficient, and extensible : web server. Available Packages Name : httpd Arch : x86_64 Version : 2.4.35 Release : 5.el7 Size : 1.4 M Repo : okay/7/x86_64 Summary : Apache HTTP Server URL : https://httpd.apache.org/ License : ASL 2.0 Description : The Apache HTTP Server is a powerful, efficient, and extensible : web server. shell> |
3. install 옵션
shell> yum install [package1, package2,....]
- 패키지 설치
4. update 옵션
shell> yum update [package]
- 패키지 이름을 지정하지 않을 경우 현재 시스템에 설치된 패키지 모두를 업데이트(의존성 패키지 포함)
5. upgrade 옵션
: update obsoletes옵션과 동일하지만 upgrade는 패키지가 업데이트 되면서 더이상 필요없는 패키지는 삭제
6. clean 옵션
shell> yum clean [ headers, packages, metadata, dbcache, plugins, expire-cache, rpmdb, all ]
- package, metadata 삭제
7. --downloadonly, --downloadir 옵션
- --downloadonly 옵션은 패키지를 설치하지 않고 다운로드만 진행
- --downloaddir : 패키지 다운로드 위치 지정
shell> yum install packageName -y --downloadonly --downloaddir=/downloadir/
shell> yum update packageName -y --downloadonly --downloaddir=/downloaddir/
8. remove 옵션
- 설치된 패키지 삭제
shell> yum remove nginx Loaded plugins: fastestmirror, langpacks Resolving Dependencies --> Running transaction check ---> Package nginx.x86_64 1:1.16.1-1.el7.ngx will be erased --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Removing: nginx x86_64 1:1.16.1-1.el7.ngx @nginx 2.7 M Transaction Summary ================================================================================ Remove 1 Package Installed size: 2.7 M Is this ok [y/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Erasing : 1:nginx-1.16.1-1.el7.ngx.x86_64 1/1 Verifying : 1:nginx-1.16.1-1.el7.ngx.x86_64 1/1 Removed: nginx.x86_64 1:1.16.1-1.el7.ngx Complete! shell> |
반응형
'운영체제 > Unix & Linux' 카테고리의 다른 글
[Yum] Yum Local Http Repos 구성 (0) | 2020.01.17 |
---|---|
[Yum] Yum 파일 구조 (0) | 2020.01.16 |
프로세스 모든 인자(argument) 표시 - solaris (0) | 2019.12.24 |
[Solaris] 802.1q Vlan Tagging 설정 (0) | 2019.12.11 |
[Linux] 802.1q VLAN Tagging 설정 (0) | 2019.12.10 |