<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>We Eat Bricks :: Web Development Blog &#187; Solaris</title>
	<atom:link href="http://weeatbricks.com/category/solaris/feed/" rel="self" type="application/rss+xml" />
	<link>http://weeatbricks.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 23 May 2010 12:08:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SMF support for Apache on Solaris</title>
		<link>http://weeatbricks.com/2007/07/18/smf-support-for-apache-on-solaris/</link>
		<comments>http://weeatbricks.com/2007/07/18/smf-support-for-apache-on-solaris/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 11:07:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.weeatbricks.com/?p=35</guid>
		<description><![CDATA[Good tutorial on this topic here: http://blogs.sun.com/shanti/entry/smf_support_for_apache_in
]]></description>
			<content:encoded><![CDATA[<p>Good tutorial on this topic here: <a href="http://blogs.sun.com/shanti/entry/smf_support_for_apache_in">http://blogs.sun.com/shanti/entry/smf_support_for_apache_in</a></p>
]]></content:encoded>
			<wfw:commentRss>http://weeatbricks.com/2007/07/18/smf-support-for-apache-on-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloning Solaris Zone tutorial</title>
		<link>http://weeatbricks.com/2007/07/12/cloning-solaris-zone-tutorial/</link>
		<comments>http://weeatbricks.com/2007/07/12/cloning-solaris-zone-tutorial/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 11:38:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.weeatbricks.com/?p=33</guid>
		<description><![CDATA[James over at mernin.com has posted a bunch of excellent Solaris tutorials. The latest is on Cloning a Solaris Zone could prove useful to the Solaris articles I&#8217;ve posted here.
Nice one James!

]]></description>
			<content:encoded><![CDATA[<p>James over at <a href="http://mernin.com">mernin.com</a> has posted a bunch of excellent Solaris tutorials. The latest is on <a href="http://mernin.com/blog/?p=68">Cloning a Solaris Zone</a> could prove useful to the Solaris articles I&#8217;ve posted here.</p>
<p>Nice one James!</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://weeatbricks.com/2007/07/12/cloning-solaris-zone-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMF support for MySQL in Cool Stack</title>
		<link>http://weeatbricks.com/2007/07/04/smf-support-for-mysql-in-cool-stack/</link>
		<comments>http://weeatbricks.com/2007/07/04/smf-support-for-mysql-in-cool-stack/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 11:43:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.weeatbricks.com/?p=30</guid>
		<description><![CDATA[The post derives heavily from Shanti&#8217;s Sun Micro Systems blog.
        For a succinct explanation from www.oreillynet.com .
        SMF try this from or Solaris 10, Sun introduced the Service Management Facility. SMF is a framework that handles system boot-up, process management, and [...]]]></description>
			<content:encoded><![CDATA[<p>The post derives heavily from Shanti&rsquo;s Sun Micro Systems <a href="http://blogs.sun.com/shanti/entry/smf_support_for_mysql_in">blog.</a></p>
<p>        For a succinct explanation from <a href="http://www.oreillynet.com/pub/a/sysadmin/2006/04/13/using-solaris-smf.html">www.oreillynet.com</a> .</p>
<p>        SMF try this from or Solaris 10, Sun introduced the Service Management Facility. SMF is a framework that handles system boot-up, process management, and self-healing. It addresses the shortcomings of startup scripts and creates an infrastructure to manage daemons after the host has booted.</p>
<p>        The following steps are required to add MySQL as a service into Solaris SMF. We added the 32-bit version on MySQL that comes with the Cool Stack CSKAmp package.      </p>
<p>&nbsp;</p>
<h3>Create the manifest</h3>
<p>A service needs a file called a manifest.&nbsp; A service manifest describes the service and its management needs. It lists the service dependencies, the control scripts, and the actions to take when the service fails. The manifest starts out as an XML file that SMF imports into a central repository, which records the properties of all the services.</p>
<p>        Create a file named /var/svc/manifest/network/cskmysql.xml with the following contents : </p>
<div class="code">&nbsp;&lt;?xml version=&#8217;1.0&#8242;?&gt;<br />        &nbsp;&lt;!DOCTYPE service_bundle SYSTEM &#8216;/usr/share/lib/xml/dtd/service_bundle.dtd.1&#8242;&gt;<br />        &lt;!&#8211;<br />        &nbsp;&nbsp;&nbsp; Copyright 2006,2007 Sun Microsystems, Inc.&nbsp; All rights reserved.<br />        &nbsp;&nbsp;&nbsp; Manifest for CSKmysql &#8211; should reside in /var/svc/manifest/network<br />        &#8211;&gt;</p>
<p>        &lt;service_bundle type=&#8217;manifest&#8217; name=&#8217;CSKmysql:mysql&#8217;&gt;<br />        &lt;service<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&#8217;network/csk-mysql&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;service&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version=&#8217;1&#8242;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;create_default_instance enabled=&#8217;false&#8217; /&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;single_instance /&gt;</p>
<p>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wait for network interfaces to be initialized.<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependency name=&#8217;network&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grouping=&#8217;require_all&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; restart_on=&#8217;error&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;service&#8217;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;service_fmri &nbsp;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&#8217;svc:/milestone/network:default&#8217;/&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;</p>
<p>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wait for all local filesystems to be mounted.<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependency name=&#8217;filesystem-local&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grouping=&#8217;require_all&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; restart_on=&#8217;none&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;service&#8217;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;service_fmri<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&#8217;svc:/system/filesystem/local:default&#8217;/&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;</p>
<p>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;exec_method<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;method&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&#8217;start&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec=&#8217;/opt/coolstack/lib/svc/method/svc-cskmysql start&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout_seconds=&#8217;60&#8242;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method_context<br />        working_directory=&#8217;/opt/coolstack&#8217;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method_credential <br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user=&#8217;mysql&#8217; group=&#8217;mysql&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; privileges=&#8217;basic,!proc_session,!proc_info,!file_link_any,net_privaddr&#8217; /&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/method_context&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/exec_method&gt;</p>
<p>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;exec_method<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;method&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&#8217;stop&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec=&#8217;/opt/coolstack/lib/svc/method/svc-cskmysql stop&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout_seconds=&#8217;60&#8242;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method_context /&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/exec_method&gt;</p>
<p>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;exec_method<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;method&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&#8217;refresh&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec=&#8217;/opt/coolstack/lib/svc/method/svc-cskmysql restart&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout_seconds=&#8217;60&#8242;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method_context working_directory=&#8217;/opt/coolstack&#8217;&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method_credential <br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user=&#8217;mysql&#8217; group=&#8217;mysql&#8217;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; privileges=&#8217;basic,!proc_session,!proc_info,!file_link_any,net_privaddr&#8217; /&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/method_context&gt;<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/exec_method&gt;</p>
<p>        &nbsp;&lt;/service&gt;<br />        &nbsp;&lt;/service_bundle&gt; <br /> 
<p>&nbsp;</p>
</p></div>
<h3>Create the method</h3>
<p>Create the file /opt/coolstack/lib/svc/method/svc-cskmysql referenced in the manifest with the following contents and make it executable. You may have to create the directories below /opt/coolstack/lib first. This file needs to be edited to set DB_DIR to the path of your data directory (where data files reside), and MYSQL_DIR if you are usi<br />
ng the 64-bit MySQL version. <br />      Create the file /opt/coolstack/lib/svc/method/svc-cskmysql.</p>
<p>      You will also have to manually create directories if they don&rsquo;t already exist.</p>
<p>      /opt/coolstack/lib<br />      /opt/coolstack/lib/svc<br />      /opt/coolstack/lib/method</p>
<p>      This file needs to be edited to set DB_DIR to the path of your data directory ( normally /opt/coolstack/mysql_32bit), and MYSQL_DIR if you are using the 64-bit MySQL version. <br />      Copy and past the following into the file named above. It assumes the paths of the&nbsp; default installation of Cool Stack. If you have changed the paths you&rsquo;ll need to reflect those changes here.</p>
<p>&nbsp;</p>
<div class="code">#!/usr/bin/sh<br />     #<br />     #&nbsp;&nbsp; Copyright 2007 Sun Microsystems, Inc.&nbsp; All rights reserved.<br />     #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method file for CSKMySQL<br />     #<br />     # This uses the MySQL packages from CoolStack 1.1 (CSKmysql)<br />     # If you&#8217;re using the 32bit mysql from CSKamp, change MYSQL_DIR below to mysql_32bit.<br />     # This file should reside in /opt/coolstack/lib/svc/method<br />     #<br />     # NOTE: Make sure DB_DIR is owned BY the mysql user and group and chmod 700<br />     #</p>
<p>     . /lib/svc/share/smf_include.sh</p>
<p>     DB_DIR=/data<br />     PIDFILE=${DB_DIR}/`/usr/bin/uname -n`.pid<br />     MYSQL_DIR=/opt/coolstack/mysql_32bit</p>
<p>     mysql_stop () {<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ -f ${PIDFILE} ]; then<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/bin/pkill mysqld_safe &gt;/dev/null 2&gt;&amp;1<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/bin/kill `cat ${PIDFILE}` &gt; /dev/null 2&gt;&amp;1 &amp;&amp; echo -n &#8216; mysqld&#8217;<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br />     }</p>
<p>     mysql_start () {<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $MYSQL_DIR/bin/mysqld_safe &#8211;user=mysql &#8211;datadir=${DB_DIR} &#8211;pid-file=${PIDFILE} &gt; /dev/null &amp;<br />     }</p>
<p>     ##<br />     # Start of script<br />     #<br />     case &quot;$1&quot; in<br />     &nbsp;&nbsp;&nbsp; start)<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mysql_start<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />     &nbsp;&nbsp;&nbsp; stop)<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mysql_stop<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />     &nbsp;&nbsp;&nbsp; restart)<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mysql_stop<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while pgrep mysqld &gt; /dev/null<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sleep 1<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; done<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mysql_start<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />     &nbsp;&nbsp;&nbsp; *)<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;&quot;<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;Usage: `basename $0` { start | stop | restart }&quot;<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;&quot;<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 64<br />     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />     esac</div>
<p>&nbsp;</p>
<h3>Change file ownership &nbsp;</h3>
<p>Ensure that the MySQL user and group exist and this user owns $DB_DIR. It&#8217;s also a good idea to chmod 0700 all files in $DB_DIR.</p>
<p>    Cool Stack MySQL runs as user:group mysql:mysql.</p>
<div class="code">&nbsp;# cd /opt/coolstack/ /mysql_32bit<br />    # chown -R mysql ./data<br />    # chgrp -R mysql ./data<br />    # Chmod &ndash;R 077 ./data</div>
<p> Start the csk-mysql service<br />   Import the new MySQL config :</p>
<div class="code"> # svccfg -v import /var/svc/manifest/network/cskmysql.xml</div>
<p> Start MySQL as a&nbsp; service::   </p>
<div class="code"> # svcadm -v enable csk-mysql </div>
<p> A log file available at /var/svc/log/network-csk-mysql:CSKmysql.log file. <br />   More detailed information for troubleshooting startup failures can be obtained from the command svcs -x. </p>
<p>   If the services does not start and/or goes into maintenance mode then you will need to go through the steps above again verifying it&rsquo;s correct. I initially had a problem due to incorrect privileges on&nbsp; /opt/coolstack.mysql_32bit/data. &nbsp;<br />   More information on SMF can be found at&nbsp; http://www.sun.com/bigadmin/content/selfheal/smf-quickstart.html </p>
]]></content:encoded>
			<wfw:commentRss>http://weeatbricks.com/2007/07/04/smf-support-for-mysql-in-cool-stack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cool Stack Apache with Solaris SMF</title>
		<link>http://weeatbricks.com/2007/07/02/cool-stack-apache-with-solaris-smf/</link>
		<comments>http://weeatbricks.com/2007/07/02/cool-stack-apache-with-solaris-smf/#comments</comments>
		<pubDate>Mon, 02 Jul 2007 12:29:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.weeatbricks.com/?p=29</guid>
		<description><![CDATA[The post derives heavily from Shanti&#8217;s  Sun MicroSystems blog post.
      For a succinct explanation from www.oreillynet.com .
      SMF try this from or Solaris 10, Sun introduced the Service Management Facility. SMF is a framework that handles system boot-up, process management, and self-healing. It addresses [...]]]></description>
			<content:encoded><![CDATA[<p>The post derives heavily from <a href="http://blogs.sun.com/shanti/entry/smf_support_for_apache_in">Shanti&rsquo;s </a> Sun MicroSystems blog post.</p>
<p>      For a succinct explanation from <a href="http://www.oreillynet.com/pub/a/sysadmin/2006/04/13/using-solaris-smf.html">www.oreillynet.com</a> .</p>
<p>      SMF try this from or Solaris 10, Sun introduced the Service Management Facility. SMF is a framework that handles system boot-up, process management, and self-healing. It addresses the shortcomings of startup scripts and creates an infrastructure to manage daemons after the host has booted.</p>
<p>      The following steps are required to add cool stack apache as a service into Solaris SMF</p>
<h3>1. Create the manifest</h3>
<p>      A service needs a file called a manifest.&nbsp; A service manifest describes the service and its management needs. It lists the service dependencies, the control scripts, and the actions to take when the service fails. The manifest starts out as an XML file that SMF imports into a central repository, which records the properties of all the services.</p>
<p>      Create a file named /var/svc/manifest/network/cskapache2.xml with the following contents :</p>
<p> 
<div class="code"> &lt;?xml version=&quot;1.0&quot;?&gt;<br />      &lt;!DOCTYPE service_bundle SYSTEM &quot;/usr/share/lib/xml/dtd/service_bundle.dtd.1&quot;&gt;<br />      &lt;!&#8211;<br />      &nbsp;&nbsp;&nbsp; Copyright 2006-2007 Sun Microsystems, Inc.&nbsp; All rights reserved.<br />      &nbsp;&nbsp;&nbsp; CSKapache2 manifest &#8211; should reside in /var/svc/manifest/network.<br />      &#8211;&gt;</p>
<p>      &lt;service_bundle type=&#8217;manifest&#8217; name=&#8217;CSKamp:apache&#8217;&gt;</p>
<p>      &lt;service<br />      &nbsp;&nbsp;&nbsp; name=&#8217;network/csk-http&#8217;<br />      &nbsp;&nbsp;&nbsp; type=&#8217;service&#8217;<br />      &nbsp;&nbsp;&nbsp; version=&#8217;1&#8242;&gt;</p>
<p>      &nbsp;&nbsp;&nbsp; &lt;!&#8211;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Because we may have multiple instances of network/http<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; provided by different implementations, we keep dependencies<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and methods within the instance.<br />      &nbsp;&nbsp;&nbsp; &#8211;&gt;</p>
<p>      &nbsp;&nbsp;&nbsp; &lt;instance name=&#8217;CSKapache2&#8242; enabled=&#8217;false&#8217;&gt;<br />      &nbsp;&nbsp;&nbsp; &lt;!&#8211;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wait for network interfaces to be initialized.<br />      &nbsp;&nbsp;&nbsp; &#8211;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependency name=&#8217;network&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grouping=&#8217;require_all&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; restart_on=&#8217;error&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;service&#8217;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;service_fmri value=&#8217;svc:/milestone/network:default&#8217;/&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;</p>
<p>      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wait for all local filesystems to be mounted.<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependency name=&#8217;filesystem-local&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grouping=&#8217;require_all&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; restart_on=&#8217;none&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;service&#8217;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;service_fmri<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&#8217;svc:/system/filesystem/local:default&#8217;/&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;</p>
<p>      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wait for automounting to be available, as we may be<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; serving data from home directories or other remote<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filesystems.<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependency name=&#8217;autofs&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grouping=&#8217;optional_all&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; restart_on=&#8217;error&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;service&#8217;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;service_fmri<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&#8217;svc:/system/filesystem/autofs:default&#8217;/&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;</p>
<p>      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;exec_method<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;method&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&#8217;start&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec=&#8217;/opt/coolstack/lib/svc/method/svc-cskapache2 start&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout_seconds=&#8217;60&#8242;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method_context&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method_credential <br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user=&#8217;webservd&#8217; group=&#8217;webservd&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; privileges=&#8217;basic,!proc_session,!proc_info,!file_link_any,net_privaddr&#8217; /&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/method_context&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/exec_method&gt;</p>
<p>      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;exec_method<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;method&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&#8217;stop&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec=&#8217;/opt/coolstack/lib/svc/method/svc-cskapache2 stop&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout_seconds=&#8217;60&#8242;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method_context /&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/exec_method&gt;</p>
<p>      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;exec_method<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#8217;method&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&#8217;refresh&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec=&#8217;/opt/coolstack/lib/svc/method/svc-cskapache2 refresh&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout_seconds=&#8217;60&#8242;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method_context /&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/exec_method&gt;</p>
<p>      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property_group name=&#8217;httpd&#8217; type=&#8217;application&#8217;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;stability value=&#8217;Evolving&#8217; /&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;propval name=&#8217;ssl&#8217; type=&#8217;boolean&#8217; value=&#8217;false&#8217; /&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property_group&gt;</p>
<p>      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property_group name=&#8217;st<br />
artd&#8217; type=&#8217;framework&#8217;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211; sub-process core dumps shouldn&#8217;t restart session &#8211;&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;propval name=&#8217;ignore_error&#8217; type=&#8217;astring&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&#8217;core,signal&#8217; /&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property_group&gt;</p>
<p>      &nbsp;&nbsp;&nbsp; &lt;/instance&gt;</p>
<p>      &nbsp;&nbsp;&nbsp; &lt;stability value=&#8217;Evolving&#8217; /&gt;<br />      &nbsp;&nbsp;&nbsp; &lt;template&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;common_name&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;loctext xml:lang=&#8217;C'&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Apache 2 HTTP server<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/loctext&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/common_name&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;documentation&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;manpage title=&#8217;httpd&#8217; section=&#8217;8&#8242;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; manpath=&#8217;/opt/coolstack/apache2/man&#8217; /&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;doc_link name=&#8217;apache.org&#8217;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uri=&#8217;http://httpd.apache.org&#8217; /&gt;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/documentation&gt;<br />      &nbsp;&nbsp;&nbsp; &lt;/template&gt;<br />      &lt;/service&gt;</p>
<p>      &lt;/service_bundle&gt;             </p></div>
<h3>2. Create the method</h3>
<p>      Create the file /opt/coolstack/lib/svc/method/svc-cskapache2 .</p>
<p>      You will also have to manually create directories</p>
<div class="code">/opt/coolstack/lib<br />      /opt/coolstack/lib/svc<br />      /opt/coolstack/lib/method</p>
<p>      Copy and past the following into the file named above. It assumes the paths of the&nbsp; default installation of Cool Stack. If you have changed the paths you&rsquo;ll need to reflect those changes here.</p>
<p>     #!/sbin/sh<br />      #<br />      # Copyright 2004-2007 Sun Microsystems, Inc.&nbsp; All rights reserved.<br />      # Use is subject to license terms.<br />      #<br />      # ident &quot;@(#)http-apache2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.2&nbsp;&nbsp;&nbsp;&nbsp; 04/11/11 SMI&quot;<br />      # Modified for apache in CSKamp package of Cool Stack<br />      # This file should reside in /opt/coolstack/lib/svc/method</p>
<p>      . /lib/svc/share/smf_include.sh</p>
<p>      APACHE_HOME=/opt/coolstack/apache2<br />      CONF_FILE=$APACHE_HOME/conf/httpd.conf<br />      PIDFILE=$APACHE_HOME/logs/httpd.pid</p>
<p>      [ ! -f ${CONF_FILE} ] &amp;&amp;&nbsp; exit $SMF_EXIT_ERR_CONFIG</p>
<p>      case &quot;$1&quot; in<br />      &nbsp;&nbsp;&nbsp; start)<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /bin/rm -f ${PIDFILE}<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;start&quot;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />      &nbsp;&nbsp;&nbsp; refresh)<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;graceful&quot;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />      &nbsp;&nbsp;&nbsp; stop)<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;stop&quot;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />      &nbsp;&nbsp;&nbsp; *)<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;Usage: $0 {start|stop|refresh}&quot;<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 1<br />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />      esac</p>
<p>      exec ${APACHE_HOME}/bin/apachectl $cmd 2&gt;&amp;1   </p></div>
<p>&nbsp;</p>
<h3>3. Change file ownership</h3>
<p>      Cool Stack apache runs as user:group webservd:webservd. We need to ensure that this user can write to the log directory and the pid file. All these files&nbsp; reside in /opt/coolstack/apache2/logs by default. </p>
<div class="code"># cd /opt/coolstack/apache2<br />      # chown -R webservd logs<br />      # chgrp -R webservd logs</p></div>
<p>&nbsp;</p>
<h3>4. Disable the Solaris http service</h3>
<p>Disable any apache processes running at present.<br />      &nbsp;You can check if it is enabled as follows :</p>
<p>&nbsp;</p>
<div class="code"># svcs |grep http</div>
<p>&nbsp;</p>
<p>      If no output is printed, then it is disabled. If you see something like :</p>
<p>      maintenance&nbsp;&nbsp;&nbsp; 11:47:11 svc:/network/http:apache2<br />      or<br />      online&nbsp;&nbsp;&nbsp; 11:47:11 svc:/network/http:apache2<br />      then, the service is up. </p>
<p>Disable the service as follows :       </p>
<div class="code"># svcadm -v disable http<br />      svc:/network/http:apache2 disabled.</div>
<p>&nbsp;</p>
<h3>5. Start the csk-http service</h3>
<p>      Import the new service config, the manifest xml file as follows :</p>
<p>&nbsp;</p>
<div class="code"># svccfg -v import /var/svc/manifest/network/cskapache2.xml</div>
<p>      Resulting output<br /> 
<div class="code">svccfg: Taking &quot;initial&quot; snapshot for svc:/network/csk-http:CSKapache2.<br />      svccfg: Taking &quot;last-import&quot; snapshot for svc:/network/csk-http:CSKapache2.<br />      svccfg: Refreshed svc:/network/csk-http:CSKapache2.<br />      svccfg: Successful import.</div>
<p>      We are now ready to start our service. Start it as follows :
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="code"># svcadm -v enable csk-http </div>
<p>&nbsp;</p>
<p>      A log of the service startup will be in /var/svc/log/network-csk-http:CSKapache2.log file. </p>
]]></content:encoded>
			<wfw:commentRss>http://weeatbricks.com/2007/07/02/cool-stack-apache-with-solaris-smf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Pureftpd on Solaris 10</title>
		<link>http://weeatbricks.com/2007/06/15/installing-pureftpd-on-solaris-10/</link>
		<comments>http://weeatbricks.com/2007/06/15/installing-pureftpd-on-solaris-10/#comments</comments>
		<pubDate>Fri, 15 Jun 2007 13:35:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.weeatbricks.com/?p=27</guid>
		<description><![CDATA[We will use pkgget to install the Pureftpd software.
Install pkg-get. 
Skip this if you already have it installed.
Reference: http://www.blastwave.org/howto.html
# pkgadd -d http://www.blastwave.org/pkg_get.pkg

Add the pureftpd package.
 # pkg-get &#8211;i pureftpd

This downloads and complies the Pureftpd package.The binary is located here:


# /opt/csw/sbin/pure-ftpd

To run try this:

#/opt/csw/sbin/pure-ftpd -j -lpuredb:/opt/csw/etc/pureftpd.pdb &#38;

Or better yet use the supplied start up script located [...]]]></description>
			<content:encoded><![CDATA[<p>We will use pkgget to install the Pureftpd software.</p>
<h3>Install pkg-get. </h3>
<p>Skip this if you already have it installed.</p>
<p>Reference: <a href="http://www.blastwave.org/howto.html">http://www.blastwave.org/howto.html</a></p>
<div class="code"># pkgadd -d http://www.blastwave.org/pkg_get.pkg
</div>
<p>Add the pureftpd package.</p>
<div class="code"> # pkg-get &ndash;i pureftpd
</div>
<p>This downloads and complies the Pureftpd package.<br />The binary is located here:
</p>
<div class="code">
# /opt/csw/sbin/pure-ftpd
</div>
<p>To run try this:</p>
<div class="code">
#/opt/csw/sbin/pure-ftpd -j -lpuredb:/opt/csw/etc/pureftpd.pdb &amp;
</div>
<p>Or better yet use the supplied start up script located here:</p>
<div class="code">
# /etc/init.d/cswpureftp
</div>
<p>
<h3>Configure Pureftpd</h3>
<p>Configuration file the start script looks at:</p>
<div class="code">
# /opt/csw/etc/pureftpd.conf.CSW
</div>
<p>Rename to pureftpd.conf</p>
<div class="code">
# cd /opt/csw/etc/</p>
<p># cp ./pureftpd.conf.CSW ./pureftpd.conf
</p></div>
<p>Edit config file. We wanted anonymous ftp access turned off and vistual users activated.</p>
<p>So uncomment</p>
<div class="code">
PureDB  /etc/pureftpd.pdb</p>
<p>And</p>
<p>NoAnonymous yes
</p></div>
<p>Next we&rsquo;ll complete the steps needed to enable Virtual Users.</p>
<p>We need to create the pureftpd.pdb file from /opt/csw/etc/pureftpd.passwd. </p>
<p>First create a password file</p>
<div class="code">
# /opt/csw/etc <br />
# touch pureftpd.passwd
</div>
<p>Make the pureftpd.pdb file</p>
<div class="code">
 # pure-pw mkdb
</div>
<p>Or</p>
<div class="code">
# /opt/csw/bin/pure-pw mkdb
</div>
<p>The start up script expects the files to appear in /etc/<br />Copy files there:</p>
<div class="code">
cp /opt/csw/etc/Pureftpd.passwd&nbsp; /etc/
</div>
<p>and </p>
<div class="code">
cp /opt/csw/etc/pureftpd.pdb /etc/
</div>
<p></p>
<h3>Start Pureftpd</h3>
<p>Start the Pureftpd program</p>
<div class="code">
 # /etc/init.d/cswpureftp
</div>
<p>For further documentation on using and configuring, take&nbsp; a look at <a href="https://www.tssg.org/mt-blog/www.pureftpd.org">www.pureftpd.org</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://weeatbricks.com/2007/06/15/installing-pureftpd-on-solaris-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Coolstack on Solaris 10</title>
		<link>http://weeatbricks.com/2007/05/30/installing-coolstack-on-solaris-10/</link>
		<comments>http://weeatbricks.com/2007/05/30/installing-coolstack-on-solaris-10/#comments</comments>
		<pubDate>Wed, 30 May 2007 17:11:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.weeatbricks.com/?p=25</guid>
		<description><![CDATA[&#160;
Reference: http://cooltools.sunsource.net/coolstack/
&#160;
Install Coolstack
Download the x86 version of Coolstack
bunzip2 [package.pkg.bz2] 
&#160;
For example: bunzip2 CSKmysql_sparc.pkg.bz2 
pkgadd -d [package.pkg] 
&#160;
This process will install the package in /opt/coolstack, along with all dependent libraries. 
&#160;
Document root is located at: /opt/coolstack/apache2/htdocs
&#160;
Solaris zone has several instances of apache and apache2 preinstalled. These may be running and will prevent the coolstack apache from [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;
<p class="MsoNormal">Reference: <a href="http://cooltools.sunsource.net/coolstack/">http://cooltools.sunsource.net/coolstack/</a></p>
<p class="MsoNormal">&nbsp;</p>
<h2>Install Coolstack</h2>
<p class="MsoNormal">Download the x86 version of Coolstack</p>
<p style="text-indent: 36pt" class="MsoNormal">bunzip2 [package.pkg.bz2] </p>
<p style="text-indent: 36pt" class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">For example: bunzip2 CSKmysql_sparc.pkg.bz2 </p>
<p style="text-indent: 36pt" class="MsoNormal">pkgadd -d [package.pkg] </p>
<p style="text-indent: 36pt" class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">This process will install the package in /opt/coolstack, along with all dependent libraries. </p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Document root is located at: /opt/coolstack/apache2/htdocs</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Solaris zone has several instances of apache and apache2 preinstalled. These may be running and will prevent the coolstack apache from running. Disable all other apaches</p>
<p class="MsoNormal">Kill the currently running apache services.</p>
<p style="text-indent: 36pt" class="MsoNormal"># ps &ndash;ef | grep apache2</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Kill &lt;number&gt; corresponding to apache process given above or do apache stop but since the httpd.conf file is not configured this gives an error so use kill instead.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Next ensure preinstalled apaches do not start up.</p>
<p style="text-indent: 36pt" class="MsoNormal"># cd /etc/rc3.d</p>
<p style="text-indent: 36pt" class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Rename the following:</p>
<p class="MsoNormal">S50apache, S50cswapache and&nbsp; S50cswapache2 to OFF-S50apache, OFF-S50cswapache and&nbsp; OFF-S50cswapache2 .</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">This stops these apache services from restarting on boot up.</p>
<p class="MsoNormal">&nbsp;</p>
<h2>Configure CoolStack Apache</h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Edit /opt/coolstack/apache2/conf/httpd.conf</p>
<p style="margin-left: 36pt" class="MsoNormal">ServerName ims-arcs-zone:80</p>
<p style="margin-left: 36pt" class="MsoNormal">Add index.php directory index</p>
<p style="margin-left: 36pt" class="MsoNormal">&lt;IfModule dir_module&gt;</p>
<p style="margin-left: 36pt" class="MsoNormal">&nbsp;&nbsp;&nbsp; DirectoryIndex index.html index.php</p>
<p style="margin-left: 36pt" class="MsoNormal">&lt;/IfModule&gt;</p>
<p class="MsoNormal">Start apache</p>
<p style="text-indent: 36pt" class="MsoNormal">#/opt/coolstack/apache2/bin/apachectl start</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2>Configure Mysql</h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Add /opt/coolstack/mysql_32bit/bin /bin to your path, and /opt/coolstack/mysql/man to your manpath. </p>
<p style="text-indent: 36pt" class="MsoNormal">#export PATH=/opt/coolstack/mysql_32bit/bin:$PATH</p>
<p style="text-indent: 36pt" class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Install the db and mysql user:</p>
<p style="margin-left: 36pt" class="MsoNormal"># /opt/coolstack/mysql/bin/mysql_install_db</p>
<p style="margin-left: 36pt" class="MsoNormal"># groupadd mysql</p>
<p style="margin-left: 36pt" class="MsoNormal"># useradd -c &quot;MySQL Server&quot; -g mysql mysql</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Change ownership</p>
<p style="margin-left: 36pt" class="MsoNormal"># chown -R mysql:mysql /opt/coolstack/mysql_32bit</p>
<p style="margin-left: 36pt" class="MsoNormal">&nbsp;# cp /opt/coolstack/mysql_32bit/share/mysql/my-large.cnf /etc/my.cnf</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Edit my.cnf if necessary. Consider uncomment skip-networking to prevent network access to the database.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Start up the server:</p>
<p class="MsoNormal">&nbsp;</p>
<p style="margin-left: 36pt" class="MsoNormal"># su &ndash; mysql&nbsp; (this line may not be necessary)</p>
<p style="margin-left: 36pt" class="MsoNormal">$ /opt/coolstack/mysql_32bit/bin/mysqld_safe &amp; </p>
<p style="margin-left: 36pt" class="MsoNormal">$ ps -ef | grep mysql | grep &ndash;v grep&nbsp; &lt;&#8211; Make sure the mysqld process is running</p>
<p style="margin-left: 36pt" class="MsoNormal">$ /opt/coolstack/mysql_32bit/bin/mysqladmin -u root password &#8216;yourrootpassword&#8217;</p>
<p style="margin-left: 36pt" class="MsoNormal">$ /opt/coolstack/mysql/bin/mysqladmin -u root -h &#8216;yourhostname&#8217; password &#8216;yourrootpassword&#8217;</p>
<p class="MsoNormal">&nbsp;</p>
<h2>Install Extra PHP Libraries.</h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Dowbload load from here: <a href="http://192.18.108.137/ECom/EComTicketServlet/BEGINB209738B4F380B9195AA643B9E6B9E11/124169451/2137841187/1/813434/813122/2137841187/2ts+/westCoastFSEND/cooltst-1.1-SP-G-F/cooltst-1.1-SP-G-F:14/CSKphplibsBundle_x86.tar.bz2">Packages CSKtds, CSKncurses, CSKphplibs, English</a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The above PHP libraries contain the useful GD graphics library for PHP. We&rsquo;ll need that for the Drupal CMS which I will post next week.. Download the x86 version of Coolstack</p>
<p style="text-indent: 36pt" class="MsoNormal">&nbsp;</p>
<p style="text-indent: 36pt" class="MsoNormal">#bunzip2 [package.pkg.bz2] </p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">For example: bunzip2 CSKmysql_sparc.pkg.bz2 </p>
<p style="margin-left: 36pt" class="MsoNormal">#tar -xvf ./CSKphplibsBundle_x86.tar</p>
<p style="margin-left: 36pt" class="MsoNormal">#pkgadd -d ./CSKphplibs_x86.pkg</p>
<p style="margin-left: 36pt" class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Edit #/opt/coolstack/php5/lib/php.ini</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Add the following line.</p>
<p style="text-indent: 36pt" class="MsoNormal">extension=&quot;gd.so&quot;</p>
<p style="text-indent: 36pt" class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Restart Apache</p>
<p style="text-indent: 36pt" class="MsoNormal">#/opt/coolstack/apache2/bin/apachectl start</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2>Disable unnecessary Solaris Services</h2>
<p class="MsoNormal">Services that you may want to disable once the Zone has booted are listed below. This procedure as the effect of locking the zone down and making it more secure.</p>
<p style="margin-left: 36pt" class="MsoNormal"> svcadm disable ftp<br /> svcadm disable telnet </p>
<p style="margin-left: 36pt" class="MsoNormal">svcadm disable ssh (left this on if you need ssh)</p>
<p> svcadm disable sendmail (left this on for Drupal &nbsp;CMS sending emails)</p>
<p> svcadm disable finger<br /> svcadm disable rlogin<br /> svcadm disable nfs/client<br /> svcadm disable nfs/status<br /> svcadm disable nfs/nlockmgr<br /> svcadm disable rpc/bind<br /> svcadm disable rpc/gss<br /> svcadm disable rpc/rstat<br /> svcadm disable rpc/rusers<br /> svcadm disable rpc/smserver<br /> svcadm disable shell:default (left this on for us)<br /> svcadm disable svc:/network/cde-spc:default<br /> svcadm disable svc:/application/graphical-login/cde-login:default<br /> svcadm disable inetdsvcadm disable rpc-100235_1/rpc_ticotsord:defaultsvcadm disable rpc-100068_2-5/rpc_udp:default<br /> svcadm disable rpc-100083_1/rpc_tcp:default<br /> svcadm disable x11/xfs<br /> svcadm disable font/fc-cache</p>
<p class="MsoNormal">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://weeatbricks.com/2007/05/30/installing-coolstack-on-solaris-10/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
