Linux--centos's software Management

Source: Internet
Author: User
Tags install openssl openssl openssl library nginx server

Linux--centos's software Management

Yum view (available warehouses) loading and unloading history
RPM Installation Query Uninstall
SOURCE Package
Types of software
Binary package (. rpm) Compiled mysql-community-common-5.7.12-1.el7.x86_64.rpm
Original RAD Hat Company's package Manager to provide business services
Ubuntu/debian (DPKG) is also compiling software packages, which are free form and cannot provide services
Advantages: Fast Installation Speed disadvantage: cannot adjust function.
The source package (tar.gz) needs to be compiled nginx-1.8.1.tar.gz

Yum Source (Yum repository) Local source official source
(understanding) Local Source Purpose: Install software by CD (90% All)
Purpose: Use vendor-supplied packages as a repository for Yum
Official Source:
Ali Yun
Base/extras/updates Default (foreign source)
rm-rf/etc/yum.repos.d/* Delete Original source
Suitable for red Hat7/centos7:wget Http://mirrors.aliyun.com/repo/Centos-7.repo-O/etc/yum.repos.d/centos-base.repo
Download Ali
Yum Makecache update Yum source

EPEL: Provides additional packages for "Red Hat system" operating systems for Rhel, CentOS, and scientific Linux.
For RHEL6 series: wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm

Mysql:
For Red Hat linux7:https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm

Nginx: (config file)
[Email protected] ~]# Vim/etc/yum.repos.d/nginx.repo
[Nginx]
Name=nginx Repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
Gpgcheck=0
Enabled=1

Managing RPM packages with Yum (Yum recommended)
Installation:
New Installation #yum-y install httpd vsftpd *vnc
Reinstall #yum-y Reinstall httpd (attempt to damage httpd program)
#yum-y update httpd
Upgrade the installation #yum-y update system update, which is performed immediately after you install the system. (Please do not perform the lab)
#yum-y update kernal (upgrade kernel, see after reboot)
Group Install #yum-y Group install MARIADB

Inquire:
Query HTTP program #yum list httpd (with @ is installed)
Querying a VNC-like program #yum list *vnc*
Query HTTP Program details # Yum info httpd
Query Program Groups #yum Group list
Query the details of a program group #yum Group Info mariadb

Unloading:
Uninstall program #yum-y Remove Mysql-server
Uninstall a program group #yum-y groupremove mysql-server

History
# Yum History
# Yum History Info 4
# Yum History undo 4


Rpm
Installation:
Path: RPM-IVH Local_path
RPM-IVH Url_path (must be online)
Example: Rpm-ivh https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
Additional options
-nodeps//Ignore dependencies [[email protected] packages]# RPM-IVH wireshark-1.10.14-14.el7.x86_64.rpm
Error: Dependency detection failed:
1. Discovery of dependencies
Libcares.so.2 () (64bit) required by wireshark-1.10.14-14.el7.x86_64
Libsmi.so.2 () (64bit) required by wireshark-1.10.14-14.el7.x86_64
2. When you discard certain features
[Email protected] packages]# RPM-IVH wireshark-1.10.14-14.el7.x86_64.rpm--nodeps
In preparation ... ################################# [100%]
Upgrading/installing ...
1:wireshark-1.10.14-14.el7 ################################# [100%]
--force//Mandatory installation package
RPM is unable to install the installed packages repeatedly.
For example, you have installed this RPM version 1, if you want to install this RPM version 2, you need to use--force mandatory installation
--nosignature//Ignore signature
1 The Internet-installed package will prompt for no signature
[Email protected] ~]# RPM-IVH mysql57-community-release-el7-9.noarch.rpm
Warning: mysql57-community-release-el7-9.noarch.rpm: Head V3 dsa/sha1 Signature, key ID 5072e1f5:nokey
In preparation ... ################################# [100%]
Package Mysql57-community-release-el7-9.noarch already installed
[Email protected] ~]#

2.--nosignature can be added during installation, thus ignoring the signature
[Email protected] ~]# RPM-IVH mysql57-community-release-el7-9.noarch.rpm--force--nosignature
In preparation ... ################################# [100%]
Upgrading/installing ...
1:mysql57-community-release-el7-9 ################################# [100%]

Query (q)
From the local RPM database
[[email protected] ~]# rpm-q wireshark//query Specifies whether the package is installed
[[email protected] ~]# RPM-QA |grep wireshark//query in all installed packages Wireshark
[[email protected] ~]# rpm-ql wireshark//query Wireshark installed files
[[email protected] ~]# RPM-QF/USR/SHARE/WIRESHARK/WS.CSS//query which RPM package the file belongs to (which)
[[email protected] ~]# Rpm-qi Wireshark//query Package information
[[email protected] ~]# RPM-QC httpd//Query the configuration file for a package installation (none)
[[email protected] ~]# RPM-QD httpd//Check the installation Help document
Query from RPM Suite (not installed) QI------p---Package

Uninstall (e)
[Email protected] ~]# rpm-q httpd
Httpd-2.4.6-67.el7.centos.6.x86_64
[Email protected] ~]# rpm-e httpd
[Email protected] ~]# rpm-q httpd
Package httpd not installed


SOURCE Package Management
1. Get the source package path
Official website to get the latest packages
Apache:www.apache.org
Nginx:www.nginx.org
Tengine:tengine.taobao.org
2. Practical Cases
Deploying the Tengine/nginx Server/web server
1. Download the source package, prepare the package
2. Prepare the compilation environment such as compiler GCC, make
# yum-y Install gcc make zlib-devel pcre pcre-devel openssl-devel
(Pcre: Supports regular expressions, address rewriting rewrite)

3. Unzip
# Useradd www
# tar XVF tengine-2.2.0.tar.gz
# CD tengine-2.2.0
4. Configuration
./configure \
--USER=WWW \
--GROUP=WWW \
--prefix=/usr/local/nginx \
--with-http_stub_status_module \
--with-http_sub_module \
--with-http_ssl_module \
--with-pcre
5. Compiling
# make
6. Installation
# make Install

7 Start Test
#/usr/local/nginx/sbin/nginx//start Nginx server
# Systemctl Stop Firewalld
See the Web page that indicates the deployment was successful.
Source Installation Error:
Error1:
./configure:error:the HTTP gzip module requires the Zlib library.
You can either disable the module by using--without-http_gzip_module
option, or install the Zlib library into the system, or build the Zlib library
Statically from the source with Nginx by using--with-zlib=<path> option.
Solution:
# yum-y Install Zlib-devel

or install the Zlib library into the system,
Error2:
./CONFIGURE:ERROR:SSL modules require the OpenSSL library.
You can either does not enable the modules, or install the OpenSSL library
Into the system, or build the OpenSSL library statically from the source
With Nginx by using--with-openssl=<path> option.
Solution:
# yum-y Install Openssl-devel

Error3:
Checking for C compiler ... not found
./configure:error:c compiler cc is not found
Solution:
# yum-y Install gcc gcc-c++ make

Error4:
./configure:error:the HTTP Rewrite module requires the PCRE library.
You can either disable the module by using--without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
Statically from the source with Nginx by using--with-pcre=<path> option.
Solution:
# yum-y Install Pcre-devel

Tips for installing the source code:
Readme
INSTALL

Linux--centos's software Management

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.