Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and management program-theoretical explanation

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

[TOC]

Linux Application Foundation

Query RPM package information

Install, upgrade, uninstall, RPM software package yum repository, is the location of the program

Source code compilation and installation

(learn the basic language of java se later)

1: Linux Application Foundation 1.1: the relationship between the application and system commands the system commands the file location is generally in the / bin and / bin directories, or for the Shell internal instructions usually in the / usr/ and / usr/local directories to complete the basic management of the system, such as IP configuration tool (ifconfig) to complete other relatively independent auxiliary tasks, such as web browsers Tencent QQ application environment generally only runs in the character operation interface according to the actual needs. Some programs can run in the graphical interface. Generally, the format includes command words, command options and command parameters. Generally, the execution format relationship is independent and relatively independent. Multiple files support a task application 1.2: directory structure of a typical application.

-- prefix= "Custom installation" is compiled and installed manually

/ var/log log files are shared

1.3: common package encapsulation types

Rpm: automatic installation package, which compiles and encapsulates various operations of the installation process, which is suitable for beginners.

Deb: used in the ubuntu (interface) system, not in centos

​ digression: 1.LINUX family, the following Redhat, Red Hat three certifications (open source but not free, basic services free)

​ 2. Because of Red Hat, some people are unhappy, so there is a community (system developers, all bosses), who designed centos.

Centos is widely used in ​ servers, the government is not short of money, and more red hats are used.

​ has a client-oriented linux system, the ubuntu system (best used), open source, pure free, especially suitable for software developers.

​ is the best in the world, but not in China, because the Great Firewall is blocked.

​ 3.debian, the early version of linux, is the predecessor of the black map, and both the server and the client have functions, which later gave rise to the black map and kaili.

​ 4.kaili is a dedicated tool, including * *

​ kaili takes up very little resources and is usually installed in raspberry pie

​ 5.suse is a German linux system used by ISP operators (Telecom, Mobile, Unicom) customized version

Source code package: the original code, which people can understand

Jazz-class,class can't read it. It can be recognized by machines.

Green installation-free software package: can be used directly after decompression

1.4RPM package Management tool

Yum can solve the dependency of RPM.

Red is the name, version number, number of releases.

The first version is a large version, and the second is a small version.

The appearance of i386 and i686 represents a 32-bit system.

64-bit can support up to 2 tons of memory, and the bottleneck lies in reading and writing

Now we have an in-memory database, redis.

The server can only plug in a half-high display card.

Second, query RPM software package information 2.1: query installed RPM software information

Rpm-Q [suboption] [software name]

-Q to view basic information and whether to install

Common option

-qa to view installed software packages on the system

Grep filter filter

-qi to view details of installed software packages

-ql to view all the files installed by the package

-qf checks which package it belongs to according to the specified file

-qc to view all configuration files of the package (the first two of the configuration file suffixes conf,cnf,ini; are seen more often, and the file of PHP is inin)

-qd to view the documentation of the software package

2.2 query the information in uninstalled RPM package files

Rpm-qp [suboptions] RPM package file

Common option

-qpi to view the details of uninstalled packages

-qpl to view all files of uninstalled packages

-qpc to view all configuration files of uninstalled packages (the first two of the configuration files with the suffix conf,cnf,ini; are seen more often, and the files of PHP are inin)

-qpd to view the documentation of uninstalled packages

Install, upgrade, uninstall RPM package 3.1: install or upgrade RPM package

Install or upgrade RPM software

Rpm [options] RPM package file

Common option

-I install installation

-U update

-F

3.2Uninstall the specified RPM software

Rpm-e software name

-e uninstall

3.3 accessibility options

-- force Enforcement

-- nodeps solves dependency relationships (but basically useless)

-h friendly display (that is, display the installation progress bar with the # key)

-v displays detailed process information

Rpm-qd httpd view the documentation for the installation package for httpd

Yum remore httpd-y reinstall httpd

Rpm-ivh installation

Rpm-evh uninstall

Windows to do sharing

1. User and group configuration

two。 Local policy configuration

Turn on guest access

Security option

3. Advanced sharing Settings

4. Shared file properties

Smbclient-L / / 192.168.100.3 / enter the sharing center of the host

The final step: mount.cifs / / 192.168.100.3/rhel6 / mnt, mount the shared folder rhel6 to the mnt folder

View mount: df-h

Unmount: umount / mnt

3. 4: maintain RPM database

Init initialization means rebuild rebuilds database, database

Import verification public key-the meaning of import import, only for verification, no other function

Click on the virtual machine, record the video at this time, and how to mount the image file. In the lower right corner of cd, the virtual machine settings

If there is a green bright spot, it means that it is already running, and then mount it.

I was talking about shared file mounting.

Cd / dev/

Mout device name mount point (local directory)

Mount / dev/sr0 / mnt/

RPM-GPG-KEY-CentOS-7 is the public key

Packages software package

H friendly display reading bar

Double-click tab to display

Bind is a dns software package

View the configuration file of the software

Yum repositories can solve this dependency.

Yum warehouse is divided into two types, one is private network warehouse, public network warehouse (self-built warehouse, official warehouse), in the case of no network, build their own

Learn to build a private network warehouse today.

Yum list, check the public network warehouse when there is a network.

To avoid interaction is to agree in advance.

Build a local yum warehouse without the network.

Clear yum cache yum clean all

Cd / etc

Suffix is repo yum profile

Create a new bak directory and put the public network yum data in it.

Re-create a yum.repos.d file to write information

[abc] description information

Name=test 's name is test.

Path where the baseurl=file:///mnt package is located

Enabled=1 opens the software repository. 0 means not.

Gpgcheck=0 does not check the verification key. 1 is on. If it is enabled, the public key needs to be written again. To save trouble, you can just turn it off.

Save exit

Install bind,yum install bind-y

Install httpd yum install httpd-y

An error occurred. It may be that the package of the local image file is not complete, or a different version has been installed before.

To cancel the local yum repository, the idea is to delete the previously created files and restore them to the original path of the bak files.

Every time you switch the warehouse, you need to empty the yum cache yum clean all.

After connecting to the network, go to see the public network warehouse, yum list.

3.5 solution to package dependencies 1) when installing multiple software with dependencies

Dependent packages need to be installed first

Multiple .rpm package files can be specified at the same time to install 2) when uninstalling multiple software containing dependencies

Software packages that depend on other programs need to be uninstalled first

Multiple software names can be specified at the same time to uninstall 3) ignore the dependency combination "--nodeps" option, but may cause software exceptions

It is important to remember:

Common options for querying RPM software information using the rpm command

Common options for installing, upgrading, and uninstalling RPM packages using the rpm command

Directory structure of typical applications

Common package encapsulation type 4: source code compilation installation 4.1: source code compilation overview

1) advantages of using source code to install software

Get the latest software version and fix bug in time

Customize the software functions flexibly according to the needs of users

2) examples of applications

When installing a newer version of the application

When the currently installed program cannot meet the needs

When you need to add new features to your application

Source code installation mode can be regarded as iDIY mode. You can customize your own installation needs and operate according to the official release of the corresponding version of the software manual.

4.2: compile and install the source code package

1) Tarball packet

.tar.gz and .tar.bz2 formats are mostly

Software material reference: http://sourceforge.net

2) Integrity check

Md5sum check tool command

In addition, there is a zip package. The unzip decompression command-d specifies the location of the decompression.

Unzip package name-d extract to the specified path

Mount mount.cifs / / 192.168.100.3/rhel7 / abc

Yum install gcc gcc-c++ uses yum to automatically install the gcc gcc-c++ compiler

4.3: compile the installation process

4.4 four steps of manual compilation and installation (1) unpacking tar

1) habitually release software packages to the / usr/src/ directory

2) the location of the soft code file after unpacking:

/ usr/stc/ software name-version number /

3) instance

(2). / configure configuration

1) use the configure script in the source directory

2) execute ". / configure 00help" to view help

3) typical configuration options

-- prefix= software installation directory

4) exampl

(3) make compilation (make is the process of recompilation)

Execute the make command

(4) make installation

Execute the make install command

Example

Test, application and maintenance software after installation

Before use

Start Apa'che

Run lynx 127.0.0.1 to view the running status of native Apache

Httpd.conf httpd profile

Apachectl start

Manual compilation and installation steps summary 1: find the source code package

Mount it first, and find the compressed package to be installed in the host shared directory (mount the host rhel6 to the abc folder)

2: decompress the source package to the specified location

3:configure configuration

4:make compilation

First install the environment package, that is, the compiler and other related software

The language in which pcre acts on web pages

Zlib is the image transmission of web page compression processing.

There may be some error reporting problems: environment package problems, configuration format issues, functional aspects (software version, whether support features)

5:make installation

Make install command

Optimization after installation, that is, testing, application and maintenance software

1: find the service profile and modify the feature conf configuration file

Modify the IP address (if there is a # key in front of each line, it represents a comment line and does not function. If you want to function, uncomment the # key)

Open the port

Check whether the corresponding port 80 is enabled

Turn off the firewall

Htdocs web page directory, including home page index

Open the previously entered ip address

It cannot be displayed in Chinese because the conversion is not enabled.

2: find the service startup script, and the startup service can be directly managed by systemctl or service

For example: service network restart / etc/init.d/network

​ systemctl restart network.service / lib/systemd/system/network.service

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report