Introduction to Linux Yum installation

Source: Internet
Author: User
Tags ftp protocol rpmbuild

Yum is the abbreviation of Yellowdog Updater modified. Yum's idea is to use a central warehouse (repository) to manage some or even a distribution application, and to perform related upgrades, installations, deletions, etc. based on the calculated software dependencies, reducing the number of Linux users who have been headaches Dependencies of the problem.

Generally this kind of software describes the corresponding repository network address through one or more configuration files, obtains the necessary information from the repository through HTTP or FTP protocol, and downloads the relevant software packages. In this way, local users can establish a different repository description to facilitate system upgrade maintenance when there is an Internet connection. In addition, if you need to use proxies, you can use Http_proxy and ftp_proxy to set the standard environment variables inside these shells.

The Yum tool is already installed in the operating system and can be downloaded from the Internet if it is not installed.

Download the Yum package:

You can download it directly from the Web using wget, and the downloaded file will be placed in the current directory. Such as:

[Root@squid yum]# wget http://yum.baseurl.org/download/3.2/yum-3.2.26.tar.gz

[Root@squid yum]# wget http://yum.baseurl.org/download/3.2/yum-3.2.26-0.src.rpm

The installation packages under Linux are in a centralized format:

1.1 tar.gz Format

The installation of tar.gz files is the method of compiling your own source code. Tar is to make the file into a package, not compression; GZ is made into a bag with gzip. Tar file compression, so became one. Tar.gz's file.

The installation of this format is divided into four parts:

1) Solution Package

TAR-ZXVF xxx.tar.gz, which generates a folder named after the file name.

2 Execute the Configure script

This paper url:http://www.bianceng.cn/os/linux/201410/45622.htm

This script is used to complete the configured task. Can add a lot of parameters, specific can run. /configure--help get help, like. /configure--prefix=xxx is where the software installation is set up. Set the parameters, run. /configure, a makefile file is generated.

3) Compiling

Configure generates the makefile file, run make to complete the compilation. Make is the file that will be read into all the files created by the Configure Scripting program. These files tell make which files need to be compiled and in what order they are compiled, because there may be hundreds of source program files. When make works, every command that is being executed is displayed on the screen, along with all the parameters associated with the command. These outputs are usually the invocation declarations of the compiler and all parameters passed to the compiler. If the compiler completes the work successfully, there is no error message. Most compiler error messages are clear and unambiguous, so don't worry about the possibility of missing an error. If you do see a mistake, don't panic. Most error messages do not reflect a problem with the program itself, which is usually a problem here or there. Typically, this information is mostly due to incorrect file access rights or because the file is not found.

4) Installation software

Execute make install, which launches the setup script. Because the make command displays it as it executes every command, you'll see a lot of text passing by. If you don't see any error messages, this package is installed.

Uninstall: Make Uninstall

Note: If the downloaded package already has a makefile file, it means that it has been configure, directly installed on it.

1.2 *.src.rpm

The RPM-formatted package is also a source package that needs to be compiled before it can be installed. There are 2 specific installation methods:

Method One:

1) Executive Rpm-i you-package.src.rpm

2) Cd/usr/src/redhat/specs

The first two steps are the same as the method one

3 RPMBUILD-BB your-package.specs A specs file with the same name as your package

At this time, in/usr/src/redhat/rpm/i386/(depending on the specific package, it may be i686,noarch, etc.)

4 in this directory, there is a new RPM package, this is a compiled binary file.

The execution of Rpm-i new-package.rpm can be completed by installation.

Method Two:

1) Executive Rpm-i your-package.src.rpm

2) Cd/usr/src/redhat/specs

3 RPMBUILD-BP your-package.specs A specs file with the same name as your package

4 cd/usr/src/redhat/build/your-package/a directory with the same name as your package

5). /configure This step and the compilation of common source software, you can add parameters

6) Make

7.) Make Install

Note: There is also a format of the RPM package: *.rpm, this package does not need to compile, direct installation can: RPM-IVH *.rpm

We can update repository with Yum update after installation. The total size of the first updated file is around 800M.

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.