1. Create a service manifest file.
this file defines dependency and start/stop script location
ex:
nfs server's manifest file
/lib/svc/manifest/network/nfs/server.xml
content ex:
<exec_method
type='method'
name='start'
exec='/lib/svc/method/nfs-server %m'
timeout_seconds='3600' />
2. Create a methods script file to define the start, stop, and restart methods for the service.
ex:
nfs server's script
/lib/svc/method/nfs-server
3. Validate and import the service manifest using svccfg(1M).
4. Enable or start the service using svcadm(1M).
5. Verify the service is running using svcs(1).
沒有留言:
張貼留言