YUM 설치 및 사용법
페이지 정보
작성자 최고관리자 작성일 21-02-10 17:02 조회 7,452 댓글 0본문
yum은 CentOS(페도라, 레드햇 엔터프라이즈)의 원격 업데이트툴이다.
■ YUM 설치
[root@www ~]#rpm -Uvh yum-2.0.8-1.noarch.rpm
■ YUM 사용법
1. 업데이트할 목록을 보려면?
# yum list updates
2. 업데이트 목록을 다운로드하고, 업데이트를 설치하려면?
# yum update -y
3. 설치된 rpm 패키지 목록을 보려면?
# rpm -qa
# yum list installed
4. gcc 패키지가 설치되어 있는지 확인 하려면?
# rpm -qa | grep gcc
# yum list installed gcc
5. gcc 패키지를 설치하려면?
# yum install gcc gcc-c++
6. gcc 패키지를 업데이트 하려면?
# yum update gcc gcc-c++
7. 패키지 이름으로 검색하려면?
# yum list 패키지명
# yum list 정규식
# yum list gcc
# yum list gcc*
8. 여러개의 패키지를 설치하려면?
# yum install gcc gcc-c++
9. 패키지를 삭제하려면?
# yum remove gcc gcc-c++
10. 설치가 가능한 모든 패키지를 보려면?
# yum list all
11. 패키지 그룹을 보려면?
# yum grouplist
[root@localhost ~]# yum grouplist
Loading "fastestmirror" plugin
Setting up Group Process
Loading mirror speeds from cached hostfile
* rpmforge: fr2.rpmfind.net
* base: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
* addons: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
Installed Groups:
Office/Productivity
Editors
System Tools
Text-based Internet
GNOME Desktop Environment
Dialup Networking Support
FTP Server
Network Servers
Games and Entertainment
Java
X Window System
Graphics
Web Server
Printing Support
Mail Server
Server Configuration Tools
Sound and Video
Administration Tools
Yum Utilities
Graphical Internet
Available Groups:
Tomboy
Cluster Storage
Engineering and Scientific
MySQL Database
Development Libraries
Beagle
GNOME Software Development
X Software Development
Virtualization
Legacy Network Server
DNS Name Server
Authoring and Publishing
Base
Mono
XFCE-4.4
Legacy Software Development
Clustering
Java Development
OpenFabrics Enterprise Distribution
Emacs
Legacy Software Support
Ruby
Windows File Server
KDE Software Development
KDE (K Desktop Environment)
Horde
PostgreSQL Database
News Server
Development Tools
FreeNX and NX
Done
[root@localhost ~]#
12. 그룹 패키지를 모두 설치하려면?
# yum groupinstall "Development Tools"
13. 그룹 패키지를 업데이트 하려면?
# yum groupupdate "Development Tools"
14. 그룹 패키지를 삭제하려면?
# yum groupremove "Development Tools"
15. 아키텍처를 지정하여 설치하려면?
# yum install mysql.i386
16. 파일을 가지고 있는 패키지명을 알려면?
# rpm -qf /etc/passwd
# yum whatprovides /etc/passwd
17. 맨페이지를 보려면?
# man yum
18. yum fastestmirror 패키지를 설치하면 yum 미러 서버중 속도가 빠른 서버를 자동으로 찾아서 연결해 준다.
yum fastestmirror 패키지는 yum을 사용하여 아래와 같이 설치한다.
Cent OS 4.X
# yum install yum-plugin-fastestmirror -y
Cent OS 5.X
# yum install yum-fastestmirror -y
19. rpmforge 저장소 사용하기
기본제공 rpm이외의 추가적인 rpm 패키지를 사용하고자 한다면 rpmforge를 이용하라.
rpmforge 저장소를 사용하기 위한 rpm 설치
RHEL / CentOS
TIP For CentOS Yum users there is a very good document on how to enable RPMforge safely using the Yum priorities plugin
RHEL5 / CentOS-5
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
x86_64: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
RHEL4 / CentOS-4
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
x86_64: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm
RHEL3 / CentOS-3
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el3.rf.i386.rpm
x86_64: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el3.rf.x86_64.rpm
RHEL2.1 / CentOS-2
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el2.rf.i386.rpm
Red Hat Linux
Red Hat 9
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.rh9.rf.i386.rpm
Red Hat 7.3
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.rh7.rf.i386.rpm
위의 rpm 파일중 자신에게 맞는 배포판의 패키지를 다운로드 하고 설치한다.
** CentOS 5.x 버전이라면..(CentOS 5.0, 5.1, 5.2) **
# lftpget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
[root@localhost ~]# yum search lighttpd
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* rpmforge: mirror.cpsc.ucalgary.ca
* base: mirror.tini4u.net
* updates: mirror.tini4u.net
* addons: mirror.tini4u.net
* extras: mirror.tini4u.net
Excluding Packages in global exclude list
Finished
lighttpd-mod_mysql_vhost.i386 : Virtual host module for lighttpd that uses a MySQL database
lighttpd.i386 : Lightning fast webserver with light system requirements
lighttpd-fastcgi.i386 : FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd.i386 : Lightning fast webserver with light system requirements
lighttpd-fastcgi.i386 : FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd-mod_mysql_vhost.i386 : Virtual host module for lighttpd that uses a MySQL database
lighttpd.i386 : Lightning fast webserver with light system requirements
lighttpd-fastcgi.i386 : FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd-fastcgi.i386 : FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd.i386 : Lightning fast webserver with light system requirements
lighttpd-mod_mysql_vhost.i386 : Virtual host module for lighttpd that uses a MySQL database
[root@localhost ~]#
■ YUM 설치
[root@www ~]#rpm -Uvh yum-2.0.8-1.noarch.rpm
■ YUM 사용법
1. 업데이트할 목록을 보려면?
# yum list updates
2. 업데이트 목록을 다운로드하고, 업데이트를 설치하려면?
# yum update -y
3. 설치된 rpm 패키지 목록을 보려면?
# rpm -qa
# yum list installed
4. gcc 패키지가 설치되어 있는지 확인 하려면?
# rpm -qa | grep gcc
# yum list installed gcc
5. gcc 패키지를 설치하려면?
# yum install gcc gcc-c++
6. gcc 패키지를 업데이트 하려면?
# yum update gcc gcc-c++
7. 패키지 이름으로 검색하려면?
# yum list 패키지명
# yum list 정규식
# yum list gcc
# yum list gcc*
8. 여러개의 패키지를 설치하려면?
# yum install gcc gcc-c++
9. 패키지를 삭제하려면?
# yum remove gcc gcc-c++
10. 설치가 가능한 모든 패키지를 보려면?
# yum list all
11. 패키지 그룹을 보려면?
# yum grouplist
[root@localhost ~]# yum grouplist
Loading "fastestmirror" plugin
Setting up Group Process
Loading mirror speeds from cached hostfile
* rpmforge: fr2.rpmfind.net
* base: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
* addons: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
Installed Groups:
Office/Productivity
Editors
System Tools
Text-based Internet
GNOME Desktop Environment
Dialup Networking Support
FTP Server
Network Servers
Games and Entertainment
Java
X Window System
Graphics
Web Server
Printing Support
Mail Server
Server Configuration Tools
Sound and Video
Administration Tools
Yum Utilities
Graphical Internet
Available Groups:
Tomboy
Cluster Storage
Engineering and Scientific
MySQL Database
Development Libraries
Beagle
GNOME Software Development
X Software Development
Virtualization
Legacy Network Server
DNS Name Server
Authoring and Publishing
Base
Mono
XFCE-4.4
Legacy Software Development
Clustering
Java Development
OpenFabrics Enterprise Distribution
Emacs
Legacy Software Support
Ruby
Windows File Server
KDE Software Development
KDE (K Desktop Environment)
Horde
PostgreSQL Database
News Server
Development Tools
FreeNX and NX
Done
[root@localhost ~]#
12. 그룹 패키지를 모두 설치하려면?
# yum groupinstall "Development Tools"
13. 그룹 패키지를 업데이트 하려면?
# yum groupupdate "Development Tools"
14. 그룹 패키지를 삭제하려면?
# yum groupremove "Development Tools"
15. 아키텍처를 지정하여 설치하려면?
# yum install mysql.i386
16. 파일을 가지고 있는 패키지명을 알려면?
# rpm -qf /etc/passwd
# yum whatprovides /etc/passwd
17. 맨페이지를 보려면?
# man yum
18. yum fastestmirror 패키지를 설치하면 yum 미러 서버중 속도가 빠른 서버를 자동으로 찾아서 연결해 준다.
yum fastestmirror 패키지는 yum을 사용하여 아래와 같이 설치한다.
Cent OS 4.X
# yum install yum-plugin-fastestmirror -y
Cent OS 5.X
# yum install yum-fastestmirror -y
19. rpmforge 저장소 사용하기
기본제공 rpm이외의 추가적인 rpm 패키지를 사용하고자 한다면 rpmforge를 이용하라.
rpmforge 저장소를 사용하기 위한 rpm 설치
RHEL / CentOS
TIP For CentOS Yum users there is a very good document on how to enable RPMforge safely using the Yum priorities plugin
RHEL5 / CentOS-5
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
x86_64: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
RHEL4 / CentOS-4
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
x86_64: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm
RHEL3 / CentOS-3
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el3.rf.i386.rpm
x86_64: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el3.rf.x86_64.rpm
RHEL2.1 / CentOS-2
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el2.rf.i386.rpm
Red Hat Linux
Red Hat 9
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.rh9.rf.i386.rpm
Red Hat 7.3
i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.rh7.rf.i386.rpm
위의 rpm 파일중 자신에게 맞는 배포판의 패키지를 다운로드 하고 설치한다.
** CentOS 5.x 버전이라면..(CentOS 5.0, 5.1, 5.2) **
# lftpget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
[root@localhost ~]# yum search lighttpd
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* rpmforge: mirror.cpsc.ucalgary.ca
* base: mirror.tini4u.net
* updates: mirror.tini4u.net
* addons: mirror.tini4u.net
* extras: mirror.tini4u.net
Excluding Packages in global exclude list
Finished
lighttpd-mod_mysql_vhost.i386 : Virtual host module for lighttpd that uses a MySQL database
lighttpd.i386 : Lightning fast webserver with light system requirements
lighttpd-fastcgi.i386 : FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd.i386 : Lightning fast webserver with light system requirements
lighttpd-fastcgi.i386 : FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd-mod_mysql_vhost.i386 : Virtual host module for lighttpd that uses a MySQL database
lighttpd.i386 : Lightning fast webserver with light system requirements
lighttpd-fastcgi.i386 : FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd-fastcgi.i386 : FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd.i386 : Lightning fast webserver with light system requirements
lighttpd-mod_mysql_vhost.i386 : Virtual host module for lighttpd that uses a MySQL database
[root@localhost ~]#
댓글목록 0
등록된 댓글이 없습니다.