Linux Basic Five

Source: Internet
Author: User

Yum Package Management

Yum: Software update mechanism based on RPM package construction

Automatically resolve package dependencies

All packages are provided by a centralized Yum software repository.

[[email protected] desktop] #ls/misc/cd/repodata/

(Repodata: Warehouse manifest file)

——————————————————————————————————

Prepare the local Yum repository:

How the software warehouse is delivered

Local directory: file:///...

FTP or HTTP service: ftp://..,http://...

Source of RPM Packages

A collection of RPM packages released by Red Hat

Third-party, user-defined RPM package collection

——————————————————————————————————————

Prepare the local Yum repository

Use the Rhel6iso mirrored RPM package as the Yum repository

Trigger mount point [[email protected] Desktop]CD/MISC/CD

Yum Configuration parsing

Major files that affect Yum usage

Basic settings:/etc/yum.conf

Warehouse Configuration:/etc/yum.repos.d/xx.repo

Log file:/var/log/yum.log

Yum Cache Directory

Store data such as download packages, warehouse records, etc.

/var/cache/yum/$basearch/$releasever

——————————————————————————————————————————————————

Yum Configuration parsing:

. Repo

[Original name]: custom Name

-name: The description string of the software source

-baseurl: Specify the URL address of the Yum server

-enabled: Whether to enable this channel (enable 1/Do not enable 0)

-gpgcheck: Whether to verify the RPM package to be installed

-gpgkey: Key file for RPM package verification

[[email protected] desktop] #cd/etc/yum.repos.d/

[Email protected] yum.repos.d]# vim Hydra.repo

——————————————————————————————————————————————————

View software Information

View Software list

Format: Yum search [software name] (search included)

Format: Yum list [software name] (list strict match)

[[email protected] Desktop] #yum list//List of packages

......

Installde Packages//Installed Packages

......

Available Packages//Available packages

.......

——————————————————————————————————————————————————

Query software and related information

Format: Yum search keywords

Yum info [software name]

Yum provides document path

[[Email protected] Desktop]# Yum search http (find keywords httpd)

[Email protected] Desktop]# Yum info httpd (see description of software httpd)

[[Email protected] Desktop]# yum provides/etc/passwd (see which software can provide/ETC/PASSDE files)

————————————————————————————————————————————

Emptying the local Yum cache

Applies to Yum cache if there is an error

The cache is automatically rebuilt when queried or updated again

[[email protected] desktop] #yum repolist (query cache)

[[email protected] desktop] #yum clean all (empty all caches)

[[email protected] desktop] #yum repolist (updated when querying again)

————————————————————————————————————————————

Manually Mount Yum

[[Email protected]~]mount/dev/cdrom/mnt/(Mount)

[[Email protected]~]rm-rf/etc/yum.repos.d/* (before deleting the Yum configuration)

[[Email Protected]~]vim/etc/yum.repos.d/xx.repo

[XX]

Name=hydra

Baseurl=:///mnt

Enabled=1

Gpgheck=0

[[Email Protected]~]yum Clean all]

[[Email Protected]~]yum repolist (re-find Yum source)

————————————————————————————————————————————

Basic Package operation

Format: Yum [-y] directive [software name]

Common directives

Install: Installs the specified package. Similar to Rpm-i

Update: Upgrade the specified package

Remove: Uninstalls the specified package, similar to RPM-E

————————————————————————————————————————————

Query/install/uninstall software Group

Basic operations for Software groups

Format: Yum [-y] directive [package group name]

Common directives

Grouplist: View a list of software groups

GroupInfo: Viewing description information for a software group

Groupinstall: Installing the specified software group

Groupupdate: Upgrading software Groups

Groupremove: Uninstalling software groups

——————————————————————————————————————————

Installing the RHEL6 Graphics environment

[[email protected] desktop] #LANG =en

[Email protected] #yum-y groupinstall "desktop" "Fonts" "X Windows System"

Installing the RHEL6 development environment

[[email protected] desktop] #LANG =en

[[email protected] desktop] #yum-y groupstall "Development Tools"

————————————————————————————————————————————

KVM Config same network segment transfer file

[[email protected] desktop] #cat/etc/sysconfig/network-scripts/ifcfg-eth0

[[email protected] desktop] #vim/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0

Hwaddr=00:0c:29:56:de:13

Type=ethernet

Onboot=yes

Nm_controlled=yes

Bootproto=static

ipaddr=192.168.4.10

netmask=255.255.255.0

[[email protected] desktop] #service network Restart (restart Web service to take effect)

[[Email protected] Desktop]# scp/root/desktop/linuxqq-v1.0.2-beta1.i386.rpm 192.168.4.10:/root/

(Transfer this machine's files to 192.168.4.10 's/root/)

————————————————————————————————————————————

Source Code Compilation Installation

Advantages of using source code to install software

Get the latest version of the software, fix bugs in time, select/Customize the software features on demand

With more software to choose from, the source package is available for a variety of platforms

————————————————————————————————————————————————

Preparing the Environment for compilation

Open source software is developed using C + + language

Need to compile tools like GCC make

Install the development Tools software group with Yum to resolve

[[email protected] desktop] #gcc--version

..........

[[email protected] Desktop] #g + +-version

..........

[[email protected] desktop] #make--version

..........

——————————————————————————————————————————————

Basic procedures for compiling and installing:

Download the source code package, Tar unpack, release the sources to the specified directory

./configure configuration, specifying options such as installation directory/function module

Make compile, generate executable binary program Files

Make install to copy the compiled files to the installation directory

[[email protected] desktop] #tar-xf/root/httpd-2.2.25.tar.gz-c/data/

[[email protected] desktop] #cd/data/httpd-httpd-2.2.25/

[[email protected] httpd-2.2.25]#./configure--prefix=/opt/http (./configure configuration, specify installation directory under Opt/http)

[[email protected] httpd-2.2.25] #make (Compile)

[[email protected] httpd-2.2.25] #make install (compile and install)

[[email protected] httpd-2.2.25] #cd/opt/myhppd/(to directory)

————————————————————————————————————————————

Linux Basic Five

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.