UNIXLinux系统管理技术入门手册:增加新软件

   增加新软件

  如果需要安装额外的软件首先要确定相关软件包的标准名称例如需要把我想装locate转换为我需要安装findutils软件包或者把我要named转换为我必须安装BIND在网上各种针对特定系统的索引能够帮助做转换但是Google通常更有效例如搜索locate命令就能直接找到若干与之相关的讨论如果是在UNIX上那么还需要输入操作系统的名字

  一旦知道了相关软件的确切名称就可以下载并安装它在Linux和安装了pkgutil的Solaris系统上整个安装过程通常用一条命令就够了对于HPUX和AIX而言则要么下载预编译好的二进制软件包要么下载项目的源代码如果是后者需要通过Google定位该项目的正式网站然后从项目的镜像站点之一下载源代码

  下面的例子展示了在我们的每一种示例系统上安装wget命令它是一个很棒的GNU工具能够把HTTP和FTP下载变成单条命令对于脚本编程来说非常有用我们所举的每种Linux系统默认都安装了wget但是下面给出的命令用于初始化安装和后续升级

  Ubuntu使用APT(Debian Advanced Package ToolDebian高级软件包工具)

  ubuntu# aptget install wget

  Reading package lists… Done

  Building dependency tree

  Reading state information… Done

  wget is already the newest version

   upgraded newly installed to remove and not upgraded

  SUSE版的操作

  suse# yast install wget

  <在一个基于终端的UI里运行>

  Red Hat版的操作

  redhat# yum install wget

  Loaded plugins: fastestmirror

  …

  Parsing package install arguments

  Package wgeteli is already installed and latest version

  Nothing to do

  在已经装有pkgutil的Solaris系统上(参考blastwaveorg来了解配置说明)

  solaris# /opt/csw/bin/pkgutil install wget

  <安装了个软件包产生的多页输出信息>

  对于HPUX我们在hpuxconnectorguk上找到了一个适用的二进制软件包把它下载到/tmp目录下解压缩和安装的命令如下

  hpux# gunzip /tmp/wgethppadepotgz

  hpux# swinstall s /tmp/wgethppadepot wget

  ======= // :: EDT BEGIN swinstall SESSION (noninteractive) (jobid=hpux)

  * Session started for user root@hpux

  * Beginning Selection

  * Target connection succeeded for hpux:/

  * Source:/tmp/wgethppadepot

  * Targets:hpux:/

  * Software selections:

  wgetwgetRUNr=a=HPUX_B/

  * Selection succeeded

  * Beginning Analysis and Execution

  …

  * Analysis and Execution succeeded

  在swinstall命令行里出现的depot软件包必须用/开头的完整路径否则swinstall就会到网络上找文件最后的wget告诉swinstall从depot文件里安装哪个软件包

  遗憾的是这个安装过程没有乍看上去那么简单装好的wget版本实际上无法运行因为没有装它所依赖的几个库

  hpux$ wget http://sambaorg/samba/docs/SambaHOWTOpdf

  /usr/lib/dldsl: Cant open shared library: /usr/local/lib/ libcryptosl

  /usr/lib/dldsl: No such file or directory

  [HP ARIES]: Core file for bit PARISC application

  [HP ARIES]: /usr/local/bin/wget saved to /tmp/corewget

  swinstall内置有依赖关系的管理机制但是遗憾的是它的这种功能不能延伸到Internet上的软件库里用户不得不根据提示安装所有要求预装的软件包(本例中有个之多)以达到最终目标

返回目录UNIX Linux系统管理技术入门手册

编辑推荐

Linux命令行大全

Windows 应用开发权威指南

常用工具软件培训视频教程

更有一种逍遥,浑然忘我,与大自然交融的境界令人心弛神往。

UNIXLinux系统管理技术入门手册:增加新软件

相关文章:

你感兴趣的文章:

标签云: