顯示具有 solaris 標籤的文章。 顯示所有文章
顯示具有 solaris 標籤的文章。 顯示所有文章

2011年4月6日 星期三

solaris service

steps to create service:

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).

2011年3月30日 星期三

sharemgr remove share problem

when an asterisk (*) preceding the share. it is a temporary share


We can not delete it


user can access temporary share


It will disappear after reboot 


how to create temporary share:
ex:

sharemgr add-share -t -r peter -s /Test/imac/peter smb_group










share problem:
auto create nfs share because /lib/svc/method/nfs-server call "sharemgr start -P nfs -a" to enable nfs on all group

solution:
not use -a, use specific nfs group name
ex:
sharemgr start -P nfs nfs_group








install gcc on solaris

pkg install gcc-dev
or
pkg install SUNWgcc

2011年3月28日 星期一

2011年3月24日 星期四