Rpm
 
 
Rpm-uvh file. rpm -- nodeps -- Force update package
 
A... How to install the. SRC. RPM source code package in Linux
(1) rpm-IVH setarch-1.3-1.src.rpm
(2) CD/usr/src/RedHat/specs
(3) rpmbuild-BB setarch-1.3-1.spec
The rpmbuild operation will be performed in/usr/src/RedHat/RPMS/i386 (different packages may have different paths, such as i686 and noarch) create one or more RPM packages
(4) rpm-IVH/usr/src/RedHat/RPMS/i386/setarch-1.3-1.rpm
 
The i386 software package can be used on any X86 platform, whether it is an i686 or x86_64 machine. The i686 software package generally optimizes the CPU and has backward compatibility, it does not have forward compatibility.
 
 
 
B... Source code compilation and Installation
The installation of source code is generally composed of three steps: configuration (configure), compilation (make), and installation (make install ).
Configure is an executable script. Use the command./configure-help in the source code path to output a detailed list of options.
(1) run the following command to check whether the GCC compiler is installed. You cannot install GCC with yum.
GCC -- version # Check whether GCC is installed, decompress it to the/usr/src directory, and CD it to this directory.
(2) execute the configure file, which has two functions: 1. Let the user select the compilation feature; 2. Check the compiling environment. After configure is executed, a MAKEFILE file is generated. If this option is not configured, the executable files are stored in/usr/local/bin by default, and the library files are stored in/usr/local/lib by default, by default, the configuration file is stored in/usr/local/etc, and other resource files are stored in/usr/local/share. For example:
./Configure -- prefix =/usr/local/nginx -- conf-Path =/etc/nginx. conf
The installation path is determined through -- prefix, and the specific location of the configuration file is determined through -- conf-path. All resource files can be placed in the path of/usr/local/nginx without clutter. When a software installation is no longer needed, you only need to delete the installation directory to clean the software; to transplant software, you only need to copy the entire directory to another machine (the same operating system ).
(3) execute the make command to compile the make program
(4) After the compilation is successful, you can install it. Execute the following command: make install
(5) configuration program
 
 
* Modify the PATH environment variable to identify the binary file path of the program;
Modify the/etc/profile file and add
Export Path = $ path:/path/to/somewhere # Remember the directory where the executable file is located. do not include the executable file in the path.
Run source/etc/profile # To make the modification take effect.
 
* The program may also provide help documentation, which is generally the man directory under the installation directory. To view the help documentation of our program using the man command, we need to: in/etc/man. add a manpath in config to point to our document directory
 
 
 
C... Components
 
In Linux, most programs are composed of the following parts:
Binary files, library files, configuration files, and help files
 
 
 
Yum
 
1. Configure the network yiyuan:
 
Back up the original file first: MV/etc/yum. Repos. d/CentOS6-Base.repo CentOS6-Base.repo.bak
Download Yum Source: wget Repository
# Yum clean all: Clear Cache
 
# Yum makecache, build Cache
 
2. Create a local Yum Source
 
* Mounting an ISO installation Image
# Mkdir/ISO
# Mount/dev/CDROM/ISO
* Create and install the yum source file
# Vim/etc/yum. Repos. d/DVD. Repo
# Yum -- disablerepo = \ * -- enablerepo = c6-media [command]
[DVD]
Name = DVD
Baseurl = file: // ISO/Server note three/
Gpgcheck = 0
Enabled = 1
 
3. Yum install Pam-devel, and Yum list to list programs, yum List Installed, and Yum update tree
 
Yum remove Pam-devel, yum info tree, yum history
 
Yum repolist all displays all repositories,repolist enabled
 
Yum deplist PHP View package Dependencies
 
4. Yum source domestic image site:
Alibaba source? Https://mirrors.aliyun.com/centos/7.3.1611/ OS /x86_64/
Tsinghua University https://mirror.tuna.tsinghua.edu.cn/centos/7.3.1611/ OS /x86_64/
Net Yi source http://mirrors.163.com/centos/7.3.1611/ OS /x86_64/
Zhejiang University http://mirrors.zju.edu.cn/centos/7.3.1611/ OS /x86_64/
Https://mirror.tuna.tsinghua.edu.cn/help/centos/ Tsinghua
Http://dl.cihar.com/
Http://mirror.bit.edu.cn/web/ Beijing University of Technology Open Source Software Image Service
Http://hadoop.apache.org hadoop
Http://hbase.apache.org/
 
Because centos is pursuing stability, there are not many software in the official source, so some third-party sources are required, such as epel, atrpms, elrepo, Nux dextop, and repoforge. Based on the software installation principles mentioned above, to ensure system stability as much as possible, only epel source, Nux, dextop, and elrepo sources are added to large third-party sources.
Epel is extra packages for enterprise? Linux provides more than 10000 additional software packages for centos, and does a lot of work without replacing system components, so you can use them with confidence.
Sudo Yum install epel-release
After the command is executed, an epel. Repo file is added to the/etc/yum. Repos. d directory.
Nux dextop contains multimedia-related software packages. The author tries to avoid overwriting the base source. The official note says the source is compatible with epel. In fact, some software packages conflict, but it will not affect the source:
Sudo rpm-uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
After this command is completed, there will be one more? Nux-dextop.repo? File.
Elrepo contains hardware-related drivers, such as graphics cards and sound card drivers:
Sudo rpm -- import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
Sudo rpm-uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
After the command is completed, an elrepo. Repo file will be added to the/etc/yum. Repos. d directory.
Install Yum-axelget
Yum-axelget is a yum plug-in provided by epel. This plug-in can be downloaded concurrently when software is installed using yum, greatly improving the software download speed and reducing the download wait time:
Sudo Yum install Yum-axelget
The plug-in is installed with another software Axel. Axel is a parallel download tool that is very useful for downloading simple protocols such as HTTP and FTP.
Find the configured Yum source] # Yum repolist
 
 
 
Yum-RPM Introduction