8, Linux Foundation (iv)

Source: Internet
Author: User

management of a package

1. Installing and removing software using RPM
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
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.

Two Yum management rpm packages

1. Yum function : Yum is the abbreviation of Yellow Dog Updater, modified, 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

8, Linux Foundation (iv)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.