- 浏览: 2181036 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (682)
- 软件思想 (7)
- Lucene(修真篇) (17)
- Lucene(仙界篇) (20)
- Lucene(神界篇) (11)
- Solr (48)
- Hadoop (77)
- Spark (38)
- Hbase (26)
- Hive (19)
- Pig (25)
- ELK (64)
- Zookeeper (12)
- JAVA (119)
- Linux (59)
- 多线程 (8)
- Nutch (5)
- JAVA EE (21)
- Oracle (7)
- Python (32)
- Xml (5)
- Gson (1)
- Cygwin (1)
- JavaScript (4)
- MySQL (9)
- Lucene/Solr(转) (5)
- 缓存 (2)
- Github/Git (1)
- 开源爬虫 (1)
- Hadoop运维 (7)
- shell命令 (9)
- 生活感悟 (42)
- shell编程 (23)
- Scala (11)
- MongoDB (3)
- docker (2)
- Nodejs (3)
- Neo4j (5)
- storm (3)
- opencv (1)
最新评论
-
qindongliang1922:
粟谷_sugu 写道不太理解“分词字段存储docvalue是没 ...
浅谈Lucene中的DocValues -
粟谷_sugu:
不太理解“分词字段存储docvalue是没有意义的”,这句话, ...
浅谈Lucene中的DocValues -
yin_bp:
高性能elasticsearch ORM开发库使用文档http ...
为什么说Elasticsearch搜索是近实时的? -
hackWang:
请问博主,有用solr做电商的搜索项目?
Solr中Group和Facet的用法 -
章司nana:
遇到的问题同楼上 为什么会返回null
Lucene4.3开发之第八步之渡劫初期(八)
本篇主要写关于Linux的文件系统的管理,在使用linux时,我们需要决定我们的系统的存储设备用什么文件系统,安装linux发行版时,会提供一个默认的文件系统,散仙在虚拟机里面安装的系统,一般都是ext4的系统作为默认的系统。
linux提供了一些不同的工具,可以让命令行下操作文件系统更方便,我们可以通过shell命令来轻松的创建新的系统和修改已有的文件系统。
1,创建一个分区来容纳文件系统,使用命令fdisk /dev/sdc
2,创建文件系统sudo mkfs.ext4 /dev/sdc
3, 挂载虚拟目录sudo monut -t ext4 /dev/sdb1 /mnt/test
上面的部分,在实际开发中,很少用到,一般会由运维人员给我们做这些底层工作,所以散仙就简单说下
下面重点介绍下,在linux中如何安装软件程序,yum是red hat系列操作系统中的神器,使用它我们很轻松的安装很多软件。
1,找出系统上已经安装的包 命令:yum list installed
2,如果输出的信息太多,我们可以重定向到一个文件中,命令如下:
yun list installed >> installed_software.txt
3,查看某个特定软件包的信息使用命令,和验证是否安装:
yum list 软件包名
yum list installed 软件包名
如果需要找什么软件包提供了系统上的某个文件,yum命令如下:
yum安装软件命令 yum install 软件包名(支持通配)
使用yum手动安装rpm文件包,yum命令如下:
yum localinstall 软件包名.rpm即可
yum更新软件:
1,查看所有需要更新的内容 命令:yum list updates
如果你发现某个软件包需要更新,执行命令:
yum update 软件包名
更新所有的命令
yum update
yum卸载软件,命令如下:
yum remove 软件包名
要删除软件和它所有的文件命令:
yum erase 软件包名
如果包的依赖关系损坏了,先执行yum clean all,然后执行
yum update ,如果还不行,可以试试下面的这个命令:
yum deplist 软件包名 查看依赖关系后,我们就可以安装它依赖的关系。
查看我的yum的仓库命令:
yum repolist
linux提供了一些不同的工具,可以让命令行下操作文件系统更方便,我们可以通过shell命令来轻松的创建新的系统和修改已有的文件系统。
1,创建一个分区来容纳文件系统,使用命令fdisk /dev/sdc
2,创建文件系统sudo mkfs.ext4 /dev/sdc
3, 挂载虚拟目录sudo monut -t ext4 /dev/sdb1 /mnt/test
上面的部分,在实际开发中,很少用到,一般会由运维人员给我们做这些底层工作,所以散仙就简单说下
下面重点介绍下,在linux中如何安装软件程序,yum是red hat系列操作系统中的神器,使用它我们很轻松的安装很多软件。
1,找出系统上已经安装的包 命令:yum list installed
[root@h1 ~]# yum list installed Loaded plugins: fastestmirror Determining fastest mirrors * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.btte.net base | 3.7 kB 00:00 extras | 3.4 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 4.7 MB 00:01 Installed Packages MAKEDEV.x86_64 3.24-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 acl.x86_64 2.2.49-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 attr.x86_64 2.4.44-7.el6 @anaconda-CentOS-201311272149.x86_64/6.5 audit.x86_64 2.2-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 audit-libs.x86_64 2.2-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 authconfig.x86_64 6.1.12-13.el6 @anaconda-CentOS-201311272149.x86_64/6.5 b43-openfwwf.noarch 5.2-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 basesystem.noarch 10.0-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 bash.x86_64 4.1.2-15.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5 binutils.x86_64 2.20.51.0.2-5.36.el6 @anaconda-CentOS-201311272149.x86_64/6.5 bridge-utils.x86_64 1.2-10.el6 @anaconda-CentOS-201311272149.x86_64/6.5 bzip2.x86_64 1.0.5-7.el6_0 @anaconda-CentOS-201311272149.x86_64/6.5 bzip2-libs.x86_64 1.0.5-7.el6_0 @anaconda-CentOS-201311272149.x86_64/6.5 ca-certificates.noarch 2013.1.94-65.0.el6 @anaconda-CentOS-201311272149.x86_64/6.5 centos-release.x86_64 6-5.el6.centos.11.1 @anaconda-CentOS-201311272149.x86_64/6.5 checkpolicy.x86_64 2.0.22-1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 chkconfig.x86_64 1.3.49.3-2.el6_4.1 @anaconda-CentOS-201311272149.x86_64/6.5 coreutils.x86_64 8.4-31.el6 @anaconda-CentOS-201311272149.x86_64/6.5 coreutils-libs.x86_64 8.4-31.el6 @anaconda-CentOS-201311272149.x86_64/6.5 cpio.x86_64 2.10-11.el6_3 @anaconda-CentOS-201311272149.x86_64/6.5 cracklib.x86_64 2.8.16-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 cracklib-dicts.x86_64 2.8.16-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 cronie.x86_64 1.4.4-12.el6 @anaconda-CentOS-201311272149.x86_64/6.5 cronie-anacron.x86_64 1.4.4-12.el6 @anaconda-CentOS-201311272149.x86_64/6.5 crontabs.noarch 1.10-33.el6 @anaconda-CentOS-201311272149.x86_64/6.5 cryptsetup-luks.x86_64 1.2.0-7.el6 @anaconda-CentOS-201311272149.x86_64/6.5 cryptsetup-luks-libs.x86_64 1.2.0-7.el6 @anaconda-CentOS-201311272149.x86_64/6.5 curl.x86_64 7.19.7-37.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5 cyrus-sasl.x86_64 2.1.23-13.el6_3.1 @anaconda-CentOS-201311272149.x86_64/6.5 cyrus-sasl-lib.x86_64 2.1.23-13.el6_3.1 @anaconda-CentOS-201311272149.x86_64/6.5 dash.x86_64 0.5.5.1-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 db4.x86_64 4.7.25-18.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5 db4-utils.x86_64 4.7.25-18.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5 dbus-glib.x86_64 0.86-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 dbus-libs.x86_64 1:1.2.24-7.el6_3 @anaconda-CentOS-201311272149.x86_64/6.5 device-mapper.x86_64 1.02.79-8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 device-mapper-event.x86_64 1.02.79-8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 device-mapper-event-libs.x86_64 1.02.79-8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 device-mapper-libs.x86_64 1.02.79-8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 device-mapper-multipath.x86_64 0.4.9-72.el6 @anaconda-CentOS-201311272149.x86_64/6.5 device-mapper-multipath-libs.x86_64 0.4.9-72.el6 @anaconda-CentOS-201311272149.x86_64/6.5 device-mapper-persistent-data.x86_64 0.2.8-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 dhclient.x86_64 12:4.1.1-38.P1.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 dhcp-common.x86_64 12:4.1.1-38.P1.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 diffutils.x86_64 2.8.1-28.el6 @anaconda-CentOS-201311272149.x86_64/6.5 dos2unix.x86_64 3.1-37.el6 @base dracut.noarch 004-335.el6 @anaconda-CentOS-201311272149.x86_64/6.5 dracut-kernel.noarch 004-335.el6 @anaconda-CentOS-201311272149.x86_64/6.5 e2fsprogs.x86_64 1.41.12-18.el6 @anaconda-CentOS-201311272149.x86_64/6.5 e2fsprogs-libs.x86_64 1.41.12-18.el6 @anaconda-CentOS-201311272149.x86_64/6.5 efibootmgr.x86_64 0.5.4-11.el6 @anaconda-CentOS-201311272149.x86_64/6.5 elfutils-libelf.x86_64 0.152-1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 ethtool.x86_64 2:3.5-1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 expat.x86_64 2.0.1-11.el6_2 @anaconda-CentOS-201311272149.x86_64/6.5 file.x86_64 5.04-15.el6 @anaconda-CentOS-201311272149.x86_64/6.5 file-libs.x86_64 5.04-15.el6 @anaconda-CentOS-201311272149.x86_64/6.5 filesystem.x86_64 2.4.30-3.el6 @anaconda-CentOS-201311272149.x86_64/6.5 findutils.x86_64 1:4.4.2-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 fipscheck.x86_64 1.2.0-7.el6 @anaconda-CentOS-201311272149.x86_64/6.5 fipscheck-lib.x86_64 1.2.0-7.el6 @anaconda-CentOS-201311272149.x86_64/6.5 fuse.x86_64 2.8.3-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 gamin.x86_64 0.1.10-9.el6 @anaconda-CentOS-201311272149.x86_64/6.5 gawk.x86_64 3.1.7-10.el6 @anaconda-CentOS-201311272149.x86_64/6.5 gdbm.x86_64 1.8.0-36.el6 @anaconda-CentOS-201311272149.x86_64/6.5 git.x86_64 1.7.1-3.el6_4.1 @base glib2.x86_64 2.26.1-3.el6 @anaconda-CentOS-201311272149.x86_64/6.5 glibc.x86_64 2.12-1.132.el6 @anaconda-CentOS-201311272149.x86_64/6.5 glibc-common.x86_64 2.12-1.132.el6 @anaconda-CentOS-201311272149.x86_64/6.5 gmp.x86_64 4.3.1-7.el6_2.2 @anaconda-CentOS-201311272149.x86_64/6.5 gnupg2.x86_64 2.0.14-6.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5 gpgme.x86_64 1.1.8-3.el6 @anaconda-CentOS-201311272149.x86_64/6.5 gpm-libs.x86_64 1.20.6-12.el6 @base grep.x86_64 2.6.3-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 groff.x86_64 1.18.1.4-21.el6 @anaconda-CentOS-201311272149.x86_64/6.5 grub.x86_64 1:0.97-83.el6 @anaconda-CentOS-201311272149.x86_64/6.5 grubby.x86_64 7.0.15-5.el6 @anaconda-CentOS-201311272149.x86_64/6.5 gzip.x86_64 1.3.12-19.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5 hwdata.noarch 0.233-9.1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 info.x86_64 4.13a-8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 initscripts.x86_64 9.03.40-2.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 iproute.x86_64 2.6.32-31.el6 @anaconda-CentOS-201311272149.x86_64/6.5 iptables.x86_64 1.4.7-11.el6 @anaconda-CentOS-201311272149.x86_64/6.5 iptables-ipv6.x86_64 1.4.7-11.el6 @anaconda-CentOS-201311272149.x86_64/6.5 iputils.x86_64 20071127-17.el6_4.2 @anaconda-CentOS-201311272149.x86_64/6.5 iscsi-initiator-utils.x86_64 6.2.0.873-10.el6 @anaconda-CentOS-201311272149.x86_64/6.5 kbd.x86_64 1.15-11.el6 @anaconda-CentOS-201311272149.x86_64/6.5 kbd-misc.noarch 1.15-11.el6 @anaconda-CentOS-201311272149.x86_64/6.5 kernel.x86_64 2.6.32-431.el6 @anaconda-CentOS-201311272149.x86_64/6.5 kernel-firmware.noarch 2.6.32-431.el6 @anaconda-CentOS-201311272149.x86_64/6.5 keyutils-libs.x86_64 1.4-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 kpartx.x86_64 0.4.9-72.el6 @anaconda-CentOS-201311272149.x86_64/6.5 krb5-libs.x86_64 1.10.3-10.el6_4.6 @anaconda-CentOS-201311272149.x86_64/6.5 less.x86_64 436-10.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libacl.x86_64 2.2.49-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libaio.x86_64 0.3.107-10.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libattr.x86_64 2.4.44-7.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libblkid.x86_64 2.17.2-12.14.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libcap.x86_64 2.16-5.5.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libcap-ng.x86_64 0.6.4-3.el6_0.1 @anaconda-CentOS-201311272149.x86_64/6.5 libcom_err.x86_64 1.41.12-18.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libcurl.x86_64 7.19.7-37.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5 libdrm.x86_64 2.4.45-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libedit.x86_64 2.11-4.20080712cvs.1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libffi.x86_64 3.0.5-3.2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libgcc.x86_64 4.4.7-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libgcrypt.x86_64 1.4.5-11.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5 libgpg-error.x86_64 1.7-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libidn.x86_64 1.18-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libnih.x86_64 1.0.1-7.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libpciaccess.x86_64 0.13.1-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libselinux.x86_64 2.0.94-5.3.el6_4.1 @anaconda-CentOS-201311272149.x86_64/6.5 libselinux-utils.x86_64 2.0.94-5.3.el6_4.1 @anaconda-CentOS-201311272149.x86_64/6.5 libsemanage.x86_64 2.0.43-4.2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libsepol.x86_64 2.0.41-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libss.x86_64 1.41.12-18.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libssh2.x86_64 1.4.2-1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libstdc++.x86_64 4.4.7-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libtasn1.x86_64 2.3-3.el6_2.1 @anaconda-CentOS-201311272149.x86_64/6.5 libudev.x86_64 147-2.51.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libusb.x86_64 0.1.12-23.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libuser.x86_64 0.56.13-5.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libutempter.x86_64 1.1.5-4.1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libuuid.x86_64 2.17.2-12.14.el6 @anaconda-CentOS-201311272149.x86_64/6.5 libxml2.x86_64 2.7.6-14.el6 @anaconda-CentOS-201311272149.x86_64/6.5 logrotate.x86_64 3.7.8-17.el6 @anaconda-CentOS-201311272149.x86_64/6.5 lsscsi.x86_64 0.23-2.el6 @base lua.x86_64 5.1.4-4.1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 lvm2.x86_64 2.02.100-8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 lvm2-libs.x86_64 2.02.100-8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 m4.x86_64 1.4.13-5.el6 @anaconda-CentOS-201311272149.x86_64/6.5 make.x86_64 1:3.81-20.el6 @anaconda-CentOS-201311272149.x86_64/6.5 man.x86_64 1.6f-32.el6 @base man-pages.noarch 3.22-20.el6 @base man-pages-cs.noarch 0.18.20090209-2.1.el6 @base man-pages-es.noarch 1.55-14.el6 @base man-pages-es-extra.noarch 1.55-14.el6 @base man-pages-fr.noarch 3.23-10.el6 @base man-pages-it.noarch 2.80-6.el6 @base man-pages-ja.noarch 20100115-6.el6 @base man-pages-ko.noarch 2:20050219-17.el6 @base man-pages-overrides.noarch 6.5.3-1.el6_5 @updates man-pages-pl.noarch 0.24-8.1.el6 @base man-pages-ru.noarch 0.97-9.el6 @base man-pages-uk.noarch 0.1-0.11.20071108.el6 @base mdadm.x86_64 3.2.6-7.el6 @anaconda-CentOS-201311272149.x86_64/6.5 mingetty.x86_64 1.08-5.el6 @anaconda-CentOS-201311272149.x86_64/6.5 module-init-tools.x86_64 3.9-21.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5 mysql.x86_64 5.1.73-3.el6_5 @updates mysql-libs.x86_64 5.1.73-3.el6_5 @updates mysql-server.x86_64 5.1.73-3.el6_5 @updates ncurses.x86_64 5.7-3.20090208.el6 @anaconda-CentOS-201311272149.x86_64/6.5 ncurses-base.x86_64 5.7-3.20090208.el6 @anaconda-CentOS-201311272149.x86_64/6.5 ncurses-libs.x86_64 5.7-3.20090208.el6 @anaconda-CentOS-201311272149.x86_64/6.5 net-tools.x86_64 1.60-110.el6_2 @anaconda-CentOS-201311272149.x86_64/6.5 newt.x86_64 0.52.11-3.el6 @anaconda-CentOS-201311272149.x86_64/6.5 newt-python.x86_64 0.52.11-3.el6 @anaconda-CentOS-201311272149.x86_64/6.5 nspr.x86_64 4.10.0-1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 nss.x86_64 3.15.1-15.el6 @anaconda-CentOS-201311272149.x86_64/6.5 nss-softokn.x86_64 3.14.3-9.el6 @anaconda-CentOS-201311272149.x86_64/6.5 nss-softokn-freebl.x86_64 3.14.3-9.el6 @anaconda-CentOS-201311272149.x86_64/6.5 nss-sysinit.x86_64 3.15.1-15.el6 @anaconda-CentOS-201311272149.x86_64/6.5 nss-tools.x86_64 3.15.1-15.el6 @anaconda-CentOS-201311272149.x86_64/6.5 nss-util.x86_64 3.15.1-3.el6 @anaconda-CentOS-201311272149.x86_64/6.5 openldap.x86_64 2.4.23-32.el6_4.1 @anaconda-CentOS-201311272149.x86_64/6.5 openssh.x86_64 5.3p1-94.el6 @anaconda-CentOS-201311272149.x86_64/6.5 openssh-clients.x86_64 5.3p1-94.el6 @anaconda-CentOS-201311272149.x86_64/6.5 openssh-server.x86_64 5.3p1-94.el6 @anaconda-CentOS-201311272149.x86_64/6.5 openssl.x86_64 1.0.1e-15.el6 @anaconda-CentOS-201311272149.x86_64/6.5 p11-kit.x86_64 0.18.5-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 p11-kit-trust.x86_64 0.18.5-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 pam.x86_64 1.1.1-17.el6 @anaconda-CentOS-201311272149.x86_64/6.5 passwd.x86_64 0.77-4.el6_2.2 @anaconda-CentOS-201311272149.x86_64/6.5 pciutils-libs.x86_64 3.1.10-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 pcre.x86_64 7.8-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 perl.x86_64 4:5.10.1-136.el6 @base perl-DBD-MySQL.x86_64 4.013-3.el6 @base perl-DBI.x86_64 1.609-4.el6 @base perl-Error.noarch 1:0.17015-4.el6 @base perl-Git.noarch 1.7.1-3.el6_4.1 @base perl-Module-Pluggable.x86_64 1:3.90-136.el6 @base perl-Pod-Escapes.x86_64 1:1.04-136.el6 @base perl-Pod-Simple.x86_64 1:3.13-136.el6 @base perl-libs.x86_64 4:5.10.1-136.el6 @base perl-version.x86_64 3:0.77-136.el6 @base pinentry.x86_64 0.7.6-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 pkgconfig.x86_64 1:0.23-9.1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 plymouth.x86_64 0.8.3-27.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 plymouth-core-libs.x86_64 0.8.3-27.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 plymouth-scripts.x86_64 0.8.3-27.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 policycoreutils.x86_64 2.0.83-19.39.el6 @anaconda-CentOS-201311272149.x86_64/6.5 popt.x86_64 1.13-7.el6 @anaconda-CentOS-201311272149.x86_64/6.5 postfix.x86_64 2:2.6.6-2.2.el6_1 @anaconda-CentOS-201311272149.x86_64/6.5 procps.x86_64 3.2.8-25.el6 @anaconda-CentOS-201311272149.x86_64/6.5 psmisc.x86_64 22.6-15.el6_0.1 @anaconda-CentOS-201311272149.x86_64/6.5 pth.x86_64 2.0.7-9.3.el6 @anaconda-CentOS-201311272149.x86_64/6.5 pygpgme.x86_64 0.1-18.20090824bzr68.el6 @anaconda-CentOS-201311272149.x86_64/6.5 python.x86_64 2.6.6-51.el6 @anaconda-CentOS-201311272149.x86_64/6.5 python-iniparse.noarch 0.3.1-2.1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 python-libs.x86_64 2.6.6-51.el6 @anaconda-CentOS-201311272149.x86_64/6.5 python-pycurl.x86_64 7.19.0-8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 python-urlgrabber.noarch 3.9.1-9.el6 @anaconda-CentOS-201311272149.x86_64/6.5 readline.x86_64 6.0-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 redhat-logos.noarch 60.0.14-12.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 rootfiles.noarch 8.1-6.1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 rpm.x86_64 4.8.0-37.el6 @anaconda-CentOS-201311272149.x86_64/6.5 rpm-libs.x86_64 4.8.0-37.el6 @anaconda-CentOS-201311272149.x86_64/6.5 rpm-python.x86_64 4.8.0-37.el6 @anaconda-CentOS-201311272149.x86_64/6.5 rsync.x86_64 3.0.6-9.el6_4.1 @base rsyslog.x86_64 5.8.10-8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 sed.x86_64 4.2.1-10.el6 @anaconda-CentOS-201311272149.x86_64/6.5 selinux-policy.noarch 3.7.19-231.el6 @anaconda-CentOS-201311272149.x86_64/6.5 selinux-policy-targeted.noarch 3.7.19-231.el6 @anaconda-CentOS-201311272149.x86_64/6.5 setup.noarch 2.8.14-20.el6_4.1 @anaconda-CentOS-201311272149.x86_64/6.5 shadow-utils.x86_64 2:4.1.4.2-13.el6 @anaconda-CentOS-201311272149.x86_64/6.5 shared-mime-info.x86_64 0.70-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 slang.x86_64 2.2.1-1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 sqlite.x86_64 3.6.20-1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 sudo.x86_64 1.8.6p3-12.el6 @anaconda-CentOS-201311272149.x86_64/6.5 system-config-firewall-base.noarch 1.2.27-5.el6 @anaconda-CentOS-201311272149.x86_64/6.5 sysvinit-tools.x86_64 2.87-5.dsf.el6 @anaconda-CentOS-201311272149.x86_64/6.5 tar.x86_64 2:1.23-11.el6 @anaconda-CentOS-201311272149.x86_64/6.5 tcp_wrappers-libs.x86_64 7.6-57.el6 @anaconda-CentOS-201311272149.x86_64/6.5 tzdata.noarch 2013g-1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 udev.x86_64 147-2.51.el6 @anaconda-CentOS-201311272149.x86_64/6.5 upstart.x86_64 0.6.5-12.el6_4.1 @anaconda-CentOS-201311272149.x86_64/6.5 ustr.x86_64 1.0.4-9.1.el6 @anaconda-CentOS-201311272149.x86_64/6.5 util-linux-ng.x86_64 2.17.2-12.14.el6 @anaconda-CentOS-201311272149.x86_64/6.5 vim-common.x86_64 2:7.2.411-1.8.el6 @base vim-enhanced.x86_64 2:7.2.411-1.8.el6 @base vim-minimal.x86_64 2:7.2.411-1.8.el6 @anaconda-CentOS-201311272149.x86_64/6.5 which.x86_64 2.19-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 xfsprogs.x86_64 3.1.1-14.el6 @anaconda-CentOS-201311272149.x86_64/6.5 xz.x86_64 4.999.9-0.3.beta.20091007git.el6 @base xz-libs.x86_64 4.999.9-0.3.beta.20091007git.el6 @anaconda-CentOS-201311272149.x86_64/6.5 xz-lzma-compat.x86_64 4.999.9-0.3.beta.20091007git.el6 @base yum.noarch 3.2.29-40.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 yum-metadata-parser.x86_64 1.1.2-16.el6 @anaconda-CentOS-201311272149.x86_64/6.5 yum-plugin-fastestmirror.noarch 1.1.30-14.el6 @anaconda-CentOS-201311272149.x86_64/6.5 zlib.x86_64 1.2.3-29.el6 @anaconda-CentOS-201311272149.x86_64/6.5 [root@h1 ~]#
2,如果输出的信息太多,我们可以重定向到一个文件中,命令如下:
yun list installed >> installed_software.txt
3,查看某个特定软件包的信息使用命令,和验证是否安装:
yum list 软件包名
yum list installed 软件包名
[root@h1 ~]# yum list mysql Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.btte.net Installed Packages mysql.x86_64 5.1.73-3.el6_5 @updates [root@h1 ~]# yum list installed mysql Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.btte.net Installed Packages mysql.x86_64 5.1.73-3.el6_5 @updates [root@h1 ~]#
如果需要找什么软件包提供了系统上的某个文件,yum命令如下:
[root@h1 ~]# yum provides /etc/yum.conf Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.btte.net yum-3.2.29-40.el6.centos.noarch : RPM package installer/updater/manager Repo : base Matched from: Filename : /etc/yum.conf yum-3.2.29-43.el6.centos.noarch : RPM package installer/updater/manager Repo : updates Matched from: Filename : /etc/yum.conf yum-3.2.29-40.el6.centos.noarch : RPM package installer/updater/manager Repo : installed Matched from: Other : Provides-match: /etc/yum.conf [root@h1 ~]# yum provides /etc/passwd Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.btte.net setup-2.8.14-20.el6_4.1.noarch : A set of system configuration and setup files Repo : base Matched from: Filename : /etc/passwd setup-2.8.14-20.el6_4.1.noarch : A set of system configuration and setup files Repo : installed Matched from: Other : Provides-match: /etc/passwd [root@h1 ~]# yum provides /var/ Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.btte.net base/filelists_db | 5.9 MB 01:23 extras/filelists_db | 11 kB 00:00 updates/filelists_db | 2.7 MB 00:01 filesystem-2.4.30-3.el6.x86_64 : The basic directory layout for a Linux system Repo : base Matched from: Filename : /var/ filesystem-2.4.30-3.el6.x86_64 : The basic directory layout for a Linux system Repo : installed Matched from: Other : Provides-match: /var/ [root@h1 ~]#
yum安装软件命令 yum install 软件包名(支持通配)
[root@h1 ~]# yum install wget Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.btte.net Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package wget.x86_64 0:1.12-1.11.el6_5 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================ Installing: wget x86_64 1.12-1.11.el6_5 updates 483 k Transaction Summary ================================================================================================================================================================================ Install 1 Package(s) Total download size: 483 k Installed size: 1.8 M Is this ok [y/N]: y Downloading Packages: wget-1.12-1.11.el6_5.x86_64.rpm | 483 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : wget-1.12-1.11.el6_5.x86_64 1/1 Verifying : wget-1.12-1.11.el6_5.x86_64 1/1 Installed: wget.x86_64 0:1.12-1.11.el6_5 Complete! [root@h1 ~]#
使用yum手动安装rpm文件包,yum命令如下:
yum localinstall 软件包名.rpm即可
yum更新软件:
1,查看所有需要更新的内容 命令:yum list updates
[root@h1 ~]# yum list updates Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.btte.net Updated Packages audit.x86_64 2.2-4.el6_5 updates audit-libs.x86_64 2.2-4.el6_5 updates ca-certificates.noarch 2014.1.98-65.0.el6_5 updates centos-release.x86_64 6-5.el6.centos.11.2 updates coreutils.x86_64 8.4-31.el6_5.2 updates coreutils-libs.x86_64 8.4-31.el6_5.2 updates curl.x86_64 7.19.7-37.el6_5.3 updates device-mapper-multipath.x86_64 0.4.9-72.el6_5.3 updates device-mapper-multipath-libs.x86_64 0.4.9-72.el6_5.3 updates device-mapper-persistent-data.x86_64 0.2.8-4.el6_5 updates dracut.noarch 004-336.el6_5.2 updates dracut-kernel.noarch 004-336.el6_5.2 updates e2fsprogs.x86_64 1.41.12-18.el6_5.1 updates e2fsprogs-libs.x86_64 1.41.12-18.el6_5.1 updates ethtool.x86_64 2:3.5-1.4.el6_5 updates glib2.x86_64 2.26.1-7.el6_5 updates glibc.x86_64 2.12-1.132.el6_5.2 updates glibc-common.x86_64 2.12-1.132.el6_5.2 updates grep.x86_64 2.6.3-4.el6_5.1 updates grub.x86_64 1:0.97-84.el6_5 updates initscripts.x86_64 9.03.40-2.el6.centos.3 updates iproute.x86_64 2.6.32-32.el6_5 updates kernel.x86_64 2.6.32-431.23.3.el6 updates kernel-firmware.noarch 2.6.32-431.23.3.el6 updates kpartx.x86_64 0.4.9-72.el6_5.3 updates krb5-libs.x86_64 1.10.3-15.el6_5.1 updates libblkid.x86_64 2.17.2-12.14.el6_5 updates libcom_err.x86_64 1.41.12-18.el6_5.1 updates libcurl.x86_64 7.19.7-37.el6_5.3 updates libss.x86_64 1.41.12-18.el6_5.1 updates libtasn1.x86_64 2.3-6.el6_5 updates libuuid.x86_64 2.17.2-12.14.el6_5 updates libxml2.x86_64 2.7.6-14.el6_5.2 updates mdadm.x86_64 3.2.6-7.el6_5.2 updates nspr.x86_64 4.10.6-1.el6_5 updates nss.x86_64 3.16.1-4.el6_5 updates nss-softokn.x86_64 3.14.3-10.el6_5 updates nss-softokn-freebl.x86_64 3.14.3-10.el6_5 updates nss-sysinit.x86_64 3.16.1-4.el6_5 updates nss-tools.x86_64 3.16.1-4.el6_5 updates nss-util.x86_64 3.16.1-1.el6_5 updates openldap.x86_64 2.4.23-34.el6_5.1 updates openssl.x86_64 1.0.1e-16.el6_5.14 updates p11-kit.x86_64 0.18.5-2.el6_5.2 updates p11-kit-trust.x86_64 0.18.5-2.el6_5.2 updates postfix.x86_64 2:2.6.6-6.el6_5 updates psmisc.x86_64 22.6-19.el6_5 updates python.x86_64 2.6.6-52.el6 updates python-libs.x86_64 2.6.6-52.el6 updates selinux-policy.noarch 3.7.19-231.el6_5.3 updates selinux-policy-targeted.noarch 3.7.19-231.el6_5.3 updates tzdata.noarch 2014e-1.el6 updates upstart.x86_64 0.6.5-13.el6_5.3 updates util-linux-ng.x86_64 2.17.2-12.14.el6_5 updates yum.noarch 3.2.29-43.el6.centos updates yum-plugin-fastestmirror.noarch 1.1.30-17.el6_5 updates [root@h1 ~]#
如果你发现某个软件包需要更新,执行命令:
yum update 软件包名
更新所有的命令
yum update
yum卸载软件,命令如下:
yum remove 软件包名
要删除软件和它所有的文件命令:
yum erase 软件包名
如果包的依赖关系损坏了,先执行yum clean all,然后执行
yum update ,如果还不行,可以试试下面的这个命令:
yum deplist 软件包名 查看依赖关系后,我们就可以安装它依赖的关系。
查看我的yum的仓库命令:
yum repolist
[root@h1 ~]# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.btte.net repo id repo name status base CentOS-6 - Base 6,367 extras CentOS-6 - Extras 14 updates CentOS-6 - Updates 1,251 repolist: 7,632
发表评论
-
如何在shell中curl一个带变量的post请求
2016-11-04 14:24 13729有时候,我们想在一个shell中,执行一段脚本,循环post一 ... -
跟散仙学shell命令(八)
2014-08-06 18:49 2138本篇是散仙shell命令篇的最后一篇博客(后阶段会写shell ... -
跟散仙学shell命令(六)
2014-08-05 17:58 1836继上篇散仙写的Linux下环境变量的配置与使用,本篇散仙要写的 ... -
跟散仙学shell命令(五)
2014-08-04 18:45 2204今天散仙,要说的,是关于linux中的环境变量的使用,环境变量 ... -
跟散仙学shell命令(四)
2014-08-01 21:46 1262本篇主要讲述命令如下 ... -
跟散仙学shell命令(三)
2014-08-01 21:17 1849本篇散仙主要讲一些,linux进程的管理,磁盘信息统计,CPU ... -
跟散仙学shell命令(二)
2014-08-01 20:31 1922(1)rm删除命令,删除文件或目录 rm -rf source ... -
跟散仙学shell命令(一)
2014-07-31 13:51 3214linux系统的重要性不言而喻了,好多项目都要部署到linux ...
相关推荐
在Android系统中,有时我们需要执行一些底层操作,如文件管理、系统调试或自动化测试,这时候就需要用到shell命令。本文将深入探讨如何在Android平台上执行shell命令,以及它在实际开发中的应用。 首先,Android...
**Shell命令解释器**是Linux操作系统中的核心组件之一,它是一个用户与系统交互的界面,让用户能够通过输入命令来执行各种系统操作。在Linux的世界里,shell不仅是一个命令行接口,还是一个强大的脚本编程语言,允许...
在Android系统中,有时我们需要执行一些底层操作,这时就可能会用到shell命令。shell命令是Linux或类Unix系统中的命令行工具,通过它们可以进行文件管理、系统控制、进程交互等众多操作。在Android这样的基于Linux...
Java 调用 Shell 命令 在 Java 中调用 Shell 命令是非常常见的操作,特别是在需要执行系统命令或脚本时。在这个例子中,我们将看到如何使用 Java 调用 Shell 命令,并介绍相关的知识点。 Java 调用 Shell 命令的...
在IT领域,Shell命令是Linux和Unix操作系统中的一个强大工具,它允许用户通过文本界面与操作系统进行交互。这本书“shell命令文档 中文版”提供了一个全面的指南,涵盖了所有基本到高级的Shell命令,这对于系统管理...
Android Debug Bridge(ADB)就是一个强大的工具,允许开发者从计算机上对连接的Android设备进行各种操作,包括发送shell命令。本篇将深入探讨如何在APK程序中执行Adb shell命令以及它与高级语言之间的调用关系。 ...
Linux Shell 命令解释步骤程序实现 Linux Shell 命令解释是 Linux 操作系统中最基本也是最重要的一部分,它负责处理用户与操作系统之间的交互动作,并且给出相应的操作系统的输出结果。 Shell 基本上是一个命令...
ubuntu_shell命令学习
Shell 既是一种命令语言,又是一种程序设计语言。 Shell 是指一种应用程序,这个应用程序提供了一个界面,用户通过这个界面访问操作系统内核的服务。 Ken Thompson 的 sh 是第一种 Unix Shell,Windows Explorer 是...
shell 命令的用法 Shell 命令是 Linux 操作系统中最基本也是最重要的工具之一,它提供了强大的命令行接口,能够帮助用户快速高效地完成各种任务。了解 shell 命令的用法是每一个 Linux 用户的必备知识。 1. cp ...
本单元实现了一个伪的Shell,可以用于在Android程序中执行Shell命令,如果需要Root权限,则在执行前,调用AskForRoot方法来获取用户的Root授权,如果不再需要在Root账号下执行命令,则调用ExitRoot方法来退出Root...
Linux Shell命令是Linux操作系统中用于执行各种操作的指令集,从文件管理到系统维护,Shell命令无所不包。学习Shell命令对于Linux系统管理员和程序员来说是基础而重要的技能。本篇内容将详细介绍Shell命令在Linux...
放在Post Steps 的shell命令 ,一键自动部署(2021最新版)
在Android平台上,有时候开发者需要超越普通应用程序的权限范围,例如执行系统级别的操作,这就涉及到给APP授权和执行Shell命令。Android系统默认是以安全为优先,不允许应用无限制地执行shell命令,但通过获取Root...
Shell命令解析器是Linux操作系统中的一个核心组件,它充当用户与操作系统内核之间的接口,使得用户可以通过命令行界面执行各种操作。在本文中,我们将深入探讨shell命令解析器的工作原理,以及如何使用C语言编程来...
相信喜欢linux的同志会喜欢的 当然针对的是ubuntu 不过 我以后会提供更多的 呵呵
1. **执行shell命令**: ExecuteShell提供了简洁的API,允许开发者在Android应用中执行各种shell命令,包括但不限于ls, cd, mkdir, rm等,极大地扩展了Android应用的功能。 2. **异步与同步执行**: 库支持同步和异步...
### Windows命令大全与Shell命令详解 #### 一、Windows下的Shell命令概述 Windows下的Shell命令通常指的是CMD命令,这是从MS-DOS系统继承下来的特性。Shell命令提供了比图形用户界面更为快速的操作方式,尤其受到...
详细记录了vxworks的shell命令,对于初学vxworks的是极好的资料