FragranceM 发表于 2018-10-19 07:54:58

Creating A Second Instance of the IPS Repository Server With SMF-candon123

  Sometimes,youwant to configure multiple IPS repository running in one server.Such as solaris repository and solaris cluster repository or update repository coexist in one server.To do that you must use Solaris SMF to Manage the pkg.depotd processes as services.For more information from here.I'm going to show you how to add a ha-cluster instance to the pkg/server service.
  1.Create a filesystem or directory to save the repository data
  


[*]#mkdir /u01/osc4
  

  2.Using pkgrepo command to create the ha-cluster skeleton repository
  


[*]# pkgrepo create /u01/osc4
[*]# pkgrepo set -s /u01/osc4 publisher/prefix=ha-cluster
[*]# more /u01/osc4/pkg5.repository
[*]
[*]prefix = ha-cluster
[*]
[*]version = 4
[*]
[*]version = 4
  

  3.Add a new instance of the pkg/server service
  


[*]# svccfg -s pkg/server add osc4   //osc4 is my new instance name
[*]# svccfg -s pkg/server:osc4 addpg pkg application
[*]# svccfg -s pkg/server:osc4 addpg general framework
[*]# svccfg -s pkg/server:osc4 setprop general/complete=astring:\"\"
[*]# svccfg -s pkg/server:osc4 setprop general/enabled=boolean: true
  

  4.Set the value of the port and path to repository data
  


[*]# svccfg -s pkg/server:osc4 setprop pkg/port=1001
[*]# svccfg -s pkg/server:osc4 setprop pkg/inst_root=/u01/osc4
  

  5.Refresh and start the repository service instance
  


[*]# svcadm refresh pkg/server:osc4
[*]# svcadm enable pkg/server:osc4
  

  6.Verify that the new instance runs ok
  


[*]# svcs -l pkg/server:osc4
[*]fmri         svc:/application/pkg/server:osc4
[*]name         image packaging repository
[*]enabled      true
[*]state      online
[*]next_state   none
[*]state_time   May 22, 2012 05:13:25 PM CST
[*]logfile      /var/svc/log/application-pkg-server:osc4.log
[*]restarter    svc:/system/svc/restarter:default
[*]contract_id124
[*]manifest   /lib/svc/manifest/application/pkg/pkg-server.xml
[*]dependency   require_all/none svc:/system/filesystem/local (online)
[*]dependency   optional_all/none svc:/system/filesystem/autofs (online)
[*]dependency   optional_all/none svc:/network/ntp (disabled)
[*]dependency   require_all/none svc:/milestone/network (online)
[*]#

  


[*]# svcs pkg/server
[*]STATE          STIME    FMRI
[*]online         16:53:44 svc:/application/pkg/server:default
[*]online         17:13:25 svc:/application/pkg/server:osc4
[*]#


页: [1]
查看完整版本: Creating A Second Instance of the IPS Repository Server With SMF-candon123