In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
We know that a program is a set of instructions plus data, or a collection of algorithms plus data structures. The application exists in the form of source code and binary: the source code is a text file that contains all the code of the programming language of the entire application; binary is a file that can be executed directly after a series of conversion operations.
The steps to install an application using source code are as follows: preprocessing (preprocessor)-> compiling (compiler)-> bytecode-> assembly (assembler)-> link (linker)-> binary program files that can be executed directly. When we use source code to install applications, the same applications installed by the same operations of different operating systems may not be used if they are directly used on another operating system, but if the different operating systems of the two hosts have POSIX interface standards, they can be used directly.
The package manager installs, uninstalls, upgrades, queries and verifies programs in the development system. Different linux distributions have different package managers: Debian: dpt (Debian Package Toolkits), dpkg tool, package file with .deb suffix name; RdeHat: rpm (Redhat Package Manager), rpm tool, package file with .rpm suffix name; S.u.s.e: rpm, etc. Rpm became the industry standard for linux's package manager; rpm was written by perl and later rewritten rpm in C.
When making rpm packages, its makers usually use subcontracting technology to build rpm packages, or build multiple packages according to the different functions of the program. The subcontracted package is divided into the main package and the ancillary function package. The main package and the ancillary package have the same version number, release number, operating system, and compatible platform identification, just an additional feature. Therefore, the main package is often relied on by all the ancillary feature packages, which cannot be installed without installing the main package.
For naming rpm packages, source packages and binary packages are named differently: source packages: software_name-VERSION.src.rpm; binary packages: software_name-VERSION- [release]. [os] .arch.rpm.
A list of the files in the rpm package:
1. The file of the program
two。 List of documents
3. Script files that run when the software is installed or uninstalled: divided into four categories
1) preinstall: script run before the formal installation operation begins,% pre
2) postinstall: script executed after installation,% post
3) preuninstall: script run before the official uninstall operation starts,% preun
4) postuninstall: script executed after the uninstall is complete,% postun
You usually use rpm or yum tools to install rpm packages on your computer. Rpm command line tools can install, uninstall, upgrade (downgrade), query, file verification, verification, database maintenance operations. The common option in rpm is-v: displays information about the installation history, showing only the name of the installation software;-vv displays very detailed operation information.
Installation in rpm: rpm {- I |-- install} [install-options] PACK-AGE_FILE...
Install-options:
-hmam Murray hash: use 50 # to indicate the installation progress.
-- test: it's not really about installing the package, it's just testing whether it can be done properly during installation, dry run mode
-- nodeps: ignore installation errors caused by dependencies and are not recommended
-- replacefiles: replace files: when you install a software package, the files in the package will directly replace the files that were originally installed
-- replacepkgs: replace the package: reinstall without uninstalling the package
-- noscripts: do not run any scripts
-- nosignature: regardless of whether the source of the package is legitimate
-- nodigest: regardless of whether the package is complete
Upgrade operation in rpm: rpm-U [install-options] +
If you choose to install a package that is not installed in advance, you can install it completely, and if you have already installed the old version, you can upgrade the installation
Rpm [- F |-- freshen] [install-options] +
Only low-version packages that have been installed can only be upgraded and installed
Common options: same as installation
-- oldpackage: replace the new version of the package with the old version
-- force mandatory upgrade
Note: do not upgrade the kernel, linux can support multiple kernels, you can install a new version of the kernel directly, and it can be replaced manually in the startup interface; upgrading the installation may bring about changes in files, so the system default will not directly change the previously installed program configuration file, the configuration file in the new package will be renamed, usually: FINENAME.rpmnew
Uninstall operation in rpm: rpm {- e |-- erase} [--allmatches] [--nodeps]
-- allmatchs: all versions of packages that match the given name will be uninstalled
-- nodeps: ignore dependencies when uninstalling. It is not recommended to use
-- test: just test the uninstall, dry run mode
Query operation in rpm: rpm {- Q |-- query} [select-options] [query-options]
Give the package name directly
-amam Meltel all queries the names of all installed packages
-fmaine Murray file FILE to find which package the specified file is provided by
-pmam Murray package PACKAGE_FILE performs query operations on package files that have not yet been installed
[--whatprovides CAPABILITY] query which package provides the specified CAPBILITY
[--whatrequires CAPABILITY] query which package the specified CAPBILITY is dependent on
Query-options
[--changelog] query the changelog of the rpm package
-crecom _ copyright _ configfiles query which configuration files are in the specified package.
-dmine _ color _ docfiles query which document files are in the specified package
-imam Musi info query package-related information, including version number, release number, size, etc.
The list of lmmam Meltel list shows which files will be generated by the package installation.
-- provides lists all the CAPABILITY provided by the development package
-Rmaine Mustang: query the dependencies of the specified package
-- scripts: view the contents of the scripts carried by the package
Rpm check operation: rpm-V file name; used to confirm whether the file has been modified or overwritten, if changed, there is a series of output in the standard output, otherwise there is no output.
Rpm database management operations: initialization and reconstruction of the database, the database is located in / var/lib/rpm. -- dbpath specifies the database location,-- rebuilddb rebuilds the database,-- initdb initializes the database.
When using rpm package management tools, we always encounter dependency problems, which makes it troublesome to install a required software package, so yum is developed to solve this malpractice.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.