Installation and use of Linux programs

Source: Internet
Author: User
Tags log log

As a Linux ops, in a lot of times we are in a Linux application that requires us to install,

One is the installation of the source package, he needs us to manually compile it, using our compression tool, compression using

There is also a software that has been completed. This is an executable program that is the suffix of the rpm package (. rpm)

Frequently used directories for software

(/etc//var/log log file

/usr/share/doc Description Document

/usr/bin to store a running command)

Software Installation Tools

RPM is Redhat introduced the package management mechanism, the role is to use data recording software additions and deletions and other information to facilitate maintenance, can automatically analyze the dependencies between software, easy to install software

Format of RPM Software:

Name of the software-version-number of releases-os platform-hardware platform (32, +). rpm

I386/i586/i686=32 bit

X86_64=64 bit



Use of RPM-(syntax: rpm-q[sub-option] [package])

Inquire

Rpm-qa |grep Man # #查看man软件是否安装,-a lists all installed software

Rpm-qi Tar # #查看软件信息

RPM-QL Tar # #列出tar软件安装的所有的文件及目录-L lists the file directories of the software

RPM-QC VSFTPD # #只列出vsftpd软件的配置文件

RPM-QD VSFTPD # #只列出vsftpd软件的document (document)

Which Useradd # #查找命令的位置

RPM-QF $ (which useradd) # #查看命令由那个软件包安装, commands can be replaced with arbitrary external commands, but with RPM-QL, and man extended learning


Install upgrade Uninstall

RPM-IVH Package # #安装

RPM-E Package # #卸载

Rpm-f Package # #更新

Rpm-u Package # #升级


Special use

--force: Forced installation, when the software is installed but the file is missing reload, the old overwrite the new version is used.

--nodeps: Ignore dependencies, use when uninstalling.

--import: Import the system ISO public key.

--INITDB/--REBUILDDB: Rebuilds the RPM database when the virus destroys RPM data in the system



There is also a Yum installation we use most often, which requires us to prepare our Yum source in advance.


Configuration of the Yum source

In general, we can download our Yum source directly from the Web, using more commonly used yum sources

(Zhong Ke

wget Http://mirrors.ustc.edu.cn/centos/CentOS-Base.5.mirrors.repo

Sohu

wget Http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

And Ali's, etc.)

And there's our own Yum source within our company. This is where we load our resources into our local repositories.

Configuration format for Yum sources

Yum Run test (yum update)

Clean operation (Yum clean all)

Files commonly used by Yum

/etc/yum.repos.d/source. Repo (yum source storage location and storage format)

Vi/etc/yum.repos.d/yuan.repo

[Local]

Name=local

baseurl=ftp/www/ file://file location/

Enable=1

Gpgcheck=0 (internal configuration format)

Use of Yum

Yum-y install software name # #安装软件

yum-y Remove software name # #卸载已安装的软件

Yum Update # #更新

Yum Clean All # # clears the buffer and on the package

Yum List available # # Lists all packages on the upgrade source;

Yum List Updates # # Lists all update packages available on the upgrade source;

Yum List installed # # # Lists the packages that have been installed;

Yun Update kernel # #升级内核;

yum provides xxx # # with XXX keyword search package (information provided as keyword)

Yum Search XXX # # Searches packages (keywords by name)







Installation and use of Linux programs

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.