Installation of Linux software packages

Source: Internet
Author: User
Tags set time

Package Installation

Package classification

Source Package Features

The advantage of source package is: Open source, if there is enough ability, can modify the source code can freely choose the required functionality software is compiled installation, so more suitable for their own system, more stable and more efficient unloading convenience

Disadvantage: The installation process more steps, especially when installing a large set of software (such as lamp environment), prone to spelling errors compilation process time is longer, installation than the binary installation time long because it is compiled installation, the installation process when the novice is difficult to solve

Script installation package:

Binary Package

1) Classification

DPKG Package: It is a package management mechanism developed by Debian Linux, which can be managed by Debian Linux through the dpkg package. It is mainly used in Debian and Unbuntu.

RPM Package: It is a package management system developed by Red Hat Company. Powerful, installation, upgrade, query and uninstall are very simple and convenient. Many Linux are currently using this package management method, including Fedora, CentOS, SuSE and so on. We are learning CentOS 6.3, so we are going to learn the RPM package management system

2) features RPM package Advantages:

Package management system is simple, only through a few commands can be implemented package installation, upgrade, query and uninstall installation faster than the source package installation faster than

RPM Package Disadvantages: After compiling, can no longer see the source Code feature selection is not as flexible as the source package dependencies. Sometimes we find it necessary to install package A with B and C, and D and E to install B. It is necessary to install D and e First, then install B and C, and finally install package A.

  

Two RPM installation

1 package naming httpd-2.2.15-15.el6.centos.1.i686.rpm

HTTPD Package Name

2.2.15 software version

15 Number of software releases

El6 software publisher. El6 is a redhat company release, suitable for rhel6.x (Red Hat Enterprise Linux) and CentOS6 using i686 suitable hardware platform. RPM package can be installed on the hardware platform, choose the software version suitable for different CPUs, can maximize the performance of CPU, so the so-called i386 (more than 386 computers can be installed), i586 (more than 586 of the computer can be installed), i686 (Pentium II above the computer can be installed, currently all CPUs are Pentium II above, so this software version is mostly), x86_64 (64-bit CPU can be installed) and noarch (no hardware restrictions) and other file names.

Rpm

The extension of the RPM package. We said

Linux files do not differentiate file types by extension, that is, the extensions in Linux do not have any meaning. But why is this extension now? The reason is very simple, if I do not put the extension of rpm called ". RPM", it is difficult for the administrator to know that this is a RPM package, of course, it will not be installed correctly. That is, if the RPM package does not use ". RPM" as the extension, the system can correctly identify the problem, but it is difficult for the administrator to identify what kind of software it is.

Two RPM installation

Manual RPM Command Installation

1 package naming

Package name-Version number-number of releases-for Linux systems-hardware platforms. rpm

Package Full Name: Operation not installed package, package using package full name

Package Name: operation is already installed package, package use package name

2 dependence

3 Installation

RPM-IVH Package full Name (absolute path)

-I installation-V Show details-H show progress

RPM-UVH Package Full Name

-U Upgrade

4 Uninstalling

RPM-E Package Name

--nodeps does not check for dependencies

5 queries

RPM-Q Package Name Query package is installed

Rpm-qa | grep httpd Show All installation packages

RPM-QI Package Name Query package information-P not installed package

RPM-QIP Package Full Name query does not install the package information

-iinformation

RPM-QL package name where to install files in the query package

RPM-QLP Package Full Name query no packages installed, plan to install location

-llist

RPM-QF System file name query system files belong to which package

(7) Start httpd service

①service httpd Restart|start|stop|status

②/ETC/RC.D/INIT.D/HTTPD start

(ii) Yum

Yum-y Install package name installation-y Auto Answer Yes

Yum-y Remove Package name when it does not exist

YUM-Y Update package Name

Yum list queries All packages that can be installed

CD as a Yum Source:

1cd/etc/yum.repos.d/

MV Centos-base.repo Centos-bs.repo.bak

2mount/dev/hdc/mnt/cdrom

3vi/etc/yum.repos.d/centos-media.repo

baseurl=file:///mnt/cdrom/specifying the Yum source location

Enabled=1yum source file in effect

GPGCHECK=0RPM validation does not take effect

Pkill-9 yum-updatesd If Yum error is being escalated, execute this command to force kill the upgrade process

Yum-y Install gcc (gcc is a C language compiler, does not install GCC, the source package cannot be installed)

Three Source package Installation

1 Remote transfer Tool WINSCP transfer Apache to Linux.

httpd

2 installation

1) Unzip

2) CD Extract directory

3) View the installation documentation

Installreadme

4) Prepare before compiling

./configure--prefix=/usr/local/apache2

Function:

1 detection system environment, generate makefile

2 Defining software Options

5) Compile Make clean

Make

6) Compile and install

Make install

Error judgment:

First: Does the installation process stop

Second: Pay attention to error warning No and other false alarms

3 start

/usr/local/apache2/bin/apachectl start

4 Delete

Delete the installation directory directly

Common Command Additions

Date View system time

Date-s 20130220 Set Date

Date-s 09:30:00 Set time

Du-sh Directory name Statistics directory size

-S and

-H Customary Unit

Installation of Linux software packages

Related Article

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.