当前位置:网站首页>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
边栏推荐
- Network security - packet capture and IP packet header analysis
- Adjacency matrix representation of weighted undirected graph (implemented in C language)
- Linu foundation - zoning planning and use
- Raspberry pie 4B Getting Started Guide
- The class imported by idea import clearly exists, but it is red?
- Stm32g0 Tim interrupt use
- Stm32g0 and FreeRTOS learning summary
- Go common commands
- 大学刚毕业不知道做什么工作怎么办?
- LabVIEW程序代码更新缓慢
猜你喜欢
The maximum expression in Oracle database message list is 1000 error
大学刚毕业不知道做什么工作怎么办?
FreeRTOS timer group
C language - student achievement management system
Dynamic memory management
系统软件开发基础知识
Resolution: div failed to get keyboard event
Assembly learning register
[most complete] install MySQL on a Linux server
Raspberry pie 4B Getting Started Guide
随机推荐
4diac getting started example
[solved] failed! Error: Unknown error 1130
视频播放器(一):流程
Final review -php learning notes 6- string processing
Record the problem that the system file cannot be modified as an administrator during the development process
Cmake generate map file
Raspberry pie trivial configuration
uniapp图片下方加标签标图片
What does the real name free domain name mean?
Network security - packet capture and IP packet header analysis
Ad\dxp how to solve the problem of not knowing the schematic Library
grep命令用法
next InitializeSecurityContext failed: Unknown error (0x80092012) - 吊销功能无法检查证书是否吊销。
How crazy are young people in sideline industry: 3000 monthly salary and 3W sideline income
QT common macro definitions
RT thread kernel application development message queue experiment
Basic knowledge of system software development
Experiment 1: comprehensive experiment [process on]
QT wmic command obtains some hardware information
grep命令用法