当前位置:网站首页>安装及管理程序
安装及管理程序
2022-04-23 16:25:00 【qjwthink】
本章结构
源代码编译安装
Linux应用程序基础
应用程序与系统命令的关系
| 角色 | 系统命令 | 应用程序 |
| 文件位置 | 一般在/bin和/sbin目录中,或为Shell内部指令 | 通常在/usr/bin和/usr/sbin目录中 |
| 主要用途 | 完成对系统的基本管理工作,例如IP配置工具 | 完成相对独立的其他辅助任务,例如网页浏览器 |
| 适用环境 | —般只在字符操作界面中运行 | 根据实际需要,有些程序可在图形界面中运行 |
| 运行格式 | —般包括命令字、命令选项和命令参数 | 通常没有固定的执行格式 |
典型应用程序的目录结构
| 文件类型 | 保存目录 |
| 普通执行程序文件 | /usr/bin |
| 服务器执行程序文件和管理程序文件 | /usr/sbin |
| 应用程序配置文件 | /etc |
| 日志文件 | /var/log |
| 应用程序参考文档文件 | /usr/share/doc |
| 应用程序手册页文件 | /usr/local/share/man |
常见的软件包封装类型
| 文件类型 | 保存目录 |
| RPM软件包 | 扩展名为“.rpm" |
| DEB软件包 | 一般为".tar.gz" 、 ".tar.bz2”等格式的压缩包 |
| 源代码软件包 | 一般为".tar.gz" 、 ".tar.bz2”等格式的压缩包 包含程序的原始代码 |
| 绿色免安装的软件包 | 软件包的扩展名不一,以TarBall格式的居多 在压缩包内提供已编译好的执行程序文件解开压缩包后的文件即可直接使用 |
RPM 软件包管理工具
RPM 包管理工具
Red-Hat Package Manager
由red hat 公司提出,被众多Linux发行版所采用
建立统一的数据库文件
详细记录软件包安装、卸载等变化信息
自行分析软件包依赖关系
RPM软件包
软件素材参考:http://www.rpm.org
一般命名格式:

Mount 挂载 你的包是在你的光驱里并没有放在系统中
光盘的包我只有先挂载我都系统
一切皆文件 硬件不可能是文件那我就用不了了
什么是挂载
就是将硬件比如硬盘光驱挂载在目录下使用,将他变成文件
就好比你的档案相当于系统中的数据,而你的档案(硬件设备)是gz
示例:
![]()

rpm命令格式
rpm命令能够实现几乎所有对rpm软件包的管理功能
执行“man rpm”命令可以获得关于rpm 命令的详细帮助信息
rpm命令功能
查询、验证RPM软件包的相关信息
安装、升级、卸载RPM软件包
维护RPM数据库信息等综合管理操作
查询RPM软件包信息
查询已安装的RPM软件信息,示例:
rpm -q[子选项][软件名]
常用选项
-qa当前系统所有已安装的软件包
-qi详细信息
-ql指定软件目录文件列表
-qc已安装软件的配置文件
-qd已安装软件的配置文档
-qf反向查看程序的安装包
查询未安装的RPM软件包文件中信息
rpm -qp[子选项] RPM包文件
常用选项
-qpi、-qpl、-qpc、-qpd
差图

维护RPM数据库
重建RPM数据库,命令
[root@localhost ~]# rpm --rebuilddb或
[root@localhost ~]# rpm --initdb
导入验证公钥
[root@localhost ~]# rpm --import /medialcdrom/RPM-GPG-KEY-CentOS-7
解决软件包依赖关系方法
1、安装有依赖关系的多个软件时
(1)被依赖的软件包需要先安装
(2)可同时指定多个.rpm包文件进行安装
2、卸载有依赖关系的多个软件时
(1)依赖其他程序的软件包需要先卸载
(2)可同时指定多个软件名进行卸载
3、忽略依赖关系
(1)结合“--nodeps”选项,但可能导致软件异常
本地源的搭建
yum是rpm的升级版软件、它可以帮你把依赖关系都装了
yum的配置文件

本地源的搭建
1、切换到/etc/yum.repos.d

2、为了防止网络文件影响本地文件, 新建一个文件夹,移走yum.repos.d 源文件

3、新建.repo,在里面输入以下内容

4、把/dev/sr0挂载到mnt上
![]()
4、安装dhcp


5、关闭防火墙
setenforce 0
关闭 selinux 一种系统安全保护
systemctl stop firewalld.service
关闭防火墙功能
版权声明
本文为[qjwthink]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qjwthink/article/details/120092478
边栏推荐
- Filter usage of spark operator
- Hyperbdr cloud disaster recovery v3 Release of version 3.0 | upgrade of disaster recovery function and optimization of resource group management function
- Sail soft segmentation solution: take only one character (required field) of a string
- What is homebrew? And use
- Government cloud migration practice: Beiming digital division used hypermotion cloud migration products to implement the cloud migration project for a government unit, and completed the migration of n
- 阿里研发三面,面试官一套组合拳让我当场懵逼
- Install redis and deploy redis high availability cluster
- JSP learning 1
- VIM uses vundle to install the code completion plug-in (youcompleteme)
- Redis "8" implements distributed current limiting and delay queues
猜你喜欢

Day (9) of picking up matlab

Day (7) of picking up matlab

Summary according to classification in sail software

Unity shader learning

MySQL - MySQL查询语句的执行过程

Six scenarios of cloud migration

Hypermotion cloud migration helped China Unicom. Qingyun completed the cloud project of a central enterprise and accelerated the cloud process of the group's core business system

Questions about disaster recovery? Click here

How important is the operation and maintenance process? I heard it can save 2 million a year?

Groupby use of spark operator
随机推荐
Algorithem_ ReverseLinkedList
Install redis and deploy redis high availability cluster
Sail soft implements a radio button, which can uniformly set the selection status of other radio buttons
Gartner 发布新兴技术研究:深入洞悉元宇宙
Hypermotion cloud migration helped China Unicom. Qingyun completed the cloud project of a central enterprise and accelerated the cloud process of the group's core business system
Read the meaning of serial port and various level signals
Construction of esp32 compilation environment
Coalesce and repartition of spark operators
欣旺达:HEV和BEV超快充拳头产品大规模出货
You need to know about cloud disaster recovery
Ali developed three sides, and the interviewer's set of combined punches made me confused on the spot
Gartner publie une étude sur les nouvelles technologies: un aperçu du métacosme
Sortby use of spark operator
JSP learning 1
ESP32_ Arduino
Day (3) of picking up matlab
Unity Shader学习
Detailed explanation of gzip and gunzip decompression parameters
logback的配置文件加载顺序
Upgrade MySQL 5.1 to 5.610