文档章节

传统IDC部署网站(四)

m
 miko0089
发布于 01/23 20:59
字数 5055
阅读 7
收藏 0

16. chown命令

chown 用来更改一个文件或者目录的所有者护着所属组

-R 级联更改一个目录下所有的目录和文件

chown user1:users 1.txt
chown user1.users 1.tx

useradd

添加用户的命令

useradd user1 

添加user1用户,同时也会添加一个user1用户组

tail

tail 命令是用来查看一个文件最后几行的命令 默认是10行

tail 1.txt
tail -5 1.txt
tail -n 5 1.txt

查看刚刚添加的用户

tail -2 /etc/passwd

id

查看一个用户属于那个组,其中一个用户会有两个组,一个是主组, 一个是附属组

id username 

groupadd

增加组的命令

groupadd users1

history

查看命令历史

!ls

执行命令历史中,从下往上看,第一个ls开头的命令

17. 软链接和硬链接

硬链接

inode 门牌号 会议室弄了2个门 门牌号一致

任何目录下都有 . 和 ..两个隐藏目录

其中.是该目录本身 ..是该目录的上一层目录

结论: 一个目录的(ls -l )第二列的数字,其实就是该目录下面有几个子目录(包含隐藏目录.和..)

[root@localhost /]# ll
total 16
lrwxrwxrwx.   1 root root    7 Jan 20 21:52 bin -> usr/bin
dr-xr-xr-x.   5 root root 4096 Jan 20 22:07 boot
drwxr-xr-x.  20 root root 3100 Jan 23 06:23 dev
drwxr-xr-x.  75 root root 8192 Jan 23 06:23 etc
drwxr-xr-x.   2 root root    6 Apr 11  2018 home
lrwxrwxrwx.   1 root root    7 Jan 20 21:52 lib -> usr/lib
lrwxrwxrwx.   1 root root    9 Jan 20 21:52 lib64 -> usr/lib64
drwxr-xr-x.   2 root root    6 Apr 11  2018 media
drwxr-xr-x.   2 root root    6 Apr 11  2018 mnt
drwxr-xr-x.   2 root root    6 Apr 11  2018 opt
dr-xr-xr-x. 104 root root    0 Jan 23 06:23 proc
dr-xr-x---.   3 root root  169 Jan 21 23:12 root
drwxr-xr-x.  24 root root  720 Jan 23 06:23 run
lrwxrwxrwx.   1 root root    8 Jan 20 21:52 sbin -> usr/sbin
drwxr-xr-x.   2 root root    6 Apr 11  2018 srv
dr-xr-xr-x.  13 root root    0 Jan 23 06:23 sys
drwxrwxrwt.   8 root root  211 Jan 23 06:24 tmp
drwxr-xr-x.  13 root root  155 Jan 20 21:52 usr
drwxr-xr-x.  19 root root  267 Jan 20 22:06 var

常识:目录无法做硬链接,硬链接无法跨磁盘或者分区

手动对文件做硬链接

[root@localhost ~]# ll -i
total 12
67146818 -rw-------. 1 root root 1273 Jan 20 21:59 anaconda-ks.cfg
67146862 -rw-------. 1 root root 1679 Jan 21 00:05 y
67146863 -rw-r--r--. 1 root root  408 Jan 21 00:05 y.pub
[root@localhost ~]# ln y y1
[root@localhost ~]# ll -i
total 16
67146818 -rw-------. 1 root root 1273 Jan 20 21:59 anaconda-ks.cfg
67146862 -rw-------. 2 root root 1679 Jan 21 00:05 y
67146862 -rw-------. 2 root root 1679 Jan 21 00:05 y1
67146863 -rw-r--r--. 1 root root  408 Jan 21 00:05 y.pub

补充:rm 删除一个文件或者目录,删除目录的时候需要加-r -f 是一个强制删除的参数

[root@localhost ~]# rm -r y1
rm: remove regular file ‘y1’? ^C
[root@localhost ~]# rm -rf y1

18. 软链接用法示例

软链接使用绝对路径,防止软链接文件路径变化时,找不到目标文件。

[root@localhost ~]# ln -s /root/y y3
[root@localhost ~]# ll
total 16
-rw-------. 1 root root 1273 Jan 20 21:59 anaconda-ks.cfg
-rw-------. 2 root root 1679 Jan 21 00:05 y
-rw-------. 2 root root 1679 Jan 21 00:05 y1
lrwxrwxrwx. 1 root root    1 Jan 23 06:41 y3 -> y
-rw-r--r--. 1 root root  408 Jan 21 00:05 y.pub
[root@localhost ~]# ll -i
total 16
67146818 -rw-------. 1 root root 1273 Jan 20 21:59 anaconda-ks.cfg
67146862 -rw-------. 2 root root 1679 Jan 21 00:05 y
67146862 -rw-------. 2 root root 1679 Jan 21 00:05 y1
67146822 lrwxrwxrwx. 1 root root    1 Jan 23 06:41 y3 -> y
67146863 -rw-r--r--. 1 root root  408 Jan 21 00:05 y.pub

软链接的作用

  1. 方便查找
  2. 一个文件我想在多个地方都能访问到。
  3. 磁盘扩容

举例:系统里面有两个分区:/123 /abc ,其中/123快满了,还要些一个/123/aaa(1G) 不够,我们可以借用/abc的空间,

[root@localhost 123]# mv aaa /abc/
[root@localhost 123]# ll
total 0
[root@localhost 123]# ln -s /abc/aaa /123/aaa
[root@localhost 123]# ll
total 0
lrwxrwxrwx. 1 root root 8 Jan 23 06:58 aaa -> /abc/aaa

19. yum工具

安装软件包的一个工具,特点,可以联网,还可以方便的解决依赖

yum 安装a文件 ,需要b文件 ,安装b又需要安装c

yum install

[root@localhost 123]# yum install net-tools
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                       | 3.6 kB  00:00:00
extras                                                     | 3.4 kB  00:00:00
updates                                                    | 3.4 kB  00:00:00
(1/4): base/7/x86_64/group_gz                              | 166 kB  00:00:00
(2/4): extras/7/x86_64/primary_db                          | 156 kB  00:00:00
(3/4): updates/7/x86_64/primary_db                         | 1.3 MB  00:00:00
(4/4): base/7/x86_64/primary_db                            | 6.0 MB  00:00:01
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.24.20131004git.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
 Package          Arch          Version                         Repository   Size
==================================================================================
Installing:
 net-tools        x86_64        2.0-0.24.20131004git.el7        base        306 k

Transaction Summary
==================================================================================
Install  1 Package

Total download size: 306 k
Installed size: 918 k
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/net-tools-2.0-0.24.20131004git.el7.                                                                           x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for net-tools-2.0-0.24.20131004git.el7.x86_64.rpm is not installed
net-tools-2.0-0.24.20131004git.el7.x86_64.rpm              | 306 kB  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-6.1810.2.el7.centos.x86_64 (@anaconda)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : net-tools-2.0-0.24.20131004git.el7.x86_64                      1/1
  Verifying  : net-tools-2.0-0.24.20131004git.el7.x86_64                      1/1

Installed:
  net-tools.x86_64 0:2.0-0.24.20131004git.el7

Complete!

ifconfig

[root@localhost 123]# ifconfig -a
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.20  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::724b:7257:5340:f264  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:f4:b6:62  txqueuelen 1000  (Ethernet)
        RX packets 7265  bytes 8798450 (8.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1619  bytes 151728 (148.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 68  bytes 5896 (5.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 68  bytes 5896 (5.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

netstat

[root@localhost 123]# netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3257/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      3631/master
tcp6       0      0 :::22                   :::*                    LISTEN      3257/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      3631/master
udp        0      0 127.0.0.1:323           0.0.0.0:*                           2727/chronyd
udp6       0      0 ::1:323                 :::*                                2727/chronyd
raw6       0      0 :::58                   :::*                    7           2774/NetworkManager
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
unix  2      [ ACC ]     STREAM     LISTENING     25093    3631/master          private/rewrite
unix  2      [ ACC ]     STREAM     LISTENING     25096    3631/master          private/bounce
unix  2      [ ACC ]     STREAM     LISTENING     25088    3631/master          private/tlsmgr
unix  2      [ ACC ]     STREAM     LISTENING     25084    3631/master          public/qmgr
unix  2      [ ACC ]     STREAM     LISTENING     7463     1/systemd            /run/systemd/journal/stdout
unix  2      [ ACC ]     STREAM     LISTENING     25081    3631/master          public/cleanup
unix  2      [ ACC ]     STREAM     LISTENING     14936    1/systemd            /run/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     20585    1/systemd            /run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     25099    3631/master          private/defer
unix  2      [ ACC ]     STREAM     LISTENING     25105    3631/master          private/trace
unix  2      [ ACC ]     STREAM     LISTENING     25108    3631/master          private/verify
unix  2      [ ACC ]     STREAM     LISTENING     25114    3631/master          private/proxymap
unix  2      [ ACC ]     STREAM     LISTENING     25117    3631/master          private/proxywrite
unix  2      [ ACC ]     STREAM     LISTENING     25120    3631/master          private/smtp
unix  2      [ ACC ]     STREAM     LISTENING     25123    3631/master          private/relay
unix  2      [ ACC ]     STREAM     LISTENING     25129    3631/master          private/error
unix  2      [ ACC ]     STREAM     LISTENING     25132    3631/master          private/retry
unix  2      [ ACC ]     STREAM     LISTENING     25135    3631/master          private/discard
unix  2      [ ACC ]     STREAM     LISTENING     25138    3631/master          private/local
unix  2      [ ACC ]     STREAM     LISTENING     25141    3631/master          private/virtual
unix  2      [ ACC ]     STREAM     LISTENING     25144    3631/master          private/lmtp
unix  2      [ ACC ]     STREAM     LISTENING     25147    3631/master          private/anvil
unix  2      [ ACC ]     STREAM     LISTENING     25150    3631/master          private/scache
unix  2      [ ACC ]     STREAM     LISTENING     15241    1/systemd            /run/lvm/lvmetad.socket
unix  2      [ ACC ]     STREAM     LISTENING     25111    3631/master          public/flush
unix  2      [ ACC ]     STREAM     LISTENING     25126    3631/master          public/showq
unix  2      [ ACC ]     STREAM     LISTENING     25077    3631/master          public/pickup
unix  2      [ ACC ]     SEQPACKET  LISTENING     15071    1/systemd            /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     15073    1/systemd            /run/lvm/lvmpolld.socket

yum remove 删除安装包

yum list 查看应用

yum grouplist

[root@localhost 123]# yum grouplist
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Available Environment Groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done

yum install 组名

查找命令是出于那个包的方便安装

[root@localhost 123]# yum provides /*/ifconfig
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
net-tools-2.0-0.24.20131004git.el7.x86_64 : Basic networking tools
Repo        : base
Matched from:
Filename    : /sbin/ifconfig



net-tools-2.0-0.24.20131004git.el7.x86_64 : Basic networking tools
Repo        : @base
Matched from:
Filename    : /sbin/ifconfig


20. rpm工具

挂载光驱

虚拟机下方的小光驱图标,如下命令后 Packages目录下红色的包就是RPM包

[root@localhost mnt]# mount /dev/cdrom /mnt/
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost mnt]# cd /mnt/Packages/

安装 yum-utils


[root@localhost ~]# yum install -y yum-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-50.el7 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-50.el7.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-50.el7.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.el7_2.3 will be installed
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch
--> Running transaction check
---> Package python-chardet.noarch 0:2.2.1-1.el7_1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
 Package                Arch           Version                 Repository    Size
==================================================================================
Installing:
 yum-utils              noarch         1.1.31-50.el7           base         121 k
Installing for dependencies:
 libxml2-python         x86_64         2.9.1-6.el7_2.3         base         247 k
 python-chardet         noarch         2.2.1-1.el7_1           base         227 k
 python-kitchen         noarch         1.1.1-5.el7             base         267 k

Transaction Summary
==================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 861 k
Installed size: 4.3 M
Downloading packages:
(1/4): python-chardet-2.2.1-1.el7_1.noarch.rpm             | 227 kB  00:00:00
(2/4): libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm           | 247 kB  00:00:00
(3/4): python-kitchen-1.1.1-5.el7.noarch.rpm               | 267 kB  00:00:00
(4/4): yum-utils-1.1.31-50.el7.noarch.rpm                  | 121 kB  00:00:00
----------------------------------------------------------------------------------
Total                                                1.7 MB/s | 861 kB  00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-chardet-2.2.1-1.el7_1.noarch                            1/4
  Installing : python-kitchen-1.1.1-5.el7.noarch                              2/4
  Installing : libxml2-python-2.9.1-6.el7_2.3.x86_64                          3/4
  Installing : yum-utils-1.1.31-50.el7.noarch                                 4/4
  Verifying  : libxml2-python-2.9.1-6.el7_2.3.x86_64                          1/4
  Verifying  : python-kitchen-1.1.1-5.el7.noarch                              2/4
  Verifying  : yum-utils-1.1.31-50.el7.noarch                                 3/4
  Verifying  : python-chardet-2.2.1-1.el7_1.noarch                            4/4

Installed:
  yum-utils.noarch 0:1.1.31-50.el7

Dependency Installed:
  libxml2-python.x86_64 0:2.9.1-6.el7_2.3  python-chardet.noarch 0:2.2.1-1.el7_1
  python-kitchen.noarch 0:1.1.1-5.el7

Complete!

下载一个vim 的rpm包

[root@localhost ~]# yumdownloader vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
vim-enhanced-7.4.160-5.el7.x86_64.rpm                      | 1.0 MB  00:00:00
[root@localhost ~]# ll
total 1076
-rw-------. 1 root root    1273 Jan 20 21:59 anaconda-ks.cfg
-rw-r--r--. 1 root root 1087648 Nov 12 09:48 vim-enhanced-7.4.160-5.el7.x86_64.rpm
-rw-------. 1 root root    1679 Jan 21 00:05 y
-rw-r--r--. 1 root root     408 Jan 21 00:05 y.pub

RPM 安装存在依赖关系

[root@localhost ~]# rpm -ivh vim-enhanced-7.4.160-5.el7.x86_64.rpm
error: Failed dependencies:
        libgpm.so.2()(64bit) is needed by vim-enhanced-2:7.4.160-5.el7.x86_64
        libperl.so()(64bit) is needed by vim-enhanced-2:7.4.160-5.el7.x86_64
        perl(:MODULE_COMPAT_5.16.3) is needed by vim-enhanced-2:7.4.160-5.el7.x86_64
        vim-common = 2:7.4.160-5.el7 is needed by vim-enhanced-2:7.4.160-5.el7.x86_64

yum 本地安装


[root@localhost ~]# yum localinstalll vim-enhanced-7.4.160-5.el7.x86_64.rpm
Loaded plugins: fastestmirror
No such command: localinstalll. Please use /usr/bin/yum --help
[root@localhost ~]# yum localinstall vim-enhanced-7.4.160-5.el7.x86_64.rpm
Loaded plugins: fastestmirror
Examining vim-enhanced-7.4.160-5.el7.x86_64.rpm: 2:vim-enhanced-7.4.160-5.el7.x86_                                                                           64
Marking vim-enhanced-7.4.160-5.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.x86_64 2:7.4.160-5.el7 will be installed
--> Processing Dependency: vim-common = 2:7.4.160-5.el7 for package: 2:vim-enhance                                                                           d-7.4.160-5.el7.x86_64
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
--> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: 2:vim-enhanced                                                                           -7.4.160-5.el7.x86_64
--> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.16                                                                           0-5.el7.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 2:vim-enhanced-7.4.160                                                                           -5.el7.x86_64
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-5.el7 will be installed
---> Package perl.x86_64 4:5.16.3-293.el7 will be installed
--> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-293.el7.                                                                           x86_64
--> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-2                                                                           93.el7.x86_64
--> Processing Dependency: perl-macros for package: 4:perl-5.16.3-293.el7.x86_64
--> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-293.el                                                                           7.x86_64
--> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-293.el7.x86_64
--> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-293.el7.x86_6                                                                           4
--> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-293.el7.x8                                                                           6_64
--> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-293.el7.x8                                                                           6_64
--> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-293.el7.x86_6                                                                           4
--> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-293.el7.x86_64
--> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-293.el7.x                                                                           86_64
--> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-293                                                                           .el7.x86_64
--> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-29                                                                           3.el7.x86_64
--> Processing Dependency: perl(Getopt::Long) for package: 4:perl-5.16.3-293.el7.x                                                                           86_64
--> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-293                                                                           .el7.x86_64
--> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-293.el7.x86                                                                           _64
--> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-293.e                                                                           l7.x86_64
--> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-                                                                           293.el7.x86_64
--> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-293.el7.x86                                                                           _64
--> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-293.el7.x86                                                                           _64
--> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-293.el7.x86_6                                                                           4
--> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-293.el7.x86_64
--> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-293.el7.x86_64
---> Package perl-libs.x86_64 4:5.16.3-293.el7 will be installed
---> Package vim-common.x86_64 2:7.4.160-5.el7 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.160-5.el7.                                                                           x86_64
--> Running transaction check
---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed
---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed
---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed
---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed
---> Package perl-Getopt-Long.noarch 0:2.40-3.el7 will be installed
--> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-                                                                           2.40-3.el7.noarch
--> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.                                                                           40-3.el7.noarch
---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simp                                                                           le-3.28-4.el7.noarch
--> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.                                                                           noarch
---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
---> Package perl-Socket.x86_64 0:2.010-4.el7 will be installed
---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed
---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed
---> Package perl-constant.noarch 0:1.27-2.el7 will be installed
---> Package perl-macros.x86_64 4:5.16.3-293.el7 will be installed
---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed
---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed
---> Package vim-filesystem.x86_64 2:7.4.160-5.el7 will be installed
--> Running transaction check
---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
---> Package perl-Pod-Escapes.noarch 1:1.04-293.el7 will be installed
---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed
--> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.6                                                                           3-3.el7.noarch
--> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7                                                                           .noarch
---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed
--> Running transaction check
---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed
--> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.n                                                                           oarch
--> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.e                                                                           l7.noarch
---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed
--> Running transaction check
---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed
---> Package perl-parent.noarch 1:0.225-244.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
 Package                Arch   Version          Repository                   Size
==================================================================================
Installing:
 vim-enhanced           x86_64 2:7.4.160-5.el7  /vim-enhanced-7.4.160-5.el7.x86_64
                                                                            2.2 M
Installing for dependencies:
 gpm-libs               x86_64 1.20.7-5.el7     base                         32 k
 perl                   x86_64 4:5.16.3-293.el7 base                        8.0 M
 perl-Carp              noarch 1.26-244.el7     base                         19 k
 perl-Encode            x86_64 2.51-7.el7       base                        1.5 M
 perl-Exporter          noarch 5.68-3.el7       base                         28 k
 perl-File-Path         noarch 2.09-2.el7       base                         26 k
 perl-File-Temp         noarch 0.23.01-3.el7    base                         56 k
 perl-Filter            x86_64 1.49-3.el7       base                         76 k
 perl-Getopt-Long       noarch 2.40-3.el7       base                         56 k
 perl-HTTP-Tiny         noarch 0.033-3.el7      base                         38 k
 perl-PathTools         x86_64 3.40-5.el7       base                         82 k
 perl-Pod-Escapes       noarch 1:1.04-293.el7   base                         51 k
 perl-Pod-Perldoc       noarch 3.20-4.el7       base                         87 k
 perl-Pod-Simple        noarch 1:3.28-4.el7     base                        216 k
 perl-Pod-Usage         noarch 1.63-3.el7       base                         27 k
 perl-Scalar-List-Utils x86_64 1.27-248.el7     base                         36 k
 perl-Socket            x86_64 2.010-4.el7      base                         49 k
 perl-Storable          x86_64 2.45-3.el7       base                         77 k
 perl-Text-ParseWords   noarch 3.29-4.el7       base                         14 k
 perl-Time-HiRes        x86_64 4:1.9725-3.el7   base                         45 k
 perl-Time-Local        noarch 1.2300-2.el7     base                         24 k
 perl-constant          noarch 1.27-2.el7       base                         19 k
 perl-libs              x86_64 4:5.16.3-293.el7 base                        688 k
 perl-macros            x86_64 4:5.16.3-293.el7 base                         44 k
 perl-parent            noarch 1:0.225-244.el7  base                         12 k
 perl-podlators         noarch 2.5.1-3.el7      base                        112 k
 perl-threads           x86_64 1.87-4.el7       base                         49 k
 perl-threads-shared    x86_64 1.43-6.el7       base                         39 k
 vim-common             x86_64 2:7.4.160-5.el7  base                        5.9 M
 vim-filesystem         x86_64 2:7.4.160-5.el7  base                         10 k

Transaction Summary
==================================================================================
Install  1 Package (+30 Dependent packages)

Total size: 20 M
Total download size: 17 M
Installed size: 60 M
Is this ok [y/d/N]: y
Downloading packages:
(1/30): gpm-libs-1.20.7-5.el7.x86_64.rpm                   |  32 kB  00:00:00
(2/30): perl-Carp-1.26-244.el7.noarch.rpm                  |  19 kB  00:00:00
(3/30): perl-Encode-2.51-7.el7.x86_64.rpm                  | 1.5 MB  00:00:00
(4/30): perl-Exporter-5.68-3.el7.noarch.rpm                |  28 kB  00:00:00
(5/30): perl-File-Path-2.09-2.el7.noarch.rpm               |  26 kB  00:00:00
(6/30): perl-File-Temp-0.23.01-3.el7.noarch.rpm            |  56 kB  00:00:00
(7/30): perl-Getopt-Long-2.40-3.el7.noarch.rpm             |  56 kB  00:00:00
(8/30): perl-Filter-1.49-3.el7.x86_64.rpm                  |  76 kB  00:00:00
(9/30): perl-HTTP-Tiny-0.033-3.el7.noarch.rpm              |  38 kB  00:00:00
(10/30): perl-PathTools-3.40-5.el7.x86_64.rpm              |  82 kB  00:00:00
(11/30): perl-Pod-Escapes-1.04-293.el7.noarch.rpm          |  51 kB  00:00:00
(12/30): perl-Pod-Perldoc-3.20-4.el7.noarch.rpm            |  87 kB  00:00:00
(13/30): perl-Pod-Simple-3.28-4.el7.noarch.rpm             | 216 kB  00:00:00
(14/30): perl-Pod-Usage-1.63-3.el7.noarch.rpm              |  27 kB  00:00:00
(15/30): perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm    |  36 kB  00:00:00
(16/30): perl-5.16.3-293.el7.x86_64.rpm                    | 8.0 MB  00:00:01
(17/30): perl-Text-ParseWords-3.29-4.el7.noarch.rpm        |  14 kB  00:00:00
(18/30): perl-Storable-2.45-3.el7.x86_64.rpm               |  77 kB  00:00:00
(19/30): perl-Time-HiRes-1.9725-3.el7.x86_64.rpm           |  45 kB  00:00:00
(20/30): perl-Time-Local-1.2300-2.el7.noarch.rpm           |  24 kB  00:00:00
(21/30): perl-constant-1.27-2.el7.noarch.rpm               |  19 kB  00:00:00
(22/30): perl-macros-5.16.3-293.el7.x86_64.rpm             |  44 kB  00:00:00
(23/30): perl-libs-5.16.3-293.el7.x86_64.rpm               | 688 kB  00:00:00
(24/30): perl-podlators-2.5.1-3.el7.noarch.rpm             | 112 kB  00:00:00
(25/30): perl-parent-0.225-244.el7.noarch.rpm              |  12 kB  00:00:00
(26/30): perl-Socket-2.010-4.el7.x86_64.rpm                |  49 kB  00:00:01
(27/30): perl-threads-1.87-4.el7.x86_64.rpm                |  49 kB  00:00:00
(28/30): vim-filesystem-7.4.160-5.el7.x86_64.rpm           |  10 kB  00:00:00
(29/30): perl-threads-shared-1.43-6.el7.x86_64.rpm         |  39 kB  00:00:00
(30/30): vim-common-7.4.160-5.el7.x86_64.rpm               | 5.9 MB  00:00:01
----------------------------------------------------------------------------------
Total                                                4.3 MB/s |  17 MB  00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:perl-parent-0.225-244.el7.noarch                            1/31
  Installing : perl-HTTP-Tiny-0.033-3.el7.noarch                             2/31
  Installing : perl-podlators-2.5.1-3.el7.noarch                             3/31
  Installing : perl-Pod-Perldoc-3.20-4.el7.noarch                            4/31
  Installing : 1:perl-Pod-Escapes-1.04-293.el7.noarch                        5/31
  Installing : perl-Encode-2.51-7.el7.x86_64                                 6/31
  Installing : perl-Text-ParseWords-3.29-4.el7.noarch                        7/31
  Installing : perl-Pod-Usage-1.63-3.el7.noarch                              8/31
  Installing : 4:perl-macros-5.16.3-293.el7.x86_64                           9/31
  Installing : perl-Storable-2.45-3.el7.x86_64                              10/31
  Installing : perl-Exporter-5.68-3.el7.noarch                              11/31
  Installing : perl-constant-1.27-2.el7.noarch                              12/31
  Installing : perl-Time-Local-1.2300-2.el7.noarch                          13/31
  Installing : perl-Socket-2.010-4.el7.x86_64                               14/31
  Installing : perl-Carp-1.26-244.el7.noarch                                15/31
  Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                        16/31
  Installing : perl-PathTools-3.40-5.el7.x86_64                             17/31
  Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64                   18/31
  Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch                          19/31
  Installing : perl-File-Temp-0.23.01-3.el7.noarch                          20/31
  Installing : perl-File-Path-2.09-2.el7.noarch                             21/31
  Installing : perl-threads-shared-1.43-6.el7.x86_64                        22/31
  Installing : perl-threads-1.87-4.el7.x86_64                               23/31
  Installing : perl-Filter-1.49-3.el7.x86_64                                24/31
  Installing : 4:perl-libs-5.16.3-293.el7.x86_64                            25/31
  Installing : perl-Getopt-Long-2.40-3.el7.noarch                           26/31
  Installing : 4:perl-5.16.3-293.el7.x86_64                                 27/31
  Installing : 2:vim-filesystem-7.4.160-5.el7.x86_64                        28/31
  Installing : 2:vim-common-7.4.160-5.el7.x86_64                            29/31
  Installing : gpm-libs-1.20.7-5.el7.x86_64                                 30/31
  Installing : 2:vim-enhanced-7.4.160-5.el7.x86_64                          31/31
  Verifying  : perl-HTTP-Tiny-0.033-3.el7.noarch                             1/31
  Verifying  : 2:vim-enhanced-7.4.160-5.el7.x86_64                           2/31
  Verifying  : perl-threads-shared-1.43-6.el7.x86_64                         3/31
  Verifying  : perl-Storable-2.45-3.el7.x86_64                               4/31
  Verifying  : perl-Exporter-5.68-3.el7.noarch                               5/31
  Verifying  : perl-constant-1.27-2.el7.noarch                               6/31
  Verifying  : perl-PathTools-3.40-5.el7.x86_64                              7/31
  Verifying  : 4:perl-macros-5.16.3-293.el7.x86_64                           8/31
  Verifying  : 1:perl-parent-0.225-244.el7.noarch                            9/31
  Verifying  : perl-File-Temp-0.23.01-3.el7.noarch                          10/31
  Verifying  : 1:perl-Pod-Simple-3.28-4.el7.noarch                          11/31
  Verifying  : perl-Time-Local-1.2300-2.el7.noarch                          12/31
  Verifying  : gpm-libs-1.20.7-5.el7.x86_64                                 13/31
  Verifying  : 1:perl-Pod-Escapes-1.04-293.el7.noarch                       14/31
  Verifying  : 2:vim-common-7.4.160-5.el7.x86_64                            15/31
  Verifying  : perl-Socket-2.010-4.el7.x86_64                               16/31
  Verifying  : perl-Carp-1.26-244.el7.noarch                                17/31
  Verifying  : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                        18/31
  Verifying  : perl-Scalar-List-Utils-1.27-248.el7.x86_64                   19/31
  Verifying  : perl-Pod-Usage-1.63-3.el7.noarch                             20/31
  Verifying  : perl-Encode-2.51-7.el7.x86_64                                21/31
  Verifying  : perl-Pod-Perldoc-3.20-4.el7.noarch                           22/31
  Verifying  : perl-podlators-2.5.1-3.el7.noarch                            23/31
  Verifying  : 4:perl-5.16.3-293.el7.x86_64                                 24/31
  Verifying  : perl-File-Path-2.09-2.el7.noarch                             25/31
  Verifying  : perl-threads-1.87-4.el7.x86_64                               26/31
  Verifying  : perl-Filter-1.49-3.el7.x86_64                                27/31
  Verifying  : perl-Getopt-Long-2.40-3.el7.noarch                           28/31
  Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                       29/31
  Verifying  : 4:perl-libs-5.16.3-293.el7.x86_64                            30/31
  Verifying  : 2:vim-filesystem-7.4.160-5.el7.x86_64                        31/31

Installed:
  vim-enhanced.x86_64 2:7.4.160-5.el7

Dependency Installed:
  gpm-libs.x86_64 0:1.20.7-5.el7
  perl.x86_64 4:5.16.3-293.el7
  perl-Carp.noarch 0:1.26-244.el7
  perl-Encode.x86_64 0:2.51-7.el7
  perl-Exporter.noarch 0:5.68-3.el7
  perl-File-Path.noarch 0:2.09-2.el7
  perl-File-Temp.noarch 0:0.23.01-3.el7
  perl-Filter.x86_64 0:1.49-3.el7
  perl-Getopt-Long.noarch 0:2.40-3.el7
  perl-HTTP-Tiny.noarch 0:0.033-3.el7
  perl-PathTools.x86_64 0:3.40-5.el7
  perl-Pod-Escapes.noarch 1:1.04-293.el7
  perl-Pod-Perldoc.noarch 0:3.20-4.el7
  perl-Pod-Simple.noarch 1:3.28-4.el7
  perl-Pod-Usage.noarch 0:1.63-3.el7
  perl-Scalar-List-Utils.x86_64 0:1.27-248.el7
  perl-Socket.x86_64 0:2.010-4.el7
  perl-Storable.x86_64 0:2.45-3.el7
  perl-Text-ParseWords.noarch 0:3.29-4.el7
  perl-Time-HiRes.x86_64 4:1.9725-3.el7
  perl-Time-Local.noarch 0:1.2300-2.el7
  perl-constant.noarch 0:1.27-2.el7
  perl-libs.x86_64 4:5.16.3-293.el7
  perl-macros.x86_64 4:5.16.3-293.el7
  perl-parent.noarch 1:0.225-244.el7
  perl-podlators.noarch 0:2.5.1-3.el7
  perl-threads.x86_64 0:1.87-4.el7
  perl-threads-shared.x86_64 0:1.43-6.el7
  vim-common.x86_64 2:7.4.160-5.el7
  vim-filesystem.x86_64 2:7.4.160-5.el7

Complete!

rpm卸载一个包

rpm -e wget

rpm查询所有安装的包

rpm -qa

rpm查询一个包有无安装

rpm -q vim-enhanced
rpm -q |grep vim

查看软件安装的具体目录

rpm -ql wget

查看一个文件或者命令是由那个RPM生成的

which wget
rpm -qf /usr/bin/wget

© 著作权归作者所有

共有 人打赏支持
m
粉丝 0
博文 26
码字总数 21996
作品 0
私信 提问
IDC:研究表明云计算支出将逐年增长

跟踪云计算市场增长的一个方法是跟踪企业在基础设施和设备的投资。 云计算市场增长更快 根据IDC公司的报告,全球IT基础架构产品(包括服务器,企业存储和以太网交换机)在云计算环境中的总支...

玄学酱
2018/03/30
0
0
2019~2020年IDC行业发展趋势预测

一、IDC市场规模预测 国内IDC市场已进入成熟期。互联网企业的IDC应用场景更加稳定、传统企业数字化转型占比日趋提升,未来两年IDC市场增速趋缓,整体市场规模仍将保持上升趋势。 随着5G、物联...

架构师技术联盟
01/12
0
0
亮相2017全球运维大会 SinoBBD分享第三方公立IDC网络运营之道

2017全球运维大会于7月28-29日在北京盛大开幕。本次大会由开放运维联盟(OOPSA)和高效运维社区(GreatOPS)联合主办。全球运维大会是国内第一个运维行业的盛会,面向互联网及传统行业广大运...

玄学酱
2018/03/19
0
0
传华为阿里获IDC牌照 互联网底层产业隐现变局

近日,媒体引述知情人士消息称,华为、阿里巴巴等十余家企业已经获得IDC(互联网数据中心)业务牌照。IDC行业是互联网的底层产业,对行业的发展起着重要支撑作用。随着IDC牌照的进一步开放,...

oschina
2013/07/30
4.1K
13
IDC与百度联合发报告:预测2019年人工智能十大趋势

来源:网络大数据 12月20日,国际数据公司(IDC)与百度AI产业研究中心(BACC)联合发布《百度大脑领导力白皮书》,白皮书预测了2019年中国人工智能市场发展趋势,通过实际案例解析人工智能如何从...

人工智能学家
2018/12/28
0
0

没有更多内容

加载失败,请刷新页面

加载更多

matlab-自控原理 rlocfind 根轨迹 通过鼠标点击图上一点得到该点的k与特征根

  matlab : R2018a 64bit     OS : Windows 10 x64 typesetting : Markdown    blog : my.oschina.net/zhichengjiu    gitee : gitee.com/zhichengjiu   code clearclcclosenu......

志成就
3分钟前
0
0
Nginx负载均衡

Nginx负载均衡 负载均衡:负载均衡(Load Balance)其意思就是分摊到多个操作单元上进行执行,例如Web服务器、FTP服务器、企业关键应用服务器和其它关键任务服务器等,从而共同完成工作任务。...

李超小牛子
55分钟前
0
0
ABUSE建了个恶意网站数据库

数据库已经按不同类型标记了各种恶意网站,例如它们当前是否在线,恶意内容类型,潜在威胁信息等。安全软件开发人员和浏览器开发人员可以免费使用此数据库来帮助用户拦截可能存在威胁的恶意网...

linuxCool
今天
2
0
【SQL】- 高级用法

数值和字符范围比较: between select *from books where price>=23.5 and price<=35; -- 等价于select *from books where price between 23.5 and 35; -- between包含边界的比较>= / <=......

ZeroneLove
今天
8
0
RabbitMQ如何解决各种情况下丢数据的问题

1.生产者丢数据 如果想学习Java工程化、高性能及分布式、深入浅出。微服务、Spring,MyBatis,Netty源码分析的朋友可以加我的Java高级交流:854630135,群里有阿里大牛直播讲解技术,以及Jav...

编程SHA
今天
6
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部