linux 安装与卸载软件

Linux安装软件有三种方式

  • rpm 工具
  • yum 工具
  • 源码包 “源代码,通过编译器编译成可执行的文件”

rpm工具使用

首先在vmw 中把光盘连接到Linux中 然后进行光盘挂载

[root@localhost ~]# df -h "查看已挂载磁盘的总容量,并已合适的单位显示 h为GB, 目的是为了查看是不是已挂载“
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda3 18G 1.1G 17G 6% /
devtmpfs 489M 0 489M 0% /dev
tmpfs 494M 0 494M 0% /dev/shm
tmpfs 494M 6.7M 487M 2% /run
tmpfs 494M 0 494M 0% /sys/fs/cgroup
/dev/sda1 197M 75M 123M 38% /boot
挂载
[root@localhost ~]# mount /dev/cdrom /mnt
mount: /dev/sr0 写保护,将以只读方式挂载
rpm包格式
包名 版本号 发行版本号、平台
linux 安装与卸载软件
rpm包安装
-i 表示安装 -v 表示可视化安装 -h 表示显示进度安装

rpm -ivh /包名 表示安装
[root@localhost Packages]# rpm -ivh zsh-5.0.2-7.el7.x86_64.rpm
准备中... ################################# [100%]
正在升级/安装...
1:zsh-5.0.2-7.el7 ################################# [100%]
** rpm -Uvh 包名 :升级
[root@localhost Packages]# rpm -Uvh zsh-5.0.2-7.el7.x86_64.rpm
准备中... ################################# [100%]
软件包 zsh-5.0.2-7.el7.x86_64 已经安装

rpm -e 包名 /卸载
[root@localhost Packages]# rpm -e zsh

rpm -qa 查询安装地包
[root@localhost Packages]# rpm -qa
biosdevname-0.5.0-10.el7.x86_64
centos-release-7-0.1406.el7.centos.2.3.x86_64
openssh-server-6.4p1-8.el7.x86_64
filesystem-3.2-18.el7.x86_64
parted-3.1-17.el7.x86_64
ncurses-base-5.9-13.20130511.el7.noarch
selinux-policy-targeted-3.12.1-153.el7.noarch

rpm -q 包名 查询已安装的包
[root@localhost Packages]# rpm -q ppp
ppp-2.4.5-33.el7.x86_64

rpm -qi 包名 查询指定包信息
[root@localhost Packages]# rpm -q ppp
ppp-2.4.5-33.el7.x86_64
[root@localhost Packages]# ^C
[root@localhost Packages]# rpm -qi ppp
Name : ppp
Version : 2.4.5
Release : 33.el7
Architecture: x86_64
Install Date: 2017年12月28日 星期四 06时49分55秒
Group : System Environment/Daemons
Size : 872624
License : BSD and LGPLv2+ and GPLv2+ and Public Domain
Signature : RSA/SHA256, 2014年07月04日 星期五 12时34分15秒, Key ID 24c6a8a7f4a80eb5
Source RPM : ppp-2.4.5-33.el7.src.rpm
Build Date : 2014年06月10日 星期二 14时27分03秒
Build Host : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org&gt;
Vendor : CentOS
URL : http://www.samba.org/ppp
Summary : The Point-to-Point Protocol daemon
Description :
The ppp package contains the PPP (Point-to-Point Protocol) daemon and
documentation for PPP support. The PPP protocol provides a method for
transmitting datagrams over serial point-to-point links. PPP is
usually used to dial in to an ISP (Internet Service Provider) or other
organization over a modem and phone line.

[root@localhost Packages]# rpm -q ppp
ppp-2.4.5-33.el7.x86_64
[root@localhost Packages]# ^C
[root@localhost Packages]# rpm -qi ppp
Name : ppp
Version : 2.4.5
Release : 33.el7
Architecture: x86_64
Install Date: 2017年12月28日 星期四 06时49分55秒
Group : System Environment/Daemons
Size : 872624
License : BSD and LGPLv2+ and GPLv2+ and Public Domain
Signature : RSA/SHA256, 2014年07月04日 星期五 12时34分15秒, Key ID 24c6a8a7f4a80eb5
Source RPM : ppp-2.4.5-33.el7.src.rpm
Build Date : 2014年06月10日 星期二 14时27分03秒
Build Host : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org&gt;
Vendor : CentOS
URL : http://www.samba.org/ppp
Summary : The Point-to-Point Protocol daemon
Description :
The ppp package contains the PPP (Point-to-Point Protocol) daemon and
documentation for PPP support. The PPP protocol provides a method for
transmitting datagrams over serial point-to-point links. PPP is
usually used to dial in to an ISP (Internet Service Provider) or other
organization over a modem and phone line.

rpm -ql 包名 // 列出包安装地文件
rpm -qf 文件绝对路劲 //查看文件是由哪个包安装
[root@localhost Packages]# rpm -qf which cd
bash-4.2.45-5.el7.x86_64

yum 工具
yum list 列出可用的rpm包

yum search [相关关键词] 搜索rpm 包

yum install -y [rpm包] 安装rpm包

yum remove -y [rpm] 卸载rpm包

yum update -y [rpm] 升级rpm包

yum provides "//vim" 搜素

yum 本地仓库

转载于:https://blog.51cto.com/12947851/2058330

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值