linux中的软件管理
来源:互联网 发布:淘宝金丝绒裙子 编辑:程序博客网 时间:2024/06/09 14:15
软件安装:
一.软件名称识别
[wps-office] 表示软件名称
[10.1.0.5672-1] 表示软件版本
a21 表示软件适用系统
[x86_64] 表示软件适用于64位系统
rpm结尾的适用与redhat操作系统
mount /iso/rhel-server-7.2-x86_64-dvd.iso /rhel7.2/ ##将镜像挂载到/rhel7.2里边
二.如何安装软件
1)rpm:(底层安装指令,适用于所有环境,仅发现发现依赖性) --nodeps (忽略依赖性) --force 强制安装,一般适用于第二次安装或更新
依赖性是指安装一个软件后,在其运行过程中必须的软件。
软件卸载 依赖性不会卸载,安装时再次安装,卸载只能手动卸载
rpm -ivh name.rpm 安装 ,-v显示过程,-h指定加密方式为hash
-e name 卸载
-qlp name.rpm 查询软件安装后会生成什么文件
-qa 查询系统中安装的所有软件名称
-qa |grep name 查询软件是否安装
-q name
-qp name.rpm 查询软件安装包安装后的名字
-qf filename 查看filename属于那个安装包
-ivh name.rpm --force 强制安装,但不能忽略依赖性
-ivh name.rpm --nodeps --force 忽略依赖性并且强制安装
-qi name 查看软件信息
-Kv name.rpm 检测软件包是否被篡改
-qp name.rpm --scripts 检测软件在安装或卸载过程中执行的动作
2.yum
yum
上层软件管理工具,最重要的功能是可以解决软件的依赖关系
yum能够投入使用的前提是必须要有yum源,以及配置源的指向文件
server源端
1.从网络上下本机系统版本匹配的iso镜像文件
rhel-server-7.1-x86_64-dvd.iso
2.把rhel-server-7.1-x86_64-dvd.iso挂在到/mnt以便访问镜像中的文件
mount rhel-server-7.1-x86_64-dvd.iso /mnt
3.配置本机yum源指向
rm -fr /etc/yum.repos.d/*
vim /etc/yum.repos.d/yum.repo
[Server]
name=rhel7.1
baseurl=file:///mnt
gpgcheck=0
4.安装资源共享服务
yum install httpd -y
systemctl stop firewalld
systemctl disable firewalld
systemctl start httpd
systemctl enable httpd
5.建立共享目录,并挂在镜像文件到共享目录上
mkdir /var/www/html/rhel7.1
umount /mnt
mount rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.1
6.测试
在浏览器中输入:http://本机ip/rhel7.1
可以看到镜像中的内容
7.修改本机yum源指向
[server]
name=rhel7.1
baseurl=file:///var/www/html/rhel7.1
gpgcheck=0
8.开机自动挂在iso
vim /etc/rc.d/rc.local
mount rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.1
:wq
chmod +x /etc/rc.d/rc.local
9.第三方软件仓库的搭建
把所有的rpm软件包放到一个目录中,这个目录中只能存在rpm文件
createrepo -v /rpm存放目录(扫描目录)
vim /etc/yum.repos.d/xxx.repo
[Software]
name=software
baseurl=file:///rpm存放目录
gpgcheck=0
client指向端
vim /etc/yum.repos.d/xxxx.repo ##仓库指向文件位置
[xxxx] ##自定义软件仓库名称
name=xxxx ##自定义软件仓库描述
baseurl=ftp://|http://|file:// ##仓库位置
gpgcheck=0 ##不检测gpgkey
##gpgkey表示软件的出品logo
例子:
vim /etc/yum.repos.d/yum.repo
[Server]
name=rhel7.1
baseurl=ftp://172.25.0.254/pub/rhel7.1
gpgcheck=0
:wq
yum clean all ##清空yum缓存识别新配置
yum命令
yum install softwarename ##安装
repolist 列出设定yum源信息
list softwarename ##查看软件源中是否有此软件
list all ##列出所有软件名称
list available ##列出可以用yum安装的软件名称
clean all 清空yum缓存
search softwareinfo ##根据软件信息搜索软件名字
whatprovides filename ##在yum源中查找包含filename文件的软件包
update ##更新软件
history ##查看系统软件改变历史
reinstall softwarename ##重新安装
info softwarename ##查看软件信息
groups list ##查看软件组信息
groups info softwaregroup ##查看软件组内包含的软件
groups install softwaregroup ##安装组件
groups remove softwaregroup ##卸载组件
- linux中的软件管理
- Linux中的软件管理
- linux中的软件管理
- Linux中的软件管理
- linux中的软件管理
- linux中的软件管理
- Gentoo中的软件管理
- linux下软件管理
- linux软件管理方式
- LINUX管理、安装软件
- linux 软件管理命令
- linux笔记 - 软件管理
- Linux软件管理
- Linux软件管理基础
- linux下软件管理
- linux 软件管理
- Linux软件安装管理
- Linux---软件安装管理
- 智力题小总结
- ArrayList 和 LinkList 的区别
- UOJ#10 【UTR #1】pyx的难题
- Matlab调试小技巧之Function Call Stack
- JAVA中Method类invoke方法实例
- linux中的软件管理
- 【JAVA_SE学习笔记】String、StringBuffer和StringBuilder
- 徐登沿的第二个程序(三位数的输出)
- Android系统版本与API等级对应关系表
- 实用的maven编译报错解决办法
- String 类型不可变 如何理解?
- Material Design之侧滑
- 给UITabbar 添加 红色badge数字提醒和红点提醒
- [随便扯几句] 关于数据结构