跳到正文

2016-04-15文章smartos2 min read

smartos上如何安装软件

SmartOS使用NetBSD的pkgsrc来安装软件。 具体方式如下:

  1. 安装pkgin工具: 先到 http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/上看看最新的pkgin源码包是什么。如目前最新为bootstrap-2015Q4-x86_64.tar.gz

  2. 安装

    cd /
    curl -k http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2015Q4-x86_64.tar.gz | gzcat | tar -xf -
  3. 重新编译软件包数据库

    # pkg_admin rebuild
  4. 更新pkgin数据库

    pkgin -y up
  5. 安装软件

    pkgin in  pkg_name
  6. pkgin常用命令列表

    CommandDescription
    pkgin upUpdates the pkgin database. You should run this command before installing any new packages just in case.
    pkgin lsLists all the installed packages
    pkgin avLists all of the available packages
    pkgin inInstalls a package
    pkgin rmRemoves a package
    pkgin seSearches for a package
    pkginWith no additional arguments, lists all of the available pkgin commands.