Management of unit 15th packages
"Content of this section"
1. Install and remove software using RPM (see Linux System Management P374)
1) know the definition of RPM: RPM is the abbreviation for Red Hat package Manger.
2) understand the RPM file name divided into 5 parts, including:
The 1th part is name, which indicates the names of the RPM packages;
The 2nd part is version, which indicates the revision number of the RPM package;
The 3rd part is release, which indicates the number of releases (fixed number) of this RPM package;
Section 4 is architectures, which indicates which platforms this RPM package applies to;
The last part is RPM, which indicates the file extension of this RPM package.
3) Master the frequently used options in RPM software Installation and removal work:
A) –i: installation (install) software.
b) –U: Upgrade (Upgrade) old version of the software.
c) –e: Remove/Remove (Erase) software.
d) –v: Displays detailed processing information.
E) –h: Displays the installation progress. Uninstall is not available
2. View the information in the RPM package (see Linux System Management P379)
1) Master the commands commonly used to query the installed package information:
A) Rpm–qa: Displays all packages installed on the current operating system, where Q is the 1th letter of query, and a is the 1th letter of all.
Rpm–qa | grep DHCP
b) RPM–QF file name: Shows which package this file was installed in, and F is the 1th letter of file.
For example, the command that lists the package that installs the/bin/tar file is: Rpm–qf/bin/tar
c) RPM–QI Package name: Displays the information for this package, I is the 1th letter of the information (message).
For example: List the commands that tar-1.14-10.rhel4 the details of this package: Rpm–qi Tar-1.14-10.rhel4
d) RPM–QL Package name: Lists all the files contained in this package, where L is the 1th letter of the list.
For example: List the commands that tar-1.14-10.rhel4 all the files contained in this package: RPM–QL tar
P Packet
Attribute dependency issues for 3.RPM packages (see Linux System Management P388)
1) Understand the definition of the attribute dependency problem of RPM packages: the property dependency problem of the so-called RPM package, that is, the installation of this package depends on the installation of other packages.
4. After-school assignments (spents 40 minutes)
1) Mount the disc file to the/media directory
2) Enter the packages directory under the/media directory
3) View all RPM packages installed on the system
4) Check to see if the system is installing DHCP packages
5) Install the DHCP package
6) View information for DHCP packages
7) View all files included in the DHCP package
8) See which package generated the/bin/ls file
9) Uninstalling the DHCP package
Unit 16th Yum Management RPM Package
"Content of this section"
1.yum function: Yum is yellow dog Updater, modified abbreviation, the purpose is to solve the problem of RPM dependency, user-friendly software installation, upgrade and so on.
2. Mastering CD mount and mirroring Mount
A) CD-ROM mount
MOUNT/DEV/SR0 mount point
Or
Mount/dev/cdrom mount point
b) Mount the image file
Mount-o loop-t iso9660 image file mount point
Wherein,-O loop: Used to attach a file as a hard disk partition on the system
3. Mastering the configuration of Yum
Yum configuration generally has two ways, one is to configure the yum.conf file in the/etc directory directly, and the other is to add the. repo file under the/ETC/YUM.REPOS.D directory.
4. Mastering the local Yum configuration
[[email protected] ~]# mount/dev/cdrom/mnt #挂载光盘到/mnt Directory
[Email protected] ~]# cd/etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
Rhel-source.repo
[email protected] yum.repos.d]# CP Rhel-source.repo Rhel.repo #拷贝一份配置文件
[Email protected] yum.repos.d]# vi rhel.repo #编辑配置文件如下 [rhel-local] #模块名称, you must modify the same name as the other. Repo file name=red Hat Enterprise Linux 6 local repo #名称随便起baseurl =file:///mnt #指定rpm仓库的位置
Enabled=1 #1开启该配置, 0 to close
Gpgcheck=1 #1为校对软件
[email protected] ~]# Yum install vsftpd httpd #安装vsftpd及httpd服务
5. Mastering the remote Yum configuration method
6. Build the Yum source server with VSFTPD:
VSFTPD The default configuration file is to allow anonymous access, which can be started directly here:
[Email protected] ~]# Umount/dev/cdrom #卸载光盘
[Email protected] ~]# mount/dev/cdrom/var/ftp/pub/#挂载光盘到vsftpd的公众目录
[Email protected] ~]# service vsftpd Restart #重启vsftpd服务
Firewall and SELinux must be turned off
Service iptables Stop
Getenforce: View selinux status
Temporary shutdown: No restart: Setenforce 0
0 permissive allow 1 enforcing to execute
To configure the client:
[Email protected] ~]# cd/etc/yum.repos.d/
[email protected] yum.repos.d]# ls #rhel. Repo is generated according to the local Yum configuration
Rhel.repo Rhel-source.repo
[email protected] yum.repos.d]# cat Rhel.repo #修改为以下内容
[Rhel-ftp]
name=red Hat Enterprise Linux 6
Baseurl=ftp://192.168.8.42/pub #指定yum源地址
Enabled=1
Gpgcheck=1
Test:
[email protected] ~]# Yum install bind #安装DNS服务
7. Mastering the use of Yum installation software
Yum–y Install software name
8. Mastering the use of Yum to remove software
Yum–y Remove software Name
9. Mastering the use of Yum installation components
Yum–y Groupinstall Component Name
10. Mastering the use of Yum to remove components
Yum–y Groupremove Component Name
11. Master Purge Yum Cache
Yum Clean All
12. Find Packages using Yum
Yum Search
13. After-school assignments (spents 45 minutes)
1) To minimize the start of the Linux system
2) Configure local Yum
3) Install Vim
4) Clear Yum Cache
5) Install the component "KDE desktop"
Linux (6)