{"id":710,"date":"2010-06-30T12:00:03","date_gmt":"2010-06-30T08:00:03","guid":{"rendered":"http:\/\/www.unixpin.com\/wordpress\/?p=710"},"modified":"2010-06-30T12:00:03","modified_gmt":"2010-06-30T08:00:03","slug":"new-smf-service-solaris","status":"publish","type":"post","link":"https:\/\/www.unixpin.com\/?p=710","title":{"rendered":"\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 Solaris \u043d\u043e\u0432\u0443\u044e \u0441\u043b\u0443\u0436\u0431\u0443 (smf service) ?"},"content":{"rendered":"<p>\u0422\u043e \u0447\u0442\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f Solaris \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c \u0438\u0437 \/etc\/init.d &#8212; \/etc\/rc?.d, \u0432 Solaris 10 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0441\u043b\u0443\u0436\u0431\u044b (SMF &#8212; <a href=\"http:\/\/ru.wikipedia.org\/wiki\/Service_Management_Facility\">Service Management Facility<\/a>)<br \/>\n\u041a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u043b\u0443\u0436\u0431\u0443, \u0431\u0435\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0440\u044b\u0442\u044c \u043a\u0443\u0447\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 ?<br \/>\n\u0414\u0432\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e:<\/p>\n<ul>\n<li><a href=\"http:\/\/sunhelp.ru\/archives\/86-Konvertiruem_rc-skript_v_SMF_sluZhbu_Solaris.html\" target=\"_blank\">\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c rc-\u0441\u043a\u0440\u0438\u043f\u0442 \u0432 SMF \u0441\u043b\u0443\u0436\u0431\u0443 Solaris<\/a><\/li>\n<li><a href=\"http:\/\/www.akamit.com\/blog\/2010\/02\/simple-template-like-smf-configuration\" target=\"_blank\">Simple template-like smf configuration<\/a><\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f SMF <del datetime=\"2010-06-29T13:51:05+00:00\">\u043a\u043e\u043d\u0444\u0438\u0433\u0430<\/del> \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u0438\u0437 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<br \/>\n<!--more--><br \/>\n\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043a\u043e\u0439 <strong>manifold<\/strong>.<br \/>\n\u042d\u0442\u043e \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f ;(<br \/>\n\u0418\u0442\u0430\u043a, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c <a href=\"http:\/\/pypi.python.org\/pypi\/setuptools#downloads\" target=\"_blank\">setuptools source<\/a>, <a href=\"http:\/\/genshi.edgewall.org\/wiki\/Download\" target=\"_blank\">Genshi  source<\/a> \u0438 <a href=\"http:\/\/pypi.python.org\/pypi\/Manifold\" target=\"_blank\">Manifold  source<\/a>.<br \/>\n\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 3 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430<\/p>\n<p><code>bash-3.00$ ls -l<br \/>\ntotal 3668<br \/>\ndrwxr-xr-x   9 root     root         512 Jun 29 17:56 Genshi-0.6<br \/>\n-rw-r--r--   1 korolev  other     842494 Jun 29 16:54 Genshi-0.6.zip<br \/>\ndrwxrwxr-x   7 501      501          512 Jun 29 17:45 Manifold-0.2.0<br \/>\n-rw-r--r--   1 korolev  other      40960 Jun 29 14:39 Manifold-0.2.0.tar<br \/>\ndrwxrwxr-x   7 506      506         1024 Jun 29 16:13 setuptools-0.6c11<br \/>\n-rw-r--r--   1 korolev  other     952320 Jun 29 15:08 setuptools-0.6c11.tar<\/code><\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c setuptool, \u0437\u0430\u0442\u0435\u043c genshi, \u0437\u0430\u0442\u0435\u043c Manifold:<br \/>\n<code># cd setuptools-0.6c11; python setup.py install<br \/>\n# cd ..\/Genshi-0.6; python setup.py install<br \/>\n# cd ..\/Manifold-0.2.0; python setup.py install<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043a\u0430 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0442\u0441\u044f, \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \/usr\/bin<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b-\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442:<br \/>\n<code>bash-3.00$ <strong>manifold test1.xml<\/strong><\/code><\/p>\n<p><code>The service category (example: 'site' or '\/application\/database') [site]<\/code><\/p>\n<p><code>The name of the service, which follows the service category<br \/>\n(example: 'myapp') [] <strong>my_test_app<\/strong><\/code><\/p>\n<p><code>The version of the service manifest (example: '1') [1]<\/code><\/p>\n<p><code>The human readable name of the service<br \/>\n(example: 'My service.') [] <strong>My test service<\/strong><\/p>\n<p>Can this service run multiple instances (yes\/no) [no] ?<\/p>\n<p>Full path to a config file; leave blank if no config file<br \/>\nrequired (example: '\/etc\/myservice.conf') [] <strong>\/export\/home\/test1app\/test1.cfg<\/strong><\/p>\n<p>The full command to start the service; may contain<br \/>\n'%{config_file}' to substitute the configuration file<br \/>\n(example: '\/usr\/bin\/myservice %{config_file}') []  <strong>\/export\/home\/test1app\/bin\/app -c %{config_file}' start<\/strong><\/p>\n<p>The full command to stop the service; may specify ':kill' to let<br \/>\nSMF kill the service processes automatically<br \/>\n(example: '\/usr\/bin\/myservice_ctl stop' or ':kill' to let SMF kill<br \/>\nthe service processes automatically) [:kill] <strong>\/export\/home\/test1app\/bin\/app stop<\/strong><\/p>\n<p>Choose a process management model:<br \/>\n'wait'      : long-running process that runs in the foreground (default)<br \/>\n'contract'  : long-running process that daemonizes or forks itself<br \/>\n(i.e. start command returns immediately)<br \/>\n'transient' : short-lived process, performs an action and ends quickly<br \/>\n[wait] <strong>contract<\/strong><\/p>\n<p>Does this service depend on the network being ready (yes\/no) [yes] ?<\/p>\n<p>Does this service depend on the local filesystems being ready (yes\/no) [yes] ?<\/p>\n<p>Should the service be enabled by default (yes\/no) [no] ?<\/p>\n<p>The user to change to when executing the<br \/>\nstart\/stop\/refresh methods (example: 'webservd') [] <strong>testuser<\/strong><\/p>\n<p>The group to change to when executing the<br \/>\nstart\/stop\/refresh methods (example: 'webservd') [] <strong>testuser<\/strong><\/p>\n<p>Manifest written to test1.xml<br \/>\nYou can validate the XML file with \"svccfg validate test1.xml\"<br \/>\nAnd create the SMF service with \"svccfg import test1.xml\"<\/p>\n<p><\/code><\/p>\n<p><code>bash-3.00$ <strong>cat test1.xml<\/strong><br \/>\n....<br \/>\n<\/code><\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438 \u0432 \u0442\u0435\u043c\u0443:<br \/>\n<a href=\"http:\/\/www.sun.com\/bigadmin\/content\/selfheal\/smf-quickstart.jsp\">Solaris Service Management Facility &#8212; Quickstart Guide<\/a><br \/>\n<a href=\"http:\/\/www.sun.com\/blueprints\/0206\/819-5150.pdf\">SMF Sun BluePrint<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0422\u043e \u0447\u0442\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f Solaris \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c \u0438\u0437 \/etc\/init.d &#8212; \/etc\/rc?.d, \u0432 Solaris 10 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0441\u043b\u0443\u0436\u0431\u044b (SMF &#8212; Service Management Facility) \u041a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u043b\u0443\u0436\u0431\u0443, \u0431\u0435\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0440\u044b\u0442\u044c \u043a\u0443\u0447\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 ? \u0414\u0432\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e: \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c rc-\u0441\u043a\u0440\u0438\u043f\u0442 \u0432 SMF \u0441\u043b\u0443\u0436\u0431\u0443 Solaris Simple template-like smf configuration [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,372],"tags":[875,870,533,867,868,869,314,866,872,865,876,877,1016,871,873,874],"class_list":["post-710","post","type-post","status-publish","format-standard","hentry","category-solaris","category-372","tag-etcrc3-d","tag-configuretion","tag-docs","tag-faq","tag-manifest","tag-manifold","tag-reference","tag-service","tag-service-management-facility","tag-smf","tag-start","tag-stop","tag-solaris","tag-xml","tag-873","tag-874"],"_links":{"self":[{"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/posts\/710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=710"}],"version-history":[{"count":3,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/posts\/710\/revisions"}],"predecessor-version":[{"id":713,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=\/wp\/v2\/posts\/710\/revisions\/713"}],"wp:attachment":[{"href":"https:\/\/www.unixpin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unixpin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}