Balling’s Bits

Install Packages From Joyent/SmartOS Repository in OmniOS

There are a few issues with the OmniOS package repositories as mentioned by gea of napp-it:

  • Applications are spread over several repositories
  • Applications are sometimes outdated without regular updates
  • The repositories contain only a few applications
  • The repositories are OS dependent

In contrast, the Joyent/SmartOS package repositories contain a lot of useful packages in one place, and are frequently updated.

To use Joyent/SmartOS packages in OmniOS (here in a zone) start by installing gnu-tar (gtar):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
pkg install gnu-tar
           Packages to install:  1
       Create boot environment: No
Create backup boot environment: No

DOWNLOAD               PKGS       FILES    XFER (MB)
Completed               1/1       41/41      0.9/0.9

PHASE                                        ACTIONS
Install Phase                                123/123

PHASE                                          ITEMS
Package State Update Phase                       1/1
Image State Update Phase                         2/2

Next, install the Joyent/SmartOS bootstrap loader (modify 2014Q2-x86_64 to match current repository and architecture):

1
2
3
4
5
curl http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2014Q2-x86_64.tar.gz | \
gtar -zxpf - -C /
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 30.9M  100 30.9M    0     0   587k      0  0:00:54  0:00:54 --:--:--  642k

Since Joyent/SmartOS packages are installed in /opt/local update your path (this can be done permanently by modifying the PATH in ~./profile):

1
export PATH=/opt/local/sbin:/opt/local/bin:$PATH

Update the repository database:

1
2
3
4
5
6
7
pkgin -y update
reading local summary...
processing local summary...
updating database: 100%
pkg_summary.bz2                                    100% 1919KB 479.8KB/s  29.3KB/s   00:04
processing remote summary (http://pkgsrc.joyent.com/packages/SmartOS/2014Q2/x86_64/All)...
updating database: 100%

You are ready to search or install packages:

1
2
pkgin search php55-*
pkgin -y install apache-2.4.10

All packages can be viewed at the repository.

Comments