Linux system software installed in several ways

There are many Linux distributions, software installation methods and commands between the various releases are not the same, install the software with a version also between different methods. However, generally speaking, Linux has two factions, one faction of Red Hat, includes Redhat, Centos, Fedora and so on. There is a faction Debian, contain Kali, Ubuntu and so on.

 

 Red Hat Series

  Look at the simple view:

  

 

 Source installation need to install the compilation tools:  yum -y install gcc gcc-c ++ the make

To install apache for example under Redhat

To download the source code package-2.2.15.tar.gz the httpd
the tar -xvf the httpd-2.2.15.tar.gz -C / usr / which is extracted to the src / usr / src / directory
to unpack directory / usr /src/httpd-2.2.15/ down, ./configure run configure configuration file, set the installation directory, installing the module, which does not set, the software is installed by default in / usr / local / apache2 / directory. If ./configure --prefix = / usr / local / https /, sucked mounted in / usr / local / https / directory. At this time also is not installed, the installation path configuration only
make the compiler to generate an executable binary file Makefile
make install installation. In this case, the software is installed in / usr / local / https / directory
to install clean-up after the completion of the installation package

    Unzip it into the directory /usr/src/httpd-2.2.15/ down, make uninstall or make clean for Clear once compiled
    and then return to the parent directory, delete the httpd-2.2.15
    If you want to uninstall the software, then, the / usr / local / apache2 this software can be deleted
./configure make and install the make
./configure is used to detect the target feature your installation platform. For example, it will detect that you are not a CC or GCC, CC is not needed or GCC, it is a shell script.
is used to make compiled, it reads instructions from the Makefile, then compiled.
make install is used to install, it also reads instructions from the Makefile, mounted to the specified location.
configure

This step is generally used to generate the Makefile, to prepare for the next compilation, you can be controlled by adding a parameter after installation configure, such as code: ./configure --prefix = / usr is the meaning of the above software installed in / usr below, the executable file will be installed in / usr / bin. at the same time some of the software configuration file you can set by specifying --sys-config = parameter. Some software can also add --with, - enable, - without, - disable etc. parameters to control compiler, you can view detailed instructions to help by allowing ./configure --help.

make

This step is to compile the source code for most of the packages have been compiling this step (of course, some written in perl or Python software needs to call perl or python to compile). If the error occurs in the make process, you have to write down the error code (note not just the last line), then you can submit a bugreport to the developer (generally submitted to the address in the INSTALL years), or your system less dependent on a number of libraries, which require careful study of their own error code. the role of make is to start compiling the source code, and some offer features, these features provide related functions by his Makefile settings file,
make a control program for Linux development kit inside the automation compiled, he passed the compiler enables the preparation of the Makefile specification automated call gcc, ld and running some programs need to be compiled. In general, the Makefile control codes used by him, provided the script generated by the configure parameters and the given system environment.

make install

This command to install (of course, some software you need to run make check or make test carried out some tests), this step generally requires you to have root privileges (because want to write to the file system). make install generally indicates the installation, make uninstall is unloaded.

rpm package
RPM (RedHat Package Manager): presented by Red Hat, the proposed unified database files, a detailed record of the installation package, unloading and other changes in information, it can automatically analyze package dependencies
 
naming format RPM packages: firefox-17.0 .10-1.el6.centos.x86_64.rpm
                                software name version release number of the hardware platform extension

rpm command management
  for installed software

          rpm -qa: query all rpm packages installed software information, listed version of the package
          rpm -q httpd: httpd see if the installed
          rpm -qi httpd: httpd software lists the details of
          rpm -qc httpd: httpd View profile directory
          file viewing httpd included: rpm -ql httpd
          installation path and see the httpd executable path: whereis httpd
    name according to package instructions search

          which vim: command search path in the system of
          absolute path rpm -qf instructions: view the command rpm package which is provided by the rqm -qf / usr / bin / vim
  for not installing the software (CD-ROM file need to mount, and then Package into its next catalog  

    rpm -qpl .rpm package options p denotes package, behind the need to write the full path information packet, qpl indicate which files and directories listed in this package generated after installing
    rpm -qpi package .rpm read detailed information packs installed
verification software:

V: followed by the name of the software, the software contained in the file is altered, will be listed. For a software query. 
Va: List all likely to be altered in the file system on it. For a real system. 
Vp: followed by the RPM package. 
Vf: lists whether a file is altered.

 

 

For the meaning of each tag output as follows:

S represents the length of the document has changed
M represents the file type or file access changes
. 5 shows a change MD5 checksum
D represents the properties of the device node changes
the symbolic link file L represents a change
U represents a file / subdirectory owner / device is changed node
G represents a file / subdirectory / node apparatus changes group
T represents the last modification time of the file has changed
if "M" mark appears in the output, then the corresponding file may have been tampered with or replaced, then the file can be cleared under attack by unloading the rpm package reinstalled.

But this command has a limitation that can check all the files installed by the rpm package for files by way of non-rpm packages installed on the powerless. Meanwhile, if the tool has also been rpm Alternatively, this method can not pass through, and at this time can be copied from a normal tool rpm detecting system.

Check the file system can also be accomplished by chkrootkit, RKHunter these two tools.

  Install and Uninstall

        rpm -ivh installation package .rpm i represents, v denotes a display installation, h represents a '#' as progress, showing the installation progress
        name rpm -e Removes the specified package rpm package
yum source mounting:
YUM (Yellow Dog Updater Modified ): based on software update mechanism built RPM package can automatically resolve dependencies between the rpm package, all packages provided by a centralized repositories yum

Related articles: Redhat7 configure yum source (local source and network sources)
some common yum command:

  yum clean all empty the cache information
  yum list list the information package
  yum list view httpd httpd is installed
  yum info httpd displays detailed information about specific httpd packages
  yum install httpd -y install httpd package
  yum remove httpd httpd package unloading -y
  yum search key the word keywords, it has been found in the repo source for keyword searches rpm package
  yum provides command according to the command, the source has been found in the repo searches installation instructions rpm package
  yum history list / info / undo / redo number history can List view, reloading, uninstall the corresponding packet, but is the operation sequence based on the instruction yum, it is necessary to increase the number specified execution
  yum update -y upgrade all packets while software upgrades and system kernel
  yum upgrade - y only upgrade all the packages, do not upgrade software and system kernel

 

Debian school

  

Deb package to install
DEB Debian package format is the file extension, Debian package archive is Unixar standard, the package package file information and content, through gzip and tar package together.
Classic program to deal with these packages is dpkg, often operate through Debian's apt-get. deb format is the Debian system (including Debian and Ubuntu) proprietary installation package format, with the APT software management system, it has become a very popular form of the current installation package under Linux
 
dpkg command usage:
dpkg

    -i: Install the package;
    -r: remove packages;
    -P: delete their profiles deleted package;
    -L: Displays the file in the package associated;
    the -l: display a list of installed packages;
    - unpack: untie the package;
    -c: display a list of files within the package;
   --confiugre: configure the package.
apt-get install source
using the apt-get's
senior management 1.Ubuntu package of apt-get
in addition to the convenience of apt, apt-get is a big benefit greatly reduces the probability of occurrence of the so-called dependency nightmare ( dependency hell), even if caught in a dependency hell, apt-get also provides a good means of assistance, help you escape the snare. 
Apt-get and usually are infested with the online archive to download or install from the Internet. Worldwide there are more than 200 official debian mirror, there are many unofficial packages offer site. You use based on a different version of Debian's release, depot you are using may need to manually or automatically select settings. You get a full Debian mirror list from the official website. And many unofficial sites offer a variety of special-purpose software package unofficial, of course, there will be more risk to use unofficial packages. 
Packages are for a basic Debian release a prepared (from unstable to stable), and is divided into different categories (such as main contrib nonfree), this Program is based on the debian free software and division (which is often said the dfsg), because of US restrictions on exporting encryption software, and a non-us category. 
2. APT commands commonly used parameters

apt-cache search package search Package 
apt-cache show package acquired packet information, such as instructions, size, version, etc. 
sudo apt-get install httpd install software
sudo apt-get install package - reinstall reinstall package 
sudo apt-get - f install repair installation "-f = --fix-Missing" 
sudo apt-get httpd the Remove to uninstall the software
sudo apt-get remove package - purge remove the package, including deleting profiles, etc. 
sudo apt-get update updates the source 
sudo apt-get upgrade update installed packages 
sudo apt-get dist-upgrade to upgrade the system 
sudo apt-get dselect-upgrade using dselect upgrade 
apt-cache depends package is understood to use dependent 
apt-cache rdepends package is to look at the packet is what the package is dependent 
sudo apt-get build-dep package related to the installation of the compiler environment 
apt-get source package download the source code of the package 
sudo apt-get clean && sudo apt -get autoclean clean up unwanted package 
sudo apt-get check check dependency of damage

 

Guess you like

Origin www.cnblogs.com/WinkJie/p/12528437.html