Install the software package in RHEL5.4 (Binary installation)

Source: Internet
Author: User

Binary installation can be divided into rpm installation and yum installation, where yum can implement network yum and local yum, both the network yum and the local yum and rpm address the dependency between packages.

1.Let's take a look at rpm installation:

The full name of rpm is: redhatpacket manager, which can install, uninstall, upgrade, verify, and query software packages. For beginners, it is easier to use rpm for software packages.

The following uses the httpd installation package as an example:

First, create a mount point, mount the optical drive to the mount point, switch the directory to the Server directory under the mount point, and install the httpd service package:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/20011354N-0.png "title =" rpm .png "alt =" 114012778.png"/>

After a progress bar appears, the software package is successfully installed. Secondly, you can use rpm-qa/-qi/-ql to view all packages/detailed information of the installed packages/the installation directory of the files related to the installed services, we can also use rpm-qf to view files under a directory that belong to a certain rpm package.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/2001135B0-1.png "style =" float: none; "title =" rpm2 .png "alt =" 114124936.png"/>


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/2001134I4-2.png "style =" float: none; "title =" rpm3installer .png "alt =" 114108140.png"/>


Another common command for rpm is as follows:

View the information of the uninstalled software package. You can use rpm-qip (View Details) rpm-qlp (view the installation directory of the relevant files)

You can use rpm-Uvh to upgrade the software package. You can also install the software package.) or,

Uninstall the installed software package, you can use rpm-e

Verify that installed software packages are available, rpm-V

When we install software packages with dependencies, such as mysql:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/200113B19-3.png "title =" rpm4 .png "alt =" 114229994.png"/>


For new users, rpm installation is obviously not suitable. Only those with rich experience can infer that the dependency is the package and then install it, which is quite troublesome; so what method can we solve the dependency? That is, the yum installation that we will talk about below.


2. yumInstall software package

Yum (Software Package Manager) is a Shell front-end Software Package Manager in Fedora, RedHat, SUSE, and CentOS. Based on RPM package management, You can automatically download and install the RPM package from the specified server, and automatically handle dependencies. you can install all dependent software packages at a time without the need for tedious download and installation.

Yum contains the server and client, which can be divided into the network yum and local yum. The Network yum can provide software installation package services for all linux Hosts in the network, and install software packages through FTP, WWW, NFS, and other methods. Local yum, the host is both a server and a client.


Implementation of Network yum:

First, configure the yum server. Here I use FTP to implement the yum server. Install the vsftpd package, start the ftp service, and copy all the files on the CD to the/var/ftp/directory. 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/2001135054-4.png "title =" yum server1.png "alt =" 114825516.png"/>


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/2001133521-5.png "style =" float: none; "title =" yum server2.png "alt =" 114454545.png"/>


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/2001135N6-6.png "style =" float: none; "title =" yum server3.png "alt =" 114500295.png"/>


So far, the configuration of the yum server implemented using FTP is complete.

Second, configure the yum client and use the vim editor to modify/etc/yum. repos. d/rhel-debuginfo.repo as follows:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/20011343K-7.png "style =" float: none; "title =" yum client1.png "alt =" 114702929.png"/>


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/20011335Q-8.png "style =" float: none; "title =" yum client2.png "alt =" 114706568.png"/>


So far, our client has been configured.

You can use yum to install the software package. The following uses mysql installation as an example:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/2001134208-9.png "style =" float: none; "title =" yum client 4.png" alt = "111083629.png"/>


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/200113M02-10.png "style =" float: none; "title =" yum client3png.png "alt =" 111087948.png"/>

Software installation is complete.


Other yum-related commands:

Yumrepolist lists the repo IDs on the corresponding local server

Info View package information

Install package name-y Installation

Remove uninstall

Yumlistall/installed/available list all installation packages/List installed installation packages/list installable installation packages

Yum grouplist list all group Software

Groupinstall install package group Software

Group Name

Yum clean all clear local yum Cache

Implementation of local yum:

The local yum is to use the local host to act both as the yum server and yum client, using vim to edit the/etc/yum. repos. d/rhel-debuginfo.repo file as follows:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/2001133c8-11.png "title =" yum client5.png "alt =" 115007383.png"/>

I will not perform more tests here. If you are interested, try it on your own!


This article from the "bad guy K" blog, please be sure to keep this source http://lzzjk.blog.51cto.com/7830498/1305354

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.