linux--Software Management

Source: Internet
Author: User
Tags gpg

/usr/share/man

/etc,/bin,/lib
Programs that need to be used when the system starts, these directories cannot mount additional partitions and must be on the partition of the root filesystem

/usr/
Bin
Sbin
Lib
Operating system core functions, can be partitioned separately

/usr/local Third party software
Bin
Sbin
Lib
etc
Man separate partition

/opt


/proc
/sys
Cannot separate partition, default is empty

/dev: device, cannot be partitioned separately
Udev

/root cannot be partitioned separately

/var recommended separate partitioning

/boot: Kernel, inired (INITRAMFS)
Kernel:

Post-->bios (HD)---(MBR) bootloader (file system structure, EXT2,EXT3,XFS)--Kernel

Core features of the package Manager
1. Making a software package
2. Install, uninstall, upgrade, query, verify
Redhat, SuSE, Debian
Redhat, suse:rpm
Redhat Package Manager
RPM is the package Manager
Debian:dpt

Yum:yellowdog Update Modifier

RPM Command:
Rpm:
Database/var/lib/rpm
Rpmbuild:

Install, query, uninstall, upgrade, verify, rebuild the database, etc.

RPM Name:
Package: Components
Main package:
bind-9.7.1-1.i386.el5.rpm
Child Package:
bind-libs-9.7.1-1.i586.el5.rpm
bind-utils-9.7.1-1.i586.el5.rpm
Package name format:
Name-version-release.arch what platform can be installed

View Kernel version
Uname-r
-A
Installation
Rpm
-ivh/path/to/package_file
--nodeps: Ignoring dependencies
--replacepkgs: Reinstall, replace the original installation
--force: Forced installation

2. Enquiry
Rpm-q package_name: Query whether the specified package is already installed
RPM-QA: Querying all packages that have been installed

Rpm-qi package_name: Query The description information of the specified package;
RPM-QL package_name: Query the list of files generated after the installation of the specified package
RPM-QC package_name: Query the configuration file for the specified package installation
RPM-QD package_name: Query the Help file for the specified package installation;
Rpm-q--scripts package_name: Query the script contained in the specified package

Rpm-qf/path/to/somefile: Query the specified file is generated by which RPM package is installed

If a RPM package has not been installed, we need to query its description information, install the files that will be generated later
Rpm-qpi/path/to/package_file
Rpm-qpl

3. Upgrade
Rpm-uvh/path/to/new_package_file: If the old version is installed, then upgrade; Otherwise, the exit
Rpm-fvh/path/to/new_package_file
--oldpackage: Downgrade

4. Uninstall
RPM-E package_name
--nodeps

5. Check
Rpm-v package_name

6. Rebuilding the database
Rpm
--rebuild: Rebuilding the database will definitely re-establish
--INITDB: Initialize the database, not only build, there is no need to establish

7. Verification of source legality, and software integrity:
Encryption type
Symmetric: Encrypt and decrypt using the same secret key
Public key: A pair of keys, public key, private key: The public key is implied in the private key, can be extracted, and exposed

Unidirectional:

ls/etc/pki/rp,-gpg/
Rpm-gpg-key-redhat-release

Rpm-k/apt/to/package_file
DSA, GPG: Verifying the legitimacy of the source, that is, verifying the signature: You can use--nosignature to skip this
SHA1, MD5: Verifying package Integrity: You can use--nodigest to skip this



RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release

Rpm-k--nodigest

A front-end tool for the RPM Package Manager
RPM--Yum

Html:hypertext Mark Language
xml:extended Mark Language

XML, JSON: Semi-structured data

Configuration files in the Yum repository
Primary.xml.gz
List of all RPM packages:
Dependency Relationship:
List of files generated per RPM installation:

Filelists.xml.gz
List of all files in the current warehouse for all RPM packages

Other.xml.gz
Additional information, change log for RPM package

Repomd.xml
The timestamp and checksum of the above three files is recorded

Yum Install zsh

COMPS*-.XML:RPM Packet Grouping information
/etc/yum.conf-/ETC/YUM.REPOS.D
How to define a repo file for Yum
[Repo_name]
Name=description
Baseurl=
ftp://
/HTTP
file:///
Enabled={1|0}
Gpgcheck={1|0}
gpgkey=


Yum [options] [command] [package ...]
-Y: Auto Answer Yes
--nogpgcheck

List: Lists
All
Available: Available, but not yet installed in the warehouse
Installed: Already installed
Updates: Available upgrades

Clean: Cleanup Cache
Packages

Headers

Metadata

Dbcache

All

Repolist: Displays a list of repo and their brief information
All
Enabled: Default
Disabled

Install: Installation
Yum Install Package_name

Update: Upgrade
Update_to: Upgrade to the specified version

Remove | Erase: Uninstalling

Info

provides | Whatprovides: To see which package installation generated the specified file or attribute;

GroupInfo
Grouplist
Groupinstall
Groupremove
Groupupdate

Yum GroupInfo "Development Tools"

LINUX:C,
Gnu:c

Gcc:gnu c Complier, C
g++:

Make: Project management tools,
Makefile: Defined make (gcc, g++) defines the order in which GCC compiles these source programs

Automake,-makefile.in-Makefile
autoconf,--Configure

100 selectable features,

Make install

Three steps to compile the installation:
Prerequisite: Preparing the development Environment (compilation environment)
Install "Development Tools" and "Development Libraries"

Tar
Cd
./configure
--help
--prefix=/path/to/somewhere
--sysconfdir=/path/to/conffile_path
Features: 1. Let the user select the compilation feature
2. Check the compilation environment

Make
Make install

Tar XF tengine-1.4.2.tar.gz
CD tengine-1.4.2
./configure--prefix=/usr/local/tenfine--conf-path=/etc/tengine/tenfine.conf
Make
Make install
/usr/local/tengine/sbin/nginx

1. Modify the PATH environment variable to be able to identify the binary file path of this program
Modify the/etc/profile file
In the/etc/profile.d/directory, create a file with a name suffix of. SH, which defines export path= $PATH:/path/to/somewhere
2. By default, the system searches the path of the library file/lib,/usr/lib, to add additional search paths
Create a file with a. conf suffix in/etc/ld.so.conf.d/, and then write the path you want to add directly to this file
Ldconfig Notification System re-search for library files
-V: The process of re-searching the library

3. header file: Output to System
Default:/usr/include
Add header file search path, use link to
/usr/local/tengine/include//usr/include
Two different ways:
Ln-s/usr/local/tengine/include/*/usr/include/or
Ln-s/usr/local/tengine/include/usr/include/tengine
4. Man file path: The man directory installed by default in the directory specified by--prefix:/usr/share/man

/etc/man.config has a path to define man search.
1. Man-m/path/to/man_dir COMMAND
2. Add a manpath in the/etc/man.config

Netstat command:
-R: Show routing Table
-N: Digital display

-T: TCP connection established
-u: Show UDP connections
-L: A connection that displays the listening state
-P: Displays the process number and process name of the process that listens for the specified socket

c Environment, C + +, Perl, Java, Python

linux--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.