Centos software management

Source: Internet
Author: User
The gcc compiler is required, but we have installed the O (Kernel _ compiler) Olinux software package in the installation system. installation method: 1. install 2.yumin the rpm package (which solves the dependency and facilitates software package upgrade. source code compilation and installation 1. rpm Package Management: redhatpackagemanagement & n

Gcc required Compiler, but we have installed the O (Partition _∩) O

 

LinuxPackage installation method:

1.RpmPackage Installation

2.Yum(Solves dependencies and facilitates software package upgrades)

3.Source code compilation and installation

 

I,RpmPackage management:


Redhat package management

 Example:Sudo-1.7.2pl-5.el5.i386.rpm

Software name, version number, release number, hardware platform

 

Sudo is the default software package for all linux systems.

Rpm package creation encapsulates the compiled execution program of the source code package into the rpm structure. when you install the rpm package, the third step of the source code package installation is actually executed, is to copy the execution program to the corresponding directory.

 

RpmPath ProblemsMost rpm packages do not allow you to change their installation directory. by default, the installation directory is set. It is not like windows registry, and linux uninstallation will automatically uninstall and clean.

1.InstallRpmPackage

Rpm-ivh vsftpd-2.0.5-16.el5_4.1.i386.rpm

I install v installation process information

Overwrite installationRpm-ivh vsftpd-2.0.5-16.el5_4.1.i386.rpm -- replacepkgs

File conflictAn older version of the software -- replacefiles

To solve the dependency-- NodeppsDependency is not considered and cannot be used successfully in most cases.

 

 

2.View all installedRpmPackage

Rpm-qa

Rpm-qa | grep vsftp

3. vsftpInstall many files and store them in different directories under the root directory.

Rpm-SQL vsftpd-2.0.5-16.el5_4.1

4.Which of the following is the reverse query object?RpmThe software package is installed

Rpm-qf/etc/vsftpd. conf

5.View an uninstalledRpmWhat files may be installed after the package

Rpm-qlp vsftpd-2.0.5-16.el5_4.1.i386.rpm

6.UninstallRpmPackage

Rpm e vsftpd-2.0.5-16.el5_4.1

Rpm-e -- nodeps samba forced uninstall, ignore dependencies. No longer. Not recommended

7. upgrade the software package

Rpm-Uvh software package

 

II,RpmPackage installed in three core files:

1.Applications4

/Usr/sbin/vsftpd

# Execution program

2.Configuration file

/Etc/vsftpd. conf

# A file to be read before the application starts and then loaded to the process List

3.Service script

/Etc/rc. d/init. d/vsftpd

# Better control the application to read the configuration file and load it to the process List

 

III,Run scripts:

 

1. corresponding path

./Vsftpd restart

2. absolute path

/Etc/rc. d/init. d/vsftpd restart

3. run the service

Service vsftpd restart

 

IV. attach a CD:

1.Put the CD in the optical drive

2.Check whether the optical drive is powered on.

3.Attach a CD/Media

Mount/dev/cdrom/media

4.How to check whether the mounting is successful

Df-Th

5.Enable automatic mounting of the disc/MediaLower

Vi/etc/fstab

/Dev/cdrom/media iso9660 defaults 0 0

Software Management "src =" http://s5.sinaimg.cn/bmiddle/66ac0939gd3fe3260f884&690 "/>

 

 

V. SolutionRpmDependency problems:

YumTool managementRpmPackage 

All software packages areCentosSubdirectory

1.Attach a CD(Start)

2.Change Software sourceCd/etc/yum. repos. d/

Mv CentOS-Base.repo CentOS-Base.repo.bak

Software Management "src =" http://s1.sinaimg.cn/bmiddle/66ac0939g7b996b7de460&690 "/>

Suffix sensitiveSo CentOS-Base.repo change plus. bak.

3.Modify the disc source

Vi CentOS-Media.repo

C5-media

Name = CentOS-$ releasever-Media

Baseurl = file: // media

# Disk Mount destination

Gpgcheck = 0

# Go to the official website to update the signature and close it.

Enabled = 1

# Enable the CD source

Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

4.PassYumInstallRpmSoftware

Yum-y install vsftpd *

5.InstallLampEnvironment

Yum-y install httpd * mysql * php *

6.UseYumHow to uninstallRpmPackage

Yum-y remove httpd * mysql * php *

7.Force deleteRpmPackage

Rpm-e httpd-1.3.8 -- nodeps

# Nodeps truncation dependency

8.Force install oneRpmPackage Software

Rpm-ivh mysql-server-5.0.77-4.el5_4.2.i386.rpm -- force -- nodeps

Detect and upgrade yum check-update software name

Upgrade yum update

Query yum list by software package

Package information yum info

Uninstall yum remove

Help yum-help

Determine if the software is installed with rpm-q

VI,Install the source code package (compatible):

Tar.gz tar.bz2

Tar zxf Extract

1.Generate configuration file

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

 

Collect system information -- prefix to specify the installation directory. There is no special uninstall command. Generally placed in usr/local

Gcc is required to be installed with yum

2.Compile

Make

3.Install

Make install

4. cd/usr/local/apache2/

1) applications

/Usr/local/apache2/bin/httpd

2) service script

/Usr/local/apache2/bin/apachectl

3) configuration file

/Usr/local/apache2/conf/httpd. conf

5.Start source code installationApache

/Usr/local/apache2/bin/apachectl restart

6.View processes

Ps-ef | grep httpd

7.How to installApacheAuto Start

Vi/etc/rc. d/rc. local

/Usr/local/apache2/bin/apachectl restart (ctl control)

 

VII,Script installation Just run. shThe script can (Similar to windows)

Webmin

Readme file

Install./setup. sh

8,APTPackage managementDebianSeriesLinux

Software Management "src =" http://s2.sinaimg.cn/bmiddle/66ac0939g7b996b92d421&690 "/>

 

Search for software packagesApt-cache search

Software package informationApt-cache show

InstallApt-get install (Reinstall Overwrite installation -F Fix installation)

DeleteApt-get remove

Update software sourceApt-get update

Update installed packagesApt-get upgrade

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.