PKGSRC(7) | Standards, Environments, and Macros | PKGSRC(7) |
pkgsrc
— zone
brand for running a reduced copy of OmniOS alongside Joyent's pkgsrc
repository
The pkgsrc brand uses the brands(7) framework to provide an environment for running a small copy of Omnios, with system software packages linked to those installed in the global zone.
A pkgsrc zone is a sparse(7) zone which is pre-configured to use Joyent's binary package repository. This provides access to over 20,000 ready-built packages ready to install and use. Within a pkgsrc zone, use the pkgin command to manage these packages which are all installed under the /opt/local directory. Like ipkg(7) zones, pkgsrc zones can have multiple boot environments, created either locally within the zone or managed automatically from the global zone as BEs are created/destroyed there.
Given their small size, low overhead and ease of maintenance, it is common to use pkgsrc zones for running individual services such as an NTP, DHCP or DNS server.
Persistent network configuration (including DNS resolver information) can be configured using zonecfg(8). An example lipkg zone configured with VNIC "vnic0" using a static IP address is below:
create -t pkgsrc set zonepath=/zones/testzone set autoboot=true add net set physical=vnic0 set allowed-address=192.168.0.2/24 set defrouter=192.168.0.1 set global-nic=auto end add attr set name=dns-domain set type=string set value=example.com end add attr set name=resolvers set type=string set value=192.168.12.1,192.168.13.1 end
Within a pkgsrc zone, the /usr, /lib and /sbin directories are read-only.
pkgsrc zone boot environments are linked to the global zone boot environment under which they were created. This means that rolling back the global zone to a previous boot environment will also roll back the zone. For this reason, zone data which should be shared across boot environments should be allocated to a dedicated dataset.
brands(7), ipkg(7), privileges(7), resource_controls(7), zones(7), zfs(8), zoneadm(8), zonecfg(8)
March 25, 2019 | OmniOS |