当前位置:网站首页>Three software installation methods
Three software installation methods
2022-06-30 07:29:00 【My deep blue】
Three software installation methods
Source package installation
shortcoming : Need to install c Language library
To install the source package, you need to install the compiler :
yum install -y gcc gcc-c++ make
- gcc yes GNU Compiler Collection( Namely GNU Compiler Suite ), You can also think of it as a compiler , It can compile many programming languages ( enclosed C、C++、Objective-C、Fortran、Java wait ).
- When your program has only one source file , It can be used directly gcc Command to compile it .
- But when your program contains many source files ,make Tools can be seen as an intelligent batch tool , It doesn't compile and link itself , But in a way similar to batch processing — By calling makefile The command specified by the user in the file is used for compiling and linking .
- make Tools are based on makefile The commands in are compiled and linked .,makefile The command contains the call gcc( It can also be another compiler ) The command to compile a source file .
3. But when your program contains many source files ,
Recommended installation location :/usr/local
- Installation steps
- Download the source code installation package
- decompression
- And enter
- make compile
make install Compilation and installation
RPM install
shortcoming : Can't resolve dependencies , Like installation a Software , You have to install b Software ,c Software
Only with the installation package
- RPM Package installation location
route | meaning |
---|---|
/etc/ | Profile installation directory |
/usr/bin/ | Executable command installation directory |
/usr/lib/ | The storage location of the function library used by the program |
/usr/share/doc/ | Basic software user manual storage location |
/usr/share/man/ | Help file save location |
- RPM command :
rpm
Parameters
-i: Install package
-q: Query package , and -a Use together to list all packages installed
-e: Remove package
-U: Upgrade an installed software package
-V: Verify the installed packages
-h: Show installation progress bar
--nodeps : Don't check dependencies
Use a combination of
-ivh: install
-Uvh: upgrade
-qa: Inquire about
-e: uninstall
Yum install
redhat Held by the installation RMP Package tools ,centOS Free trial ,redhat Need to pay
- yum Common commands for package operation :
1. Use YUM Find package
command :yum search
2. List all installable packages
command :yum list
3. List all updatable packages
command :yum list updates
4. List all installed packages
command :yum list installed
5. List all installed but not in Yum Repository Software package in
command :yum list extras
6. List the specified packages
command :yum list
7. Use YUM Get package information
command :yum info
8. List all package information
command :yum info
9. List all updated package information
command :yum info updates
10. List all installed packages
command :yum info installed
11. List all installed but not in Yum Repository Package information in
command :yum info extras
12. List which files the package provides
command :yum provides
Create your own warehouse
View the warehouse provided by the system ( To use these warehouses, you must have access to the Internet )
ls /etc/yum.repos.d/
1.、 Create directory , As a warehouse
cd /etc/yum.repos.d/
mkdir myyum
2.、 Move the items in the system warehouse to the warehouse we created
mv CentOS* myyum/
3、 Write warehouse information
cd /etc/yum.repos.d/
vi myyum.repo// The only suffix to be written on the system , Represents that this directory is a warehouse
In this file, write 5 That's ok Left and right .
- [name]
name Is to fill in the name of the warehouse
- name = It is yum cdrom
It is yum cdrom Is a description of this file
- baseurl= file:// / The path to the package
The location of the software package , It can be file, ftp, http .
- enable=1
1 Indicates that the path is available ,0 Means not available
- gpgcheck=0
Whether to carry out gpg Check , Do not check by default , If checking, import the public key and private key
4、 eliminate 、 Check the warehouse
yum clean all // clear yum Source cache
yum repolist // check check yum Source
yum list // see yum Files in the source
5、 Start installation
yum search Package name // Search package
yum install Package name // Install package
yum remove Package name // Remove package
To minimize the Linux Install some common software ( Need to restart )
yum install vim -y // install vim Editor -y Default consent that requires consent
yum install bash-completion // Install the automatic replenishment command
Linux Service management
Service classification
- Query installed services
1、RPM Package installation services :
service --status -all // You can see rpm All service status ( Red hat )
chkconfig -list // View the status of all self starting Services
2、 Source code package installation service :
View the service installation location , It's usually /usr/local/ Next
RPM Package installation services
1、 Independent service
/etc/init.d/: Start script location J
/etc/sysconfig/: Initialize environment profile location
/etc/: Profile location
/etc/xinetd.conf:xinetd The configuration file
/etc/xinetd.d/: be based on xinetd Service startup script
/var/lib/: The data generated by the service is placed here
/var/log/: journal
- Start of independent service
/etc/init.d/ Independent service name start|stop|status|restart|
- Self start of independent service
1、chkconfig [- -level Operation level ] [ Independent service name ] [ on | off ] ([ ] Delegates can choose )
2、 modify /etc/rc.d/rc.local file
3、 Use ntsysv Command management starts itself
2、 be based on xinetd service
- install xinetd And telnet
less and less
yum -y install xinetd
yum -y install telnet-server
Source code package service
1、 Startup of source package installation service
Using absolute paths , Call the startup script to start . Different source packages have different startup scripts . You can view the installation instructions of the source package , See how to start the script .
/usr/local/apache2/bin/apachectl start | stop
2、 Self start of source package service
vi /etc/rc. d/rc. local
Join in
/usr/local/apache2/bin/apachectl start
边栏推荐
- Vs2019 and SQL
- Examen final - notes d'apprentissage PHP 6 - traitement des chaînes
- QT elementary notes
- Stm32g0 Tim interrupt use
- Qtcreator debug code after configuring CDB debugger view variable value display card
- Idea running run and services
- Utilisation de la commande grep
- How to quickly delete routing in Ad
- 网络安全-VLAN和Tunk方法详解
- 模拟接口没声明异常抛出异常
猜你喜欢
Go common commands
Swiftui creates a beautiful custom press feedback button
Final review -php learning notes 6- string processing
C language implements sequential queue, circular queue and chain queue
视频播放器(一):流程
Mailbox application routine of running wild fire RT thread
The most convenient serial port screen chip scheme designed at the charging pile in China
Introduction to ecostruxure (1) IEC61499 new scheme
年轻人搞副业有多疯狂:月薪3000,副业收入3W
Nested if statement in sum function in SQL Server2005
随机推荐
Can introduction
halcon:读取摄像头并二值化
Connection flood attack principle
Write and run the first go language program
Is it safe to open a stock account by mobile phone? What do I need to prepare for opening an account?
Stm32g0 Tim interrupt use
年轻人搞副业有多疯狂:月薪3000,副业收入3W
期末复习-PHP学习笔记6-字符串处理
Examen final - notes d'apprentissage PHP 6 - traitement des chaînes
Raspberry pie 4B Getting Started Guide
Detailed analysis of message signals occupying multiple bytes and bits
C51 minimum system board infrared remote control LED light on and off
Install go language development tools
手机开户股票开户安全吗?开户需要准备什么?
Qtcreator debug code after configuring CDB debugger view variable value display card
线程池——C语言
[implemented] server jar package startup script and shell script
单测调用对象的私有方法
Next initializesecuritycontext failed: unknown error (0x80092012) - the revocation function cannot check whether the certificate is revoked.
TC397 QSPI(CPU)