当前位置:网站首页>安装及管理程序
安装及管理程序
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
边栏推荐
- 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
- [pyGame games] how did angry birds, a mobile game that became popular all over the world 10 years ago, dominate the list? Classic return
- What does cloud disaster tolerance mean? What is the difference between cloud disaster tolerance and traditional disaster tolerance?
- Redis "8" implements distributed current limiting and delay queues
- Cloudy data flow? Disaster recovery on cloud? Last value content sharing years ago
- linux上启动oracle服务
- The biggest winner is China Telecom. Why do people dislike China Mobile and China Unicom?
- MySQL的btree索引和hash索引区别
- 05 Lua 控制结构
- 保姆级Anaconda安装教程
猜你喜欢
TIA博图——基本操作
Nanny Anaconda installation tutorial
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
Force buckle - 198 raid homes and plunder houses
Countdown 1 day ~ 2022 online conference of cloud disaster tolerance products is about to begin
Day 9 static abstract class interface
Distinct use of spark operator
Interview question 17.10 Main elements
Sail soft calls the method of dynamic parameter transfer and sets parameters in the title
Groupby use of spark operator
随机推荐
最详细的背包问题!!!
Day (3) of picking up matlab
Qipengyuan horizon credible meta universe social system meets diversified consumption and social needs
Research and Practice on business system migration of a government cloud project
Construction of esp32 compilation environment
Download and install mongodb
Using JSON server to create server requests locally
Postman batch production body information (realize batch modification of data)
一文读懂串口及各种电平信号含义
Gartner announces emerging technology research: insight into the meta universe
Day 10 abnormal mechanism
Win11 / 10 home edition disables the edge's private browsing function
Vim使用Vundle安装代码补全插件(YouCompleteMe)
Sortby use of spark operator
Jour (9) de ramassage de MATLAB
第十天 异常机制
Interview question 17.10 Main elements
Cloud migration practice in the financial industry Ping An financial cloud integrates hypermotion cloud migration solution to provide migration services for customers in the financial industry
TIA博图——基本操作
Compile, connect -- Notes