- 浏览: 960766 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
孤星119:
好熟悉的数据库字段啊, 上家公司做的项目每天都跟这些字段打招呼 ...
Oracle exp compress参数引起的空间浪费 -
itspace:
quxiaoyong 写道遇到个问题,网上一搜,全他妈这篇文章 ...
数据库连接错误ORA-28547 -
quxiaoyong:
遇到个问题,网上一搜,全他妈这篇文章。你转来转去的有意思吗?
数据库连接错误ORA-28547 -
hctech:
关于version count过高的问题,不知博主是否看过ey ...
某客户数据库性能诊断报告 -
itspace:
invalid 写道写的不错,我根据这个来安装,有点理解错误了 ...
AIX 配置vncserver
安装rpm包十分便捷,省去了很多编译过程,但是很多情况下,我们需要知道rpm包解压之后文件安装路径。
首先看一下rpm包的命名规则,如有一rpm包名字为ncurses4-5.0-5.i386.rpm,
其命名规则为
<name>-<version>-<release>.<arch>.rpm
o <name> is the name of the program or package. The <name> is
usually assigned by the program's author. In our example, the
developers decided to name their product "bash" for reasons that
seemed amusing to them.
o <version> identifies which edition of the software this RPM
contains. The <version> number is assigned by the program's
author. Using the <version> number allows one to determine which
version of the author's sources were used to generate the RPM.
o <release> provides the edition number of the RPM file itself and
not the version of the author's source files. An updated RPM may
be issued to supply a patched version of the author's original
software. The patch need not have come from the original
developer, so the RPM <release> gets incremented instead of the
<version>.
Remember: the <version> is controlled by the original author and
the <release> is controlled by whomever constructed the RPM.
o <arch> describes the contents of the RPM and tells whether this
file contains the product source (a ".src.rpm"),
architecture-independent files (a ".noarch.rpm"), or files which
may only be installed on a particular host type (a ".sh.rpm" will
work only on a STRONGHOLD embedded processor).
以下就是一些关于rpm包的一些操作命令。
1、查看rpm包是否安装:
2、卸载rpm包
3、安装rpm包
4、以升级模式安装rpm包
5、查看rpm包安装路径,注意这里使用的是绝对路径
以下命令使用的是相对路径
6、解压rpm包文件至某个文件夹下,这里使用的是相对路径
当然了,我们也可以解压,单个文件至某一文件夹下
这里解释一下几个参数
In this case, the options "-i", "-v", and "-d" direct cpio(1) to:
-i Extract one or more files from an archive. The filename(s)
requested must match the "cpio -t" table of contents
exactly, or a shell-like wildcard pattern. If the destination
file already exists, cpio(1) will refuse to overwrite it unless
the "-u" switch is added to the command.
-d Create any directories that precede the filename specified
in the cpio(1) command. If the directories already exist,
the "-d" switch could be omitted but does no harm if it is
always specified.
-v Display the names of any files processed, along with the
size of the CPIO archive file, in 512-byte blocks. Note
this size is not the size of the RPM package, which cpio(1)
never sees directly.
附:trouble shooting
If your RPM database is hung or corrupted you can try to repair it with these
commands. This process is not guaranteed to work.
You must be logged in with superuser privilege (aka
"root") for these steps. The commands may be copied and pasted
directly into a root terminal window.
1) Make sure there are no RPM processes left running on your system.
Use the ps(1) command to identify them. Use the kill(1) command
to terminate any "rpm" processes you find; a "kill -9" may be
necessary.
2) Delete the lock files that RPM uses:
rm -f /var/lib/rpm/__db*
3) If you were experiencing a hanging "rpm" command, try it again.
If it works, you are finished. If not, perform Step #1 and #2
again. Then proceed to the next step.
4) Make a backup of your RPM database:
cd /var/lib
mkdir rpm-backup
rsync -av ./rpm/. ./rpm-backup/.
5) Rebuild your RPM database:
rpm -vv --rebuilddb > /tmp/rpmrebuilddb.log 2>&1
6) Retry your failed RPM command.
首先看一下rpm包的命名规则,如有一rpm包名字为ncurses4-5.0-5.i386.rpm,
其命名规则为
<name>-<version>-<release>.<arch>.rpm
o <name> is the name of the program or package. The <name> is
usually assigned by the program's author. In our example, the
developers decided to name their product "bash" for reasons that
seemed amusing to them.
o <version> identifies which edition of the software this RPM
contains. The <version> number is assigned by the program's
author. Using the <version> number allows one to determine which
version of the author's sources were used to generate the RPM.
o <release> provides the edition number of the RPM file itself and
not the version of the author's source files. An updated RPM may
be issued to supply a patched version of the author's original
software. The patch need not have come from the original
developer, so the RPM <release> gets incremented instead of the
<version>.
Remember: the <version> is controlled by the original author and
the <release> is controlled by whomever constructed the RPM.
o <arch> describes the contents of the RPM and tells whether this
file contains the product source (a ".src.rpm"),
architecture-independent files (a ".noarch.rpm"), or files which
may only be installed on a particular host type (a ".sh.rpm" will
work only on a STRONGHOLD embedded processor).
以下就是一些关于rpm包的一些操作命令。
1、查看rpm包是否安装:
引用
[root@hzmc tmp]# rpm -qa|grep ncurses4
ncurses4-5.0-5
ncurses4-5.0-5
2、卸载rpm包
引用
[root@hzmc tmp]# rpm -e ncurses4-5.0-5
3、安装rpm包
引用
[root@hzmc tmp]# rpm -ivh ncurses4-5.0-5.i386.rpm
Preparing... ########################################### [100%]
1:ncurses4 ########################################### [100%]
Preparing... ########################################### [100%]
1:ncurses4 ########################################### [100%]
4、以升级模式安装rpm包
引用
[root@hzmc tmp]# rpm -Uvh /tmp/ncurses4-5.0-5.i386.rpm
Preparing... ########################################### [100%]
1:ncurses4 ########################################### [100%]
Preparing... ########################################### [100%]
1:ncurses4 ########################################### [100%]
5、查看rpm包安装路径,注意这里使用的是绝对路径
引用
[root@hzmc tmp]# rpm -qlp ncurses4-5.0-5.i386.rpm
/usr/lib/libform.so.4
/usr/lib/libform.so.4.0
/usr/lib/libmenu.so.4
/usr/lib/libmenu.so.4.0
/usr/lib/libncurses.so.4
/usr/lib/libncurses.so.4.0
/usr/lib/libpanel.so.4
/usr/lib/libpanel.so.4.0
/usr/share/doc/ncurses4-5.0
/usr/share/doc/ncurses4-5.0/ANNOUNCE
/usr/share/doc/ncurses4-5.0/README
/usr/lib/libform.so.4
/usr/lib/libform.so.4.0
/usr/lib/libmenu.so.4
/usr/lib/libmenu.so.4.0
/usr/lib/libncurses.so.4
/usr/lib/libncurses.so.4.0
/usr/lib/libpanel.so.4
/usr/lib/libpanel.so.4.0
/usr/share/doc/ncurses4-5.0
/usr/share/doc/ncurses4-5.0/ANNOUNCE
/usr/share/doc/ncurses4-5.0/README
以下命令使用的是相对路径
引用
[root@hzmc tmp]# rpm2cpio ncurses4-5.0-5.i386.rpm|cpio -t
./usr/lib/libform.so.4
./usr/lib/libform.so.4.0
./usr/lib/libmenu.so.4
./usr/lib/libmenu.so.4.0
./usr/lib/libncurses.so.4
./usr/lib/libncurses.so.4.0
./usr/lib/libpanel.so.4
./usr/lib/libpanel.so.4.0
./usr/share/doc/ncurses4-5.0
./usr/share/doc/ncurses4-5.0/ANNOUNCE
./usr/share/doc/ncurses4-5.0/README
720 blocks
./usr/lib/libform.so.4
./usr/lib/libform.so.4.0
./usr/lib/libmenu.so.4
./usr/lib/libmenu.so.4.0
./usr/lib/libncurses.so.4
./usr/lib/libncurses.so.4.0
./usr/lib/libpanel.so.4
./usr/lib/libpanel.so.4.0
./usr/share/doc/ncurses4-5.0
./usr/share/doc/ncurses4-5.0/ANNOUNCE
./usr/share/doc/ncurses4-5.0/README
720 blocks
6、解压rpm包文件至某个文件夹下,这里使用的是相对路径
引用
[root@hzmc tmp]# rpm2cpio ncurses4-5.0-5.i386.rpm | cpio -ivdu
./usr/lib/libform.so.4
./usr/lib/libform.so.4.0
./usr/lib/libmenu.so.4
./usr/lib/libmenu.so.4.0
./usr/lib/libncurses.so.4
./usr/lib/libncurses.so.4.0
./usr/lib/libpanel.so.4
./usr/lib/libpanel.so.4.0
./usr/share/doc/ncurses4-5.0
./usr/share/doc/ncurses4-5.0/ANNOUNCE
./usr/share/doc/ncurses4-5.0/README
720 blocks
./usr/lib/libform.so.4
./usr/lib/libform.so.4.0
./usr/lib/libmenu.so.4
./usr/lib/libmenu.so.4.0
./usr/lib/libncurses.so.4
./usr/lib/libncurses.so.4.0
./usr/lib/libpanel.so.4
./usr/lib/libpanel.so.4.0
./usr/share/doc/ncurses4-5.0
./usr/share/doc/ncurses4-5.0/ANNOUNCE
./usr/share/doc/ncurses4-5.0/README
720 blocks
当然了,我们也可以解压,单个文件至某一文件夹下
引用
[root@hzmc /]# rpm2cpio /tmp/ncurses4-5.0-5.i386.rpm | cpio -ivdu ./usr/lib/libform.so.4
./usr/lib/libform.so.4
720 blocks
./usr/lib/libform.so.4
720 blocks
这里解释一下几个参数
In this case, the options "-i", "-v", and "-d" direct cpio(1) to:
-i Extract one or more files from an archive. The filename(s)
requested must match the "cpio -t" table of contents
exactly, or a shell-like wildcard pattern. If the destination
file already exists, cpio(1) will refuse to overwrite it unless
the "-u" switch is added to the command.
-d Create any directories that precede the filename specified
in the cpio(1) command. If the directories already exist,
the "-d" switch could be omitted but does no harm if it is
always specified.
-v Display the names of any files processed, along with the
size of the CPIO archive file, in 512-byte blocks. Note
this size is not the size of the RPM package, which cpio(1)
never sees directly.
附:trouble shooting
If your RPM database is hung or corrupted you can try to repair it with these
commands. This process is not guaranteed to work.
You must be logged in with superuser privilege (aka
"root") for these steps. The commands may be copied and pasted
directly into a root terminal window.
1) Make sure there are no RPM processes left running on your system.
Use the ps(1) command to identify them. Use the kill(1) command
to terminate any "rpm" processes you find; a "kill -9" may be
necessary.
2) Delete the lock files that RPM uses:
rm -f /var/lib/rpm/__db*
3) If you were experiencing a hanging "rpm" command, try it again.
If it works, you are finished. If not, perform Step #1 and #2
again. Then proceed to the next step.
4) Make a backup of your RPM database:
cd /var/lib
mkdir rpm-backup
rsync -av ./rpm/. ./rpm-backup/.
5) Rebuild your RPM database:
rpm -vv --rebuilddb > /tmp/rpmrebuilddb.log 2>&1
6) Retry your failed RPM command.
发表评论
-
参加Oracle勒索病毒防范专题培训会议
2019-09-27 17:15 4242019年7月22日,受邀参加Oracle勒索病毒防范专题培训 ... -
selinux引起的ftp故障
2011-10-18 13:11 1452linux开通gssftp之后,客户端连接linux出现以下问 ... -
vmware 网卡hostonly模式不能ping的问题
2010-12-01 11:58 2196因测试需要,开启虚拟机,网卡为hostonly模式,启动之后不 ... -
linux 5 x64上安装基础软件的一些错误修复
2010-11-25 12:23 1779因项目需要,以下为linux as 5 上安装基础软件时一些错 ... -
linux gcc rpm包安装过程
2010-11-25 12:02 4160系统中发现gcc未安装,以下为gcc安装过程中的依赖包 引用[ ... -
linux lvm创建文件系统
2010-11-25 12:00 1682以下仅为安装记录 1、创建lv 引用[root@Linux ~ ... -
linux 5 裸设备绑定
2010-11-17 14:33 1601在以前的redhat版本中,系统通过/etc/sysconfi ... -
oci8
2010-09-10 17:30 1709[dbra@shenjp ruby-oci8-1.0.7]$ ... -
OCI安装错误记录(二)
2010-07-31 15:22 1827由于Oracle 11g R2 X64在windo ... -
OCI安装错误记录(一)
2010-07-28 09:36 5889主机环境: WINDOWS 2008 X64+ORACLE 1 ... -
sudo安装错误/usr/bin/ld: cannot find -lpam
2010-05-10 17:10 4314centos 5.1版本为 引用[root@rztest su ... -
linux dmidecode 查看硬件信息
2010-03-03 11:21 2164在linux平台可以利用命令dmidecode查看硬件信息,以 ... -
linux 修改时区
2009-12-24 14:46 3402一、修改时区 1、查看当前使用的时区,可以看到当前系统使用美 ... -
linux 划分文件系统
2009-12-24 09:58 1134linux版本为 引用[root@hzmc ~]# uname ... -
tar压缩使用方法
2009-12-10 16:47 2187为了方便用户在打包解包的同时可以压缩或解压文件,tar提供了一 ... -
linux 共享内存段研究
2009-12-09 14:11 5412无论是在unix或者是linux都有命令查看主机共享内存段的使 ... -
Linux显示网卡流量
2009-09-03 14:24 2210Linux操作系统版本为: 引用[root@hzmc tmp] ... -
linux 绑定模式分别为冗余和均衡负载时信息显示
2009-08-19 16:46 1253linux绑定网卡在《linux as 4 bond网卡绑定》 ... -
linux as 4 bond网卡绑定
2009-08-19 15:48 2143理论不赘述,简而言之,网卡绑定就是多张网卡逻辑上作为一张网卡用 ... -
xinetd: unrecognized service
2009-08-17 10:21 13418linux xinetd 服务不能启动: [root@capa ...
相关推荐
Linux RPM 包安装文档,不是源码安装文档
常用linux命令rpm包,netstat、ps、dos2unix、rz、sz、lsof等等。
主要介绍了Linux下RPM打包制作的详细流程,并分享了相关实例代码,一起学习下。
mysql for linux rpm包 5.0.77版本
1、rpm包拷贝到linux 2、rpm -ivh 包名 3、找到zip包,unzip zip包
flash插件 linux rpm包
linux rpm包的一下安装命令 卸载命令
linuxqq rpm包、.src.rpm包
telnet-0.17-59.el7.x86_64.rpm包。telnet rpm包。x86_64
Linux RPM 包概述.pdf
gcc 64位Linux rpm包 包括 cloog-ppl-0.15.7-1.2.el6.x86_64.rpm cpp-4.4.7-4.el6.x86_64.rpm gcc-4.4.7-4.el6.x86_64.rpm gcc-c++-4.4.7-4.el6.x86_64.rpm glibc-devel-2.12-1.132.el6.x86_64.rpm glibc-headers-...
linux 系统下 的 telnet 服务的 rpm安装包 凑字数。
1、rpm -ivh libFS-1.0.0-3.1.x86_64.rpm 2、rpm -ivh ttmkfdir-3.0.9-23.el5.x86_64.rpm 3、rpm -ivh chkfontpath-1.10.1-1.1.x86_64.rpm xorg-x11-xfs-1.0.2-4.x86_64.rpm 4、rpm -ivh fonts-chinese-3.02-12.el5....
最后的linux chrome 32位 rpm包
telnet安装包的全部组件: telnet-0.17-47.el6.x86_64 telnet-server-0.17-47.el6.x86_64 xinetd-2.3.14-39.el6_4.x86_64
linux rpm包telnet_server+安装oracle包 libaio-devel-0.3.106-3.2.i386.rpm telnet-server-0.17-38.el5.i386.rpm sysstat-7.0.0-3.el5.i386.rpm sysstat-7.0.2-3.el5.i386.rpm unixODBC-2.2.11-7.1.i386.rpm ...
新建一个文件夹,上传资源,直接执行命令rpm -Uvh *.rpm --nodeps --force
linux安装oracle11g时所需的rpm包,比较全,欢迎下载 elfutils-libelf-devel-static-0.125-3.el5.i386.rpm gcc-4.1.2-48.el5.i386.rpm gcc-c++-4.1.1-52.el5.i386.rpm glibc-headers-2.5-58.i386.rpm kernel-...