solaris 11 add pkg

svcadm disable application/pkg/server
svccfg –s application/pkg/server setprop \
pkg/readonly=false
svcadm refresh application/pkg/server
svcadm enable application/pkg/server

mkdir –p /var/tmp/new_package
cd /var/tmp/new_package
vi ips_rocks IPS makes software update easy!

eval 'pkgsend -s \ http://s11-serv1.mydomain.com open new_package@1.0-1'
export PKG_TRANS_ID=1300392779_pkg%3A%2F%2Fsolaris%2Fnew_package%401.0%2 C5.11-1%3A20110317T201259Z

export \ PKG_TRANS_ID=1300392779_pkg%3A%2F%2Fsolaris%2Fnew_package%401.0%2 C5.11-1%3A20110317T201259Z

pkgsend -s \ http://s11-serv1.mydomain.com add dir mode=0555 owner=root \ group=bin path=/export/new_package

pkgsend -s \ http://s11-serv1.mydomain.com add file \ /var/tmp/new_package/ips_rocks mode=0555 owner=root group=bin \
path=/export/new_package/ips_rocks

pkgsend -s \ http://s11-serv1.mydomain.com add set name=description \ value="My first IPS package"

pkgsend -s \ http://s11-serv1.mydomain.com close

svcadm disable application/pkg/server

svccfg –s application/pkg/server setprop \
pkg/readonly=true
svcadm refresh application/pkg/server
svcadm enable application/pkg/server
pkgrepo refresh -s /export/IPS/repo

pkg search new_package
INDEX ACTION VALUE PACKAGE
basename dir export/new_package pkg:/new_package@1.0-1
pkg.fmri set solaris/new_package pkg:/new_package@1.0-1

pkg install new_package
pkg list new_package
pkg verify -v new_package
cat /export/new_package/ips_rocks

This entry was posted in solaris. Bookmark the permalink.

Comments are closed.