天天看點

linux 安裝與解除安裝軟體

Linux安裝軟體有三種方式

rpm 工具

yum 工具

源碼包 “源代碼,通過編譯器編譯成可執行的檔案”

rpm工具使用

首先在vmw 中把CD光牒連接配接到Linux中 然後進行CD光牒挂載

[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

軟體包 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]# ^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)

Vendor : CentOS

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 <code>which cd</code>

bash-4.2.45-5.el7.x86_64

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 本地倉庫

<b>本文轉自 yzllinux 51CTO部落格,原文連結:http://blog.51cto.com/12947851/2058330,如需轉載請自行聯系原作者</b>

繼續閱讀