I. Use of CD-ROM files
1,rhel5 (x86_64) disc structure
Cluster//Cluster binary package
Clusterstorage//Cluster file system binary package
Binary package products for server//Core servers
VT//Virtualized binary package
Image //boot and Driver disk image
Isolinux //Image boot file
2. Mount the disc (insert the disc)
/dev/cdrom =/dev/hdc optical Drive device file
#umount/dev/cdrom unmount disc using
#mount/dev/cdrom/media/ mounted discs use
#ls/media/ to view the contents of a disc
Second, RPM package management
1,rpm Database files
/var/lib/rpm
2. Query the installed RPM package information
RPM-Q Package Name query Specifies whether the package is installed
RPM-QA Query system has installed all the packages
Rpm-qa | grep package name query What packages are currently installed on the system that are related to the package name
RPM-QI Package name Query the details of the installed package
RPM-QL Package name query where the installed packages are installed
RPM-QC Package name query software-generated configuration file
3, query a directory or the file is generated by which RPM package
The absolute path of the Rpm-qf file is queried by which package the file is generated
4, query the RPM installation files to be installed (the RPM package is first uploaded to/root/desktop)
RPM-QPI Full package name query for details about software not installed
RPM-QPL Full package name Query does not install the file path to install the software
5. Verify the Installed Packages
Rpm-v software name
-VF file path
-va Lists all files in the system that have been modified since the RPM installation
S: File Size
M: Permission or type
5:MD5 Checksum
D: Device number
L: Number of links
U: User
G: Group
T: Time
6, import the official public key
RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
7, install and upgrade rpm
Rpm-i Installation
- u upgrade
- F Upgrade (old version does not install new edition)
- v Show Detail information
- H to # Displays the installation progress
--force Mandatory Installation
8, uninstall
RPM-E Package Name
If uninstall appears specifies multiple packages
Can rpm-e--allmatches--nodeps package Name
9, dependency
Second, configure the Yum library and update operations
1,yum Overview
Software update mechanism based on RPM package to automatically resolve software dependencies
2,yum Warehouse Format
Local: file://
Network: ftp://or/HTTP
3,yum Warehouse configuration file
/etc/yum.repos.d/*.repo
4,yum Client Operations
Yum
List View package lists
Search to view package names or describe important keywords
Info View description information for the package, similar to Rpm-qi
Install the specified package, similar to Rpm-i
Update Upgrades the specified package, similar to Rpm-f
Remove Uninstalls the specified package, similar to RPM-E
Provides view file generated by that package, similar to RPM-QF
--nogpgcheck does not validate GPG signatures
5, clear local Yum cache (/var/cache/yum)
Yum Clean All
6, basic operation of software group
Yum
Grouplist Viewing a list of software groups
GroupInfo Viewing software group description information
Groupinstall Installing the specified software group
Groupupdate upgrading software groups
Groupremove Uninstalling software groups
I. Use of CD-ROM files
How to access the data inside the RHEL5.9 disc?
The first method:
1, first put rhel5.9iso, ensure the power OK
2, first Uninstall
[[email protected] ~]# ls-l/dev/cdrom//view/dev/cdrom connection path
[[email protected] ~]# umount/dev/cdrom//unmount disc
[[email protected] ~]# ls/media///view content in/media directory
3. Manual Mounting
[[email protected] ~]# mount/dev/cdrom/media///Attach/dev/cdrom to/media directory
4. Testing
[email protected] ~]# Mount | grep hdc//
[[email protected] ~]# ls/media///view content in/media directory
The second method:
1, first put rhel5.9iso, ensure the power OK
2. Enter the/MISC/CD directory
[[email protected] ~]# ls/misc///view content in/misc directory
[[email protected] ~]# cd/misc/cd///Switch to/MISC/CD path (trigger default mount)
Second, RPM package management
1, before the installation of the query
[[email protected] ~]# ls-ld/var/lib/rpm///view properties of/var/lib/rpm in long format (path of RPM library)
[[email protected] ~]# rpm-q bash//Check if bash is installed
[[email protected] ~]# RPM-QA//See the number of installed packages in all RPM libraries
[Email protected] ~]# Rpm-qa | Less//use less to view content in the RPM library
[Email protected] ~]# Rpm-qa | Wc-l//Statistics The number of rows in the RPM library
[[email protected] ~]# RPM-QA *ftp* //Find installed *ftp*-related installation packages in RPM library
[Email protected] ~]# Rpm-qa | grep ftp//Find installed *ftp*-related installation packages in the RPM library
[[email protected] ~]# rpm-q Firefox//view the installed Firefox information in the RPM library
2. Information query of installed software
[[email protected] ~]# Rpm-qi Firefox//View the details of the installed Firefox
[Email protected] ~]# RPM-QL Bash | More//view installed bash installation manifest in the more viewer
[[email protected] ~]# RPM-QC bash//View configuration information in the installed bash manifest
[[email protected] ~]# rpm-qf/etc/passwd//production see/ETC/PASSWD Related installation package
3, not install the Software information query
[[email protected] ~]# cd/media/server///If you can't go back and mount it
[[email protected] server]# ls *lynx*//Find a *lynx*-compliant installation package
[[email protected] server]# rpm-q Lynx//Check Lynx for installation
[[email protected] server]# Rpm-qi Lynx//View Lynx details (full installation package name)
[[email protected] server]# RPM-QPI Lynx//View details of the non-installed Lynx (full installation package name)
[[email protected] server]# rpm-qpi lynx-2.8.5-28.1.el5_2.1.x86_64.rpm //View details of the Lynx not installed
[[email protected] server]# RPM-QPL lynx-2.8.5-28.1.el5_2.1.x86_64.rpm //View Installation checklist for an installed Lynx
[[email protected] server]# rpm-qpc lynx-2.8.5-28.1.el5_2.1.x86_64.rpm //View the configuration file for the Lynx not installed
[[email protected] server]# RPM-QPD lynx-2.8.5-28.1.el5_2.1.x86_64.rpm //View documentation file for Lynx not installed
4. Installation and uninstallation of software
[[email protected] server]# ls *lynx* *iptraf*//List of installation packages that meet *lynx* *iptraf*
[[email protected] server]# rpm-q Iptraf Lynx//check if Iptraf and Lynx are installed
[Email protected] server]# RPM-IVH lynx-2.8.5-28.1.el5_2.1.x86_64.rpm iptraf-3.0.0-5.el5.x86_64.rpm // Installing the RPM installation package
[[email protected] server]# rpm-q Iptraf Lynx//check if Iptraf and Lynx are installed
[[email protected] server]# rpm-e Iptraf Lynx//uninstall Iptraf and Lynx
[[email protected] server]# rpm-q Iptraf Lynx//check if Iptraf and Lynx are installed
[[email protected] server]# which VI vim//Check the storage location of VI and VIM
[[email protected] server]# Rm/bin/vi/usr/bin/vim//delete/bin/vi/usr/bin/vim
[[email protected] server]# vim/etc/passwd//Open with VIM editor/etc/passwd
[[email protected] server]# vi/etc/passwd//Open/etc/passwd with VI Editor
[[email protected] server]# Rpm-qf/bin/vi/usr/bin/vim//view these two directories and which installation package about
[[email protected] server]# rpm-q vim-minimal vim-enhanced//Check if Vim-minima and vim-enhanced are installed
[[email protected] server]# ls *vim-minimal* *vim-enhanced*//check for *vim-minismal* and *vim-enhanced* installation packages
[Email protected] server]# RPM-IVH--force vim-enhanced-7.0.109-7.2.el5.x86_64.rpm vim-minimal-7.0.109-7.2.el5.x86_ 64.rpm
Install RPM installation Package (Force install/overwrite installation)
[[email protected] server]# vim/etc/passwd//Check to see if the Vim editor is available
5. Verification integrity of software
[[email protected] server]# rpm-v bash//Verify the integrity of the Bash installation package
[[email protected] server]# rpm-qf/etc/passwd//check/etc/passwd this directory and which installation package about
[[email protected] server]# rpm-v setup//Verify the integrity of Setup package
[[email protected] server]# rpm-vf/etc/passwd//Verify/ETC/PASSWD What this path has changed
[[email protected] server]# rpm-qf/etc/printcap//Check/etc/printcap this directory and which installation package about
[[email protected] server]# Rpm-va//Check the integrity of all installation packages
6, Import software official signature file
[[email protected] server]# rpm-q Lynx//Check if Lynx is installed
[[email protected] server]# rpm-e Lynx//Uninstall Lynx
[[email protected] server]# RPM-IVH lynx-2.8.5-28.1.el5_2.1.x86_64.rpm//install Lynx
[[email protected] server]# ls-l/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release //View the official signature file path
[[Email protected] server]# rpm--import/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release //Import official signature file
[[email protected] server]# rpm-e Lynx//Uninstall Lynx
[[email protected] server]# RPM-IVH lynx-2.8.5-28.1.el5_2.1.x86_64.rpm //install Lynx
7. Resolve Installation Software dependencies
[[email protected] server]# ls *bind-chroot*//View *bind-chroot* about the installation package
[[email protected] server]# rpm-q bind-chroot//See if Bind-chroot is installed
[[email protected] server]# RPM-IVH bind-chroot-9.3.6-20.p1.el5_8.5.x86_64.rpm//Installation Bind-chroot
error:failed dependencies:
[[email protected] server]# rpm-q bind//See if BIND is installed
[[email protected] server]# ls bind*//view installation package related to bind*
[[email protected] server]# RPM-IVH bind-9.3.6-20.p1.el5_8.5.x86_64.rpm//install bind
[[email protected] server]# RPM-IVH bind-chroot-9.3.6-20.p1.el5_8.5.x86_64.rpm //Installation Bind-chroot
[[email protected] server]# rpm-q bind bind-chroot//See if Bind and Bind-chroot are installed
bind-9.3.6-20.p1.el5_8.5
bind-chroot-9.3.6-20.p1.el5_8.5
Third, configure the Yum library and update
Build a local software repository
1, put RHEL5.9 ISO, ensure the Power OK (/MISC/CD)
Client Configuration
[[email protected] ~]# cd/etc/yum.repos.d///Switch to/ETC/YUM.REPOS.D directory
[[email protected] yum.repos.d]# ls//List Contents
Rhel-debuginfo.repo
[[email protected] yum.repos.d]# cp Rhel-debuginfo.repo Rh-server5.9.repo//copy yum template
[[email protected] yum.repos.d]# cat Rh-server5.9.repo //View the contents of the document
##########################################################
Correct configuration of document format
[Rh-server]
name=red Hat Enterprise Linux Server
Baseurl=file:///misc/cd/server
Enabled=1
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
###########################################################
Test:
[email protected] ~]# Yum Clean all
[Email protected] ~]# Rpm-qa |wc-l
[email protected] ~]# Yum List | Wc-l
Use of the Yum command
[[email protected] ~]# Yum list vsftpd//view VSFTPD Package list
[[email protected] ~]# Yum search vsftpd//view VSFTPD package name
[[email protected] ~]# Yum info firefox//view Firefox details
[[email protected] ~]# rpm-q httpd//See if HTTPD is installed
[[email protected] ~]# yum-y install httpd//Installation httpd
[[email protected] ~]# rpm-q httpd//See if HTTPD is installed
[[email protected] ~]# yum-y remove httpd//delete httpd
[email protected] ~]# Yum provides/etc/passwd //
Operation of the Yum package group
[Email protected] ~]# lang=en
[[email protected] ~]# Yum grouplist//view software group list
[[email protected] ~]# Yum groupinfo "Web Server"//view details of webserver software group
[[email protected] ~]# yum groupinstall "Web Server"//install webserver software group
[[email protected] ~]# yum groupremove "Web Server"//uninstall webserver software Group
[[email protected] ~]# yum-y groupinstall "GNOME Desktop Environment" "X Window System"//Install graphics environment
[email protected] ~]# Yum groupinstall "Development Libraries" "Development Tools"