本文共 2331 字,大约阅读时间需要 7 分钟。
Sometimes,you want 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 .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
- [root@pkg:~]#mkdir /u01/osc4
2.Using pkgrepo command to create the ha-cluster skeleton repository
- [root@pkg:~]# pkgrepo create /u01/osc4
- [root@pkg:~]# pkgrepo set -s /u01/osc4 publisher/prefix=ha-cluster
- [root@pkg:u01]# more /u01/osc4/pkg5.repository
- [publisher]
- prefix = ha-cluster
- [CONFIGURATION]
- version = 4
- [repository]
- version = 4
3.Add a new instance of the pkg/server service
- [root@pkg:~]# svccfg -s pkg/server add osc4 //osc4 is my new instance name
- [root@pkg:~]# svccfg -s pkg/server:osc4 addpg pkg application
- [root@pkg:~]# svccfg -s pkg/server:osc4 addpg general framework
- [root@pkg:~]# svccfg -s pkg/server:osc4 setprop general/complete=astring:\"\"
- [root@pkg:~]# svccfg -s pkg/server:osc4 setprop general/enabled=boolean: true
4.Set the value of the port and path to repository data
- [root@pkg:~]# svccfg -s pkg/server:osc4 setprop pkg/port=1001
- [root@pkg:~]# svccfg -s pkg/server:osc4 setprop pkg/inst_root=/u01/osc4
5.Refresh and start the repository service instance
- [root@pkg:~]# svcadm refresh pkg/server:osc4
- [root@pkg:~]# svcadm enable pkg/server:osc4
6.Verify that the new instance runs ok
- [root@pkg:~]# 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_id 124
- 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)
- [root@pkg:~]#
- [root@pkg:~]# svcs pkg/server
- STATE STIME FMRI
- online 16:53:44 svc:/application/pkg/server:default
- online 17:13:25 svc:/application/pkg/server:osc4
- [root@pkg:~]#
转载地址:http://wktna.baihongyu.com/