`

通过pkg-get在Solaris上通过互联网安装软件

阅读更多
1. 安装CSWpkggeg (Install CSWpkgget)

以root权限运行命令:pkgadd -d http://www.blastwave.org/pkg_get.pkg
Run following command as root: pkgadd -d http://www.blastwave.org/pkg_get.pkg

该命令会安装CSWpkgget,这是从BlastWave(最大的Solaris自由软件下载网站之一)上下载并安装软件所需要的包。
This command will install the CSWpkgget package, which is required to automatically download and install packages from BlastWave (one of biggest free software service for Solaris).

当出现提示询问是否继续处理时,输入all,并按回车进行安装。
Type 'all' and enter when asking whether to process.

当询问是否创建目录和安装包时,输入y,按回车继续。
Type 'y' and enter when asking whether to create a directory and install the package.

当安装完成后,会提示:Installation of <CSWpkgget> was successful.
It would print the following words when installation completes: Installation of <CSWpkgget> was successful.

2. 配置pkg-get (Configure pkg-get)

编辑配置文件/opt/csw/etc/pkg-get.conf,将其预设站点url=http://ibiblio.org/pub/packages/solaris/csw/unstable改为和你位置最近的镜像站点。镜像可以在www.blastwave.org/mirrors.php处查询。
Edit the configuration file /opt/csw/etc/pkg-get.conf, change its default site url=http://ibiblio.org/pub/packages/solaris/csw/unstable to the one nearest. The mirrors can be found at www.blastwave.org/mirrors.php.

将pkg-get所在的路径/opt/csw/bin/添加到PATH变量中去,重新登录,并使用echo $PATH命令确认添加成功。
Add the direcroty "/opt/csw/bin/" of command pkg-get to the PATH env variable, relogin, and use the "echo $PATH" to confirm the change.

3. 使用pkg-get命令 (use the pkg-get command)

3.1 安装 (install)

pkg-get install <package name>

3.2 升级 (upgrade)

pkg-get upgrage <package name>

3.3 删除 (remove)

pkg-get remove <package name>

3.4 列出所有已安装软件 (list all installed packages)

pkg-get list

3.5 列出所有可安装软件 (list all available packages)

pkg-get available
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics