Software Management of Linux

Source: Internet
Author: User
Tags gpg mysql view yum repolist

When it comes to software management everyone is not unfamiliar, most of Windows directly download. exe files directly installed, download from the Control Panel uninstall, then we discuss how to install and uninstall common software under the Linux system.


Package Management Overview

Mount-o loop/share/rhel-server-6.4-x86_64-dvd.iso/mnt/

-O followed by the property loop property only the secondary attribute is used by the image file

Df-h


RPM Package management methods and the advantages of compiling and installing:
1. Easy to update installed packages;
2. Easy to protect configuration files; (not covered)
3. Easy to track installed files

RHEL6 Package Management method?
Rpm
Yum can resolve dependencies

If a, b two packets are found to be mutually dependent can be installed together (RPM-IVH a B)

-------------------------RPM Management-----------------------------------
Name httpd-2.2.15-26.el6.x86_64.rpm

Software Name: httpd
Package Name: httpd-2.2.15-26.el6.x86_64.rpm
2.2.15-26: Major version, minor version number, revision number-release number. Support system version. 64bit. Suffix name

See which packages the system has installed
Rpm-qa
Q Query
A All

To see if the specified package is installed
Rpm-qa | grep httpd

Installation
RPM-IVH httpd-2.2.15-26.el6.x86_64.rpm

-I--install installation
-V--verbose Display the installation process
-H--hash has a progress bar

Unloading:
RPM-E--erase Software Name

See where the software is installed
RPM-QL vsftpd

View the software configuration file
RPM-QC vsftpd

Find out who the software is with the configuration file
Rpm-qf/etc/vsftpd/vsftpd.conf

View detailed information about installed software
Rpm-qi vsftpd

View details of the software that is not installed
Rpm-qi vsftpd-2.2.2-11.el6.x86_64.rpm

See what files can be extracted from the software that is not installed
RPM-QLP vsftpd-2.2.2-11.el6.x86_64.rpm

If the configuration file is corrupted
1. See which software is installed---The package name of this file
2. Delete this profile after backup
3. Reinstall--force (mandatory installation)

Help document for querying software
RPM-QD vsftpd

Check signature
Rpm-k,--checksig package name

Rpm-k vsftpd-2.2.2-11.el6.x86_64.rpm

Import Signature
RPM--import Import Key

RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release

Software package Experience (S M U T ... ) Modify the configuration file and view
Rpm-v vsftpd

Upgrade software
-U,--upgrade=<packagefile>+

RPM-UVH vsftpdxxx.rpm


--force If the package is already installed and you want to reinstall it (recommended only for installation)
RPM-IVH vsftpd-2.2.2-11.el6.x86_64.rpm--force

--nodeps does not check package dependencies (only used when uninstalling)
RPM-E httpd--nodeps

---------------------------------Binary Package------------------------
. bin. Sh. Bundle---> into its directory./xxx.sh


---------------------------Source Code-----------------------------------
1.tar XVFJ httpd-2.2.25.tar.bz2
2.CD httpd-2.2.25
3./configure--prefix=/usr/local/apache Specify installation path Check installation environment
4.make Generate Makefile file for compilation
5.make Install compilation Installation
6./usr/local/apache/bin/apachectl Start Open Service
7.cd/usr/local/apache/bin
8.CP apachectl/bin/guaranteed to open the program directly in any directory

Make clean clears the files that have been compiled

Yum Install *gcc*
------------
Yum Management

Can resolve dependencies

Configure Yum

Yum configuration file
Vim/etc/yum.repos.d/rhel-source.repo

Create a yum configuration file yourself, requiring this profile suffix to be repo

Yum Categories
1. Local Yum (file)
2. Remote Yum (FTP http)


/etc/yum.repos.d/rhel-source.repo

[RHEL6] Label
Description of name=red Hat Enterprise Linux multi-Yum warehouse function
Baseurl=file:///mnt/server specifying the location of the Yum Warehouse
enabled=1 enabling local Yum 0 means that local yum is not enabled
Gpgcheck=1 enabling RPM signature 0 does not enable RPM signing
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-beta,file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release Location of key


Yum Clean all check syntax cleanup cache

Yum repolist check syntax and see how many packages are available

Installation
Yum Install Vsftpd-y

Yum Clean all cache if the Yum configuration file has changed, you need to execute this command
Repolist See if Yum is in effect
Erase/remove vstpd Uninstall
info | grep httpd View information about the software
Install httpd Software Installation
List all lists all current packages @ means already installed
GroupInfo "Virtualization" view the members of a software group's information group
Groupinstall "Virtualization" Group installation
Grouplist list all software groups that have been or have not been installed
Groupremove Removing a group from virtualization
Provides/etc/export
Reinstall httpd Reinstall
Search MySQL View information for related packages that contain keywords
Update httpd-3.3.15-26.el6.x86_64.rpm Upgrade
Localinstall httpd-2.2.15-26.el6.x86_64.rpm Local Installation
Deplist vsftpd viewing software dependencies

Create a yum warehouse manually
1.yum Install Createrepo

2.mkdir/yumtest/Creating a Warehouse

3.CP httpd* vsftpd*/yumtest/

4.createrepo/yumtest/

5.touch/etc/yum.repos.d/test.repo
[Yumtest]
Name=my Home
baseurl=file:///yumtest/
Enabled=1
Gpgcheck=0

This article is from the Cloud computing blog, so be sure to keep this source http://huanghaisky.blog.51cto.com/3064496/1918942

Software Management of Linux

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.