yum命令可以从指定的服务器下载rpm包,自动安装,自动处理包之间的依赖关系

    安装指定的软件包
    yum install xxx

    1. [root@localhost ~]# yum list|more
    2. Loaded plugins: refresh-packagekit, security
    3. file:///media/NeoKylin-3.2/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/NeoKylin-3.2/repodata/repomd.xml
    4. Trying other mirror.
    5. Installed Packages
    6. ConsoleKit.x86_64 0.4.1-3.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    7. ConsoleKit-libs.x86_64 0.4.1-3.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    8. ConsoleKit-x11.x86_64 0.4.1-3.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    9. DeviceKit-power.x86_64 014-3.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    10. GConf2.x86_64 2.28.0-6.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    11. GConf2-gtk.x86_64 2.28.0-6.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    12. MAKEDEV.x86_64 3.24-6.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    13. ModemManager.x86_64 0.4.0-5.git20100628.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    14. NetworkManager.x86_64 1:0.8.1-66.1.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    15. NetworkManager-glib.x86_64 1:0.8.1-66.1.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    16. NetworkManager-gnome.x86_64 1:0.8.1-66.1.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    17. ORBit2.x86_64 2.14.17-3.2.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    18. PackageKit.x86_64 0.5.8-21.2.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    19. PackageKit-device-rebind.x86_64 0.5.8-21.2.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    20. PackageKit-glib.x86_64 0.5.8-21.2.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2

    查询已安装的软件包
    yum list |grep xxx

    1. [root@localhost ~]# yum list |grep ssh
    2. file:///media/NeoKylin-3.2/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/NeoKylin-3.2/repodata/repomd.xml
    3. Trying other mirror.
    4. libssh2.x86_64 1.4.2-1.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    5. openssh.x86_64 5.3p1-94.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    6. openssh-askpass.x86_64 5.3p1-94.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    7. openssh-clients.x86_64 5.3p1-94.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    8. openssh-server.x86_64 5.3p1-94.ky3 @anaconda-NeoKylin-201409260501.x86_64/3.2
    9. libssh2.i686 1.4.2-1.ky3 base
    10. trilead-ssh2.noarch 213-6.2.ky3 base