Linux Network principle and foundation, yum management RPM package

Source: Internet
Author: User

One: ifconfig command

The function of the 1,ifconfig command: Displays the details of all the network cards that are being started or sets the IP address of the network card in the system.

2. Use the Ifup and Ifdown commands to start and stop the network card (see Linux System Management P424)
1) Master the function of ifup command: Start the network card specified on the system.
2) Master the function of the Ifdown command: Stop the network card specified on the system.
3) Master The example of using the IFUP command to enable the specified NIC:
Example: The command to start the eth0 Nic: Ifup eth0
4) Master The example of disabling the specified NIC using the Ifdown command:
Can only be used for configuration files
Example: Disable the eth0 NIC command: Ifdown eth0

3., network configuration file (see Linux System Management P425)
1) Understand the network card configuration file is stored in the/etc/sysconfig/network-scripts directory, and each network card corresponding profile file name to start with ifcfg-, such as eth0 the network configuration file corresponding to this NIC is Ifcfg-eth0.
Add: The virtual machine added network card does not have the configuration file to manually add the configuration or graphics add network card
Lambda master the definition of network configuration: the so-called network configuration (setting) is to modify the network configuration file card corresponding, you can use the text editor (vi) directly edit the network configuration file to reconfigure the network.

4, modify IP

II: Package Management

1, understand the rpm file name is 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.

2. 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

3, 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
Three: Yum manages RPM packages

1, master install software using Yum
Yum–y Install software name
2, master using Yum to remove software
Yum–y Remove software Name
3, mastering the use of Yum installation components
Yum–y Groupinstall Component Name
4, mastering the use of Yum to remove components
Yum–y Groupremove Component Name
5, Master clear Yum Cache
Yum Clean All
6, use Yum to find packages
Yum Search

7, 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.
8, master 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为校对软件

Linux Network principle and foundation, yum management RPM package

Related Article

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.