<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>dev-eth0.de</title>
	
	<link>http://www.dev-eth0.de</link>
	<description>Zu viele Lösungen für zu wenig Probleme...</description>
	<lastBuildDate>Wed, 06 Jun 2012 22:03:48 +0000</lastBuildDate>
	<language>de-DE</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/dev-eth0de" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="dev-eth0de" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Munin on OpenSolaris: Part 2 – Munin-Node</title>
		<link>http://www.dev-eth0.de/munin-on-opensolaris-part-2-munin-node/</link>
		<comments>http://www.dev-eth0.de/munin-on-opensolaris-part-2-munin-node/#comments</comments>
		<pubDate>Wed, 06 Jun 2012 08:05:51 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[(Open)Solaris]]></category>
		<category><![CDATA[Solaris Server]]></category>
		<category><![CDATA[HowTos]]></category>
		<category><![CDATA[OpenIndiana]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=1559</guid>
		<description><![CDATA[After we installed all required dependencies, we can start to build munin. This part of the guide describes how to build munin and install a munin-node on a OpenSolaris/OpenIndiana system. Basics First we create a user and a group for munin to run as. Now we are ready to download munin. The munin source contains [...]]]></description>
				<content:encoded><![CDATA[<p>After we installed all required dependencies, we can start to build munin. This part of the guide describes how to build munin and install a munin-node on a OpenSolaris/OpenIndiana system.</p>
<h4>Basics</h4>
<p>First we create a user and a group for munin to run as.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/perl-5.16.0# cd ~
root@test:~# mkdir -p /export/home
root@test:~# useradd -d /export/home/munin -s /usr/bin/false -m munin
root@test:~# groupadd munin
root@test:~# usermod  -g munin munin
</pre>
<p>Now we are ready to download munin.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget http://downloads.sourceforge.net/project/munin/stable/2.0.0/munin-2.0.0.tar.gz

--2012-06-05 22:29:50--  http://downloads.sourceforge.net/project/munin/stable/2.0.0/munin-2.0.0.tar.gz
HTTP request sent, awaiting response... 200 OK
Length: 1317614 (1.3M) [application/x-gzip]
Saving to: `munin-2.0.0.tar.gz'

100%[===========================================================&gt;] 1,317,614   1.63M/s   in 0.8s

2012-06-05 22:29:52 (1.63 MB/s) - `munin-2.0.0.tar.gz' saved [1317614/1317614]

root@test:~# tar xf munin-2.0.0.tar.gz
root@test:~# cd munin-2.0.0
</pre>
<p>The munin source contains a config, which will not match our needs. Therefor we have to edit the Makefile.config and set the CONFDIR as following:</p>
<pre><strong>CONFDIR = $(DESTDIR)/opt/munin</strong></pre>
<p>Now build munin and install it.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/munin-2.0.0# gmake
root@test:~/munin-2.0.0# gmake install-common-prime
root@test:~/munin-2.0.0# gmake install-node
root@test:~/munin-2.0.0# gmake install-plugins-prime
</pre>
<h4>Configure Munin</h4>
<p>Munin is delivered with a sample config-file which can be used as basic for our new installation. So we copy it and create a folder for the munin logs.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/munin-2.0.0# cp build/node/munin-node.conf /opt/munin/
root@test:~/munin-2.0.0# mkdir /var/log/munin
root@test:~/munin-2.0.0# chown munin:munin /var/log/munin/
</pre>
<p>Edit /opt/munin/munin-node.conf and set the logfile to use the new directory and set the run dir:</p>
<pre class="brush: bash; title: ; notranslate">
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin-node.pid
</pre>
<p>There is a cool script available, which tries to enabled a number of plugins automatically. The script contains a reference to the original perl path and has to be edited before we can run it. So change the header </p>
<pre><strong>#!/usr/bin/perl -w</strong></pre>
<p>to </p>
<pre><strong>#!/opt/perl/bin/perl -w</strong></pre>
<p>in </p>
<pre><strong>/opt/munin/sbin/munin-node-configure</strong></pre>
<p>and run it:</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/munin-2.0.0# /opt/munin/sbin/munin-node-configure --shell -families=contrib,auto | sh -x
</pre>
<p>The same problem can be found in another file:</p>
<pre><strong>#!/usr/bin/perl -wT</strong></pre>
<p>to </p>
<pre><strong>#!/opt/perl/bin/perl -wT</strong></pre>
<p>in  </p>
<pre><strong>/opt/munin/sbin/munin-node</strong></pre>
<h4>Munin-Node as Solaris Service</h4>
<p>The final step is to integrate the munin-node into Solaris&#8217; <a href="http://en.wikipedia.org/wiki/Service_Management_Facility">Service Management Facility (smf)</a>. This requires a XML config file which describes the Munin-Node-service.<br />
The required file can be found here:</p>
<p><a href="http://www.dev-eth0.de/wp-content/uploads/2012/06/munin.xml">munin.xml</a></p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/munin-2.0.0# cd /tmp/
root@test:/tmp# wget http://www.dev-eth0.de/wp-content/uploads/2012/06/munin.xml
root@test:/tmp# svccfg import -V munin.xml
</pre>
<p>Now we have installed Munin-Node as a Solaris Service and can start and stop it with the <strong>svcadm</strong> command and check it&#8217;s status with <strong>svcs</strong>.</p>
<p><strong>Commands:</strong></p>
<pre class="brush: bash; title: ; notranslate">
svcadm enable munin-node
svcadm disable munin-node
</pre>
<p>The following commands will start tor and check if everything is ok and running.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:/tmp# svcadm enable munin-node
root@test:/tmp# svcs -x munin-node
svc:/application/munin-node:default (?)
 State: online since Tue May 29 23:28:13 2012
  See: /var/svc/log/application-munin-node:default.log
Impact: None.
</pre>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1559&amp;md5=3cebce0e1e2e20f7c2a1908e69e8fd71" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/BS0VqLbOf5o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/munin-on-opensolaris-part-2-munin-node/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Fmunin-on-opensolaris-part-2-munin-node%2F&amp;language=de_DE&amp;category=text&amp;title=Munin+on+OpenSolaris%3A+Part+2+%26%238211%3B+Munin-Node&amp;description=After+we+installed+all+required+dependencies%2C+we+can+start+to+build+munin.+This+part+of+the+guide+describes+how+to+build+munin+and+install+a+munin-node+on+a+OpenSolaris%2FOpenIndiana+system....&amp;tags=HowTos%2COpenIndiana%2COpenSolaris%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Munin on OpenSolaris: Part 1 – Requirements</title>
		<link>http://www.dev-eth0.de/munin-on-opensolaris-part-1-requirements/</link>
		<comments>http://www.dev-eth0.de/munin-on-opensolaris-part-1-requirements/#comments</comments>
		<pubDate>Wed, 06 Jun 2012 08:04:45 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[(Open)Solaris]]></category>
		<category><![CDATA[Solaris Server]]></category>
		<category><![CDATA[HowTos]]></category>
		<category><![CDATA[OpenIndiana]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=1550</guid>
		<description><![CDATA[This guide describes how to install a Munin 2.0 Node and Master on an OpenSolaris/OpenIndiana system. As there are many requirement, the guide is split up in three parts. The first part is about the required dependencies for a Munin Node and Master. Some dependencies exist only for the Node or the Master but as [...]]]></description>
				<content:encoded><![CDATA[<p>This guide describes how to install a Munin 2.0 Node and Master on an OpenSolaris/OpenIndiana system.<br />
As there are many requirement, the guide is split up in three parts. The first part is about the required dependencies for a Munin Node and Master.</p>
<p>Some dependencies exist only for the Node or the Master but as most are simple Perl modules, I don&#8217;t take care for unused libs.</p>
<h4>Basics</h4>
<pre class="brush: bash; title: ; notranslate">
root@test:~# pkg install system/library/math/header-math gcc-43 wget developer/build/gnu-make
          Packages to install: 18
      Create boot environment: No
Create backup boot environment: No

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                18/18   3086/3086    71.1/71.1

PHASE                                        ACTIONS
Install Phase                              4088/4088

PHASE                                          ITEMS
Package State Update Phase                     18/18
Image State Update Phase                         2/2

root@test:~# PATH=$PATH:/usr/gcc/4.3/bin
</pre>
<h4>Build Perl</h4>
<p>The delivered <a href="http://www.perl.org">Perl</a> version of OpenIndiana somehow does manage to fail installing the <strong>IO::Socket::INET</strong> library, which is required to run munin. Therefore we have to install a new version of Perl to /opt/perl:</p>
<p>First get the current relase from <a href="http://www.perl.org/get.html">http://www.perl.org/get.html</a> and untar it.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget http://www.cpan.org/src/5.0/perl-5.16.0.tar.gz
--2012-05-29 22:43:17--  http://www.cpan.org/src/5.0/perl-5.16.0.tar.gz
Resolving www.cpan.org (www.cpan.org)... 212.117.177.118,
2a01:608:2:4::2, 2620:101:d000:8::140:1
Connecting to www.cpan.org (www.cpan.org)|212.117.177.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15727416 (15M) [application/x-gzip]
Saving to: `perl-5.16.0.tar.gz'

100%[=========================================================================&gt;]
15,727,416  3.01M/s   in 5.3s

2012-05-29 22:43:23 (2.81 MB/s) - `perl-5.16.0.tar.gz' saved [15727416/15727416]

root@test:~# tar xf perl-5.16.0.tar.gz
root@test:~# cd perl-5.16.0
</pre>
<p>Now you can run the config file and then build it. The</p>
<pre><strong>gmake test</strong></pre>
<p>step will take quite a long time, so get a coffee <img src='http://www.dev-eth0.de/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Munin on OpenSolaris: Part 1   Requirements" class='wp-smiley' title="icon wink" /> </p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/perl-5.16.0# ./Configure -des -Dprefix=/opt/perl -Dcc=gcc
root@test:~/perl-5.16.0# gmake
root@test:~/perl-5.16.0# gmake test
root@test:~/perl-5.16.0# gmake install
root@test:~/perl-5.16.0# PATH=/opt/perl/bin:$PATH
</pre>
<p>Next we load the required perl modules.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/perl-5.16.0# perl -MCPAN -e shell
</pre>
<p>Now enter the following commands:</p>
<pre class="brush: bash; title: ; notranslate">
install Net::Server
install Log::Log4perl
install IO::Socket::INET6
install URI
install HTML::Template
install File::Copy::Recursive
install Date::Manip
install FCGI
exit
</pre>
<p>or as a one liner:</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/perl-5.16.0# perl -MCPAN -e 'install Net::Server, Log::Log4perl, IO::Socket::INET6, URI, HTML::Template, File::Copy::Recursive, Date::Manip, FCGI'
</pre>
<p>That&#8217;s it, all requirements should be set up.</p>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1550&amp;md5=7bb4a434ee533da7e0a48608310c80dd" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/9FiKzuGnC7Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/munin-on-opensolaris-part-1-requirements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Fmunin-on-opensolaris-part-1-requirements%2F&amp;language=de_DE&amp;category=text&amp;title=Munin+on+OpenSolaris%3A+Part+1+%26%238211%3B+Requirements&amp;description=This+guide+describes+how+to+install+a+Munin+2.0+Node+and+Master+on+an+OpenSolaris%2FOpenIndiana+system.+As+there+are+many+requirement%2C+the+guide+is+split+up+in+three+parts.+The...&amp;tags=HowTos%2COpenIndiana%2COpenSolaris%2Cblog" type="text/html" />
	</item>
		<item>
		<title>MediaTomb on OpenSolaris</title>
		<link>http://www.dev-eth0.de/mediatomb-on-opensolaris/</link>
		<comments>http://www.dev-eth0.de/mediatomb-on-opensolaris/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 14:01:14 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[(Open)Solaris]]></category>
		<category><![CDATA[Homeserver]]></category>
		<category><![CDATA[Solaris Server]]></category>
		<category><![CDATA[HowTos]]></category>
		<category><![CDATA[OpenIndiana]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=1532</guid>
		<description><![CDATA[This howto describes how to install MediaTomb, a free/opensource UPnP Media Server on OpenSolaris/OpenIndiana. Basic installation Install SpiderMonkey You can find the required steps to install the SpiderMonkey JS Library in this previous post: SpiderMonkey on OpenSolaris Install libmagic Next we have to install libmagic which is used to detect file-types. You can find the [...]]]></description>
				<content:encoded><![CDATA[<p>This howto describes how to install <a href="http://mediatomb.cc/">MediaTomb</a>, a free/opensource UPnP Media Server on OpenSolaris/OpenIndiana.</p>
<h4>Basic installation</h4>
<pre class="brush: bash; title: ; notranslate">
root@test:~# pkg install developer/build/gnu-make system/library/math/header-math wget gcc-43 expat
               Packages to install:    14
           Create boot environment:    No
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                14/14     912/912    58.1/58.1

PHASE                                        ACTIONS
Install Phase                              1367/1367

PHASE                                          ITEMS
Package State Update Phase                     14/14
Image State Update Phase                         2/2

root@test:~# PATH=$PATH:/usr/gcc/4.3/bin
</pre>
<h4>Install SpiderMonkey</h4>
<p>You can find the required steps to install the <strong>SpiderMonkey JS Library</strong> in this previous post: <a href="http://www.dev-eth0.de/couchdb-on-opensolaris-part-3-spidermonkey/">SpiderMonkey on OpenSolaris</a></p>
<h4>Install libmagic</h4>
<p>Next we have to install <strong>libmagic</strong> which is used to detect file-types. You can find the current version on this ftp server:<br />
<a href="ftp://ftp.astron.com/pub/file/">ftp.astron.com</a></p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# cd /tmp
root@test:/tmp# wget ftp://ftp.astron.com/pub/file/file-5.11.tar.gz
--2012-04-12 04:42:21--  ftp://ftp.astron.com/pub/file/file-5.11.tar.gz
           =&gt; `file-5.11.tar.gz'
Resolving ftp.astron.com (ftp.astron.com)... 208.77.212.98, 38.117.134.204
Connecting to ftp.astron.com (ftp.astron.com)|208.77.212.98|:21... connected.
Logging in as anonymous ... Logged in!
==&gt; SYST ... done.    ==&gt; PWD ... done.
==&gt; TYPE I ... done.  ==&gt; CWD (1) /pub/file ... done.
==&gt; SIZE file-5.11.tar.gz ... 610019
==&gt; PASV ... done.    ==&gt; RETR file-5.11.tar.gz ... done.
Length: 610019 (596K) (unauthoritative)

100%[================================================&gt;] 610,019      552K/s   in 1.1s

2012-04-12 04:42:26 (552 KB/s) - `file-5.11.tar.gz' saved [610019]

root@test:/tmp# tar xf file-5.11.tar.gz
root@test:/tmp# cd file-5.11
root@test:/tmp/file-5.11# ./configure --prefix=/opt/local
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
...

root@test:/tmp/file-5.11# gmake
gmake  all-recursive
gmake[1]: Entering directory `/tmp/file-5.11'
Making all in src
gmake[2]: Entering directory `/tmp/file-5.11/src'
...

root@test:/tmp/file-5.11# gmake install
Making install in src
gmake[1]: Entering directory `/tmp/file-5.11/src'
gmake[2]: Entering directory `/tmp/file-5.11/src'
...
</pre>
<h4>Install taglib</h4>
<p><a href="http://developer.kde.org/~wheeler/taglib.html">Taglib</a> is a library for reading meta-data of audio files (e.g. ID3-Tags).</p>
<pre class="brush: bash; title: ; notranslate">
root@test:/tmp/file-5.11# cd /tmp
root@test:/tmp# wget http://developer.kde.org/~wheeler/files/src/taglib-1.5.tar.gz
--2012-04-12 04:44:46--  http://developer.kde.org/~wheeler/files/src/taglib-1.5.tar.gz
Resolving developer.kde.org (developer.kde.org)... 212.110.188.12, 2001:41c8:1:6043::12
Connecting to developer.kde.org (developer.kde.org)|212.110.188.12|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1394506 (1.3M) [application/x-gzip]
Saving to: `taglib-1.5.tar.gz'

100%[================================================&gt;] 1,394,506   1.27M/s   in 1.0s

2012-04-12 04:44:47 (1.27 MB/s) - `taglib-1.5.tar.gz' saved [1394506/1394506]

root@test:/tmp# tar xf taglib-1.5.tar.gz
root@test:/tmp# cd taglib-1.5

root@test:/tmp/taglib-1.5# ./configure --prefix=/opt/local
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
...

root@test:/tmp/taglib-1.5# gmake
gmake  all-recursive
gmake[1]: Entering directory `/tmp/taglib-1.5'
Making all in taglib
gmake[2]: Entering directory `/tmp/taglib-1.5/taglib'
...

root@test:/tmp/taglib-1.5# gmake install
Making install in taglib
gmake[1]: Entering directory `/tmp/taglib-1.5/taglib'
...
</pre>
<h4>Install MediaTomb</h4>
<p>Now that we have all required dependencies running, we can install MediaTomb.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:/tmp/taglib-1.5# cd /tmp
root@test:/tmp# wget http://downloads.sourceforge.net/mediatomb/mediatomb-0.12.1.tar.gz
--2012-04-12 04:47:02--  http://downloads.sourceforge.net/mediatomb/mediatomb-0.12.1.tar.gz
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59
...
Length: 1240612 (1.2M) [application/x-gzip]
Saving to: `mediatomb-0.12.1.tar.gz'

100%[================================================&gt;] 1,240,612    907K/s   in 1.3s

2012-04-12 04:47:04 (907 KB/s) - `mediatomb-0.12.1.tar.gz' saved [1240612/1240612]

root@test:/tmp# tar xf mediatomb-0.12.1.tar.gz
root@test:/tmp# cd mediatomb-0.12.1

root@test:/tmp/mediatomb-0.12.1# ./configure --prefix=/opt/local \
--with-js-h=/opt/local/include \
--with-js-libs=/opt/local/lib \
--enable-libmagic \
--with-libmagic-h=/opt/local/include \
--with-libmagic-libs=/opt/local/lib \
--with-taglib-cfg=/opt/local/bin/taglib-config
checking for a BSD-compatible install... configure_aux/install-sh -c
checking whether build environment is sane... yes
...
</pre>
<p>If everything is fine, you should see the following summary:</p>
<pre class="brush: bash; title: ; notranslate">
CONFIGURATION SUMMARY ----

sqlite3               : yes
mysql                 : missing
libjs                 : yes
libmagic              : yes
inotify               : missing
libexif               : missing
id3lib                : disabled
taglib                : yes
libmp4v2              : missing
ffmpeg                : missing
ffmpegthumbnailer     : missing
lastfmlib             : missing
external transcoding  : yes
curl                  : yes
YouTube               : yes
libextractor          : disabled
db-autocreate         : yes
</pre>
<p>Next step is to compile MediaTomb.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:/tmp/mediatomb-0.12.1# make
make  all-recursive
Making all in tombupnp
...

root@test:/tmp/mediatomb-0.12.1# make install
Making install in tombupnp
Making install in build
</pre>
<h4>First test</h4>
<p>Now mediatomb is installed and ready for a first test. This will create all required files and folders for us.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:/tmp/mediatomb-0.12.1# LD_LIBRARY_PATH=/opt/local/lib \
LD_PRELOAD=/usr/lib/0@0.so.1 \
/opt/local/bin/mediatomb \
--ip YOUR_IP --port YOUR_PORT \
-m /etc -f mediatomb \
--logfile=/var/log/mediatomb.log

MediaTomb UPnP Server version 0.12.1 - http://mediatomb.cc/

===============================================================================
Copyright 2005-2010 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.
MediaTomb is free software, covered by the GNU General Public License version 2

</pre>
<p>You shouldn&#8217;t see any errors here. Now stop mediatomb by pressing CTRL+C.</p>
<h4>Create User for Mediatomb</h4>
<p>We don&#8217;t want to run MediaTomb as root and have to create a user for it (called media).</p>
<pre class="brush: bash; title: ; notranslate">
root@test:/tmp/mediatomb-0.12.1# cd ~
root@test:~# mkdir -p /export/home
root@test:~# useradd -d /export/home/media -s /usr/bin/false -m media
root@test:~# groupadd media
root@test:~# usermod -g media media
root@test:~# chown media:media /var/log/mediatomb.log
root@test:~# chown -R media:media /etc/mediatomb
</pre>
<h4>MediaTomb as Solaris Service</h4>
<p>The final step is to integrate MediaTomb into Solaris&#8217; <a href="http://en.wikipedia.org/wiki/Service_Management_Facility">Service Management Facility (smf)</a>. This requires a XML config file which describes the MediaTomb-service. Furthermore we use a file for config and a start-script.<br />
Both files can be found here:<br />
They are based on the work of Jason Friedland (see <a href="http://blog.friedland.id.au/2010/12/installing-mediatomb-on-solaris-11.html">his blog</a>) with some adaptations.</p>
<p><a href="http://www.dev-eth0.de/wp-content/uploads/2012/04/mediatomb.conf">/etc/mediatomb.conf</a><br />
<a href="http://www.dev-eth0.de/wp-content/uploads/2012/04/svc-mediatomb">/lib/svc/method/svc-mediatomb</a><br />
<a href="http://www.dev-eth0.de/wp-content/uploads/2012/04/mediatomb-smf.xml">mediatomb-smf.xml</a></p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget http://www.dev-eth0.de/wp-content/uploads/2012/04/mediatomb.conf -O /etc/mediatomb.conf
--2012-04-12 05:12:34--  http://www.dev-eth0.de/wp-content/uploads/2012/04/mediatomb.conf
Resolving www.dev-eth0.de (www.dev-eth0.de)... 87.238.193.118
Connecting to www.dev-eth0.de (www.dev-eth0.de)|87.238.193.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 199 1
Saving to: `/etc/mediatomb.conf'

100%[================================================&gt;] 199         --.-K/s   in 0s

2012-04-12 05:12:35 (11.4 MB/s) - `/etc/mediatomb.conf' saved [199/199]

root@test:~# wget http://www.dev-eth0.de/wp-content/uploads/2012/04/svc-mediatomb -O /lib/svc/method/svc-mediatomb
--2012-04-12 05:12:59--  http://www.dev-eth0.de/wp-content/uploads/2012/04/svc-mediatomb
Resolving www.dev-eth0.de (www.dev-eth0.de)... 87.238.193.118
Connecting to www.dev-eth0.de (www.dev-eth0.de)|87.238.193.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 301 1
Saving to: `/lib/svc/method/svc-mediatomb'

100%[================================================&gt;] 301         --.-K/s   in 0s

2012-04-12 05:12:59 (16.1 MB/s) - `/lib/svc/method/svc-mediatomb' saved [301/301]

root@test:~# wget http://www.dev-eth0.de/wp-content/uploads/2012/04/mediatomb-smf.xml
--2012-04-12 05:13:09--  http://www.dev-eth0.de/wp-content/uploads/2012/04/mediatomb-smf.xml
Resolving www.dev-eth0.de (www.dev-eth0.de)... 87.238.193.118
Connecting to www.dev-eth0.de (www.dev-eth0.de)|87.238.193.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1544 (1.5K) [application/xml]
Saving to: `mediatomb-smf.xml'

100%[================================================&gt;] 1,544       --.-K/s   in 0.001s

2012-04-12 05:13:09 (1.10 MB/s) - `mediatomb-smf.xml' saved [1544/1544]
</pre>
<p>Now modify the /etc/mediatomb.conf file to match your IP and PORT.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# chmod 755 /lib/svc/method/svc-mediatomb
root@test:~# svccfg validate mediatomb-smf.xml
root@test:~# svccfg import mediatomb-smf.xml
</pre>
<p>Now we have installed MediaTomb as a Solaris Service and can start and stop it with the <strong>svcadm</strong> command and check it&#8217;s status with <strong>svcs</strong>.</p>
<p><strong>Commands:</strong></p>
<pre class="brush: bash; title: ; notranslate">
svcadm enable mediatomb
svcadm disable mediatomb
</pre>
<p>The following commands will start tor and check if everything is ok and running.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# svcadm enable mediatomb
root@test:~# svcs -x mediatomb
svc:/application/mediatomb:default (UPnP Media Server)
 State: online since Thu Apr 12 05:31:12 2012
   See: mediatomb(1)
   See: http://mediatomb.cc
   See: /var/svc/log/application-mediatomb:default.log
Impact: None.
</pre>
<p>That&#8217;s it, you now can access MediaTomb via http://YOUR_IP:YOUR_PORT.</p>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1532&amp;md5=29a936f0ca582fca6897ed6536a1d93e" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/_YpXC_ADfUc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/mediatomb-on-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Fmediatomb-on-opensolaris%2F&amp;language=de_DE&amp;category=text&amp;title=MediaTomb+on+OpenSolaris&amp;description=This+howto+describes+how+to+install+MediaTomb%2C+a+free%2Fopensource+UPnP+Media+Server+on+OpenSolaris%2FOpenIndiana.+Basic+installation+Install+SpiderMonkey+You+can+find+the+required+steps+to+install+the+SpiderMonkey+JS+Library...&amp;tags=HowTos%2COpenIndiana%2COpenSolaris%2Cblog" type="text/html" />
	</item>
		<item>
		<title>ApkCreationException: Debug Certificate expired</title>
		<link>http://www.dev-eth0.de/apkcreationexception-debug-certificate-expired/</link>
		<comments>http://www.dev-eth0.de/apkcreationexception-debug-certificate-expired/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 09:30:12 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=1520</guid>
		<description><![CDATA[Sometimes, you get a ApkCreationException when you try to build your Android Project. This Exception is produced by a expired Debug Certificate, which is created while the first build with a new installed Android SDK and which expires after 1 year. To force the Android-SDK to create a new Debug Certificate, you have to delete [...]]]></description>
				<content:encoded><![CDATA[<p>Sometimes, you get a ApkCreationException when you try to build your Android Project. This Exception is produced by a expired Debug Certificate, which is created while the first build with a new installed Android SDK and which expires after 1 year.<br />
To force the Android-SDK to create a new Debug Certificate, you have to delete the old certificate (debug.keystore).<br />
It can be found at the following locations:</p>
<pre><strong>Windows XP:</strong>
 C:\Documents and Settings\YOURUSER\.android\
<strong>Windows 7:</strong>
 C:\Users\YOURUSER\.android\
<strong>OS X and Linux:</strong>
 ~/.android</pre>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1520&amp;md5=b35143e86be22c2f3e617dde9b9d6b1e" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/z1CAbcMacYo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/apkcreationexception-debug-certificate-expired/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Fapkcreationexception-debug-certificate-expired%2F&amp;language=de_DE&amp;category=text&amp;title=ApkCreationException%3A+Debug+Certificate+expired&amp;description=Sometimes%2C+you+get+a+ApkCreationException+when+you+try+to+build+your+Android+Project.+This+Exception+is+produced+by+a+expired+Debug+Certificate%2C+which+is+created+while+the+first+build+with...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>TOR on OpenSolaris</title>
		<link>http://www.dev-eth0.de/tor-on-opensolaris/</link>
		<comments>http://www.dev-eth0.de/tor-on-opensolaris/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 00:34:17 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[(Open)Solaris]]></category>
		<category><![CDATA[Homeserver]]></category>
		<category><![CDATA[Solaris Server]]></category>
		<category><![CDATA[HowTos]]></category>
		<category><![CDATA[OpenIndiana]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=1506</guid>
		<description><![CDATA[As the currently available OpenSolaris packages of TOR are outdated, I compiled the sources and documented what to do. Basic installation First we need to install some packages which are required to download and compile TOR: The next step is to create a user for TOR (we don&#8217;t want to run it as root). Then we [...]]]></description>
				<content:encoded><![CDATA[<p>As the currently available OpenSolaris packages of <a href="https://www.torproject.org/">TOR</a> are outdated, I compiled the sources and documented what to do.</p>
<h4>Basic installation</h4>
<p>First we need to install some packages which are required to download and compile TOR:</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~#  pkg install wget gcc-43 system/library/math/header-math libevent
               Packages to install:    18
           Create boot environment:    No
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                18/18   3066/3066    70.7/70.7

PHASE                                        ACTIONS
Install Phase                              4013/4013

PHASE                                          ITEMS
Package State Update Phase                     18/18
Image State Update Phase                         2/2


root@test:~# PATH=$PATH:/usr/gcc/4.3/bin
</pre>
<p>The next step is to create a user for TOR (we don&#8217;t want to run it as root).</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# mkdir -p /export/home
root@test:~# useradd -d /export/home/tor -s /usr/bin/false -m tor
</pre>
<p>Then we need to download and unpack the current TOR version from <a href="https://www.torproject.org/download/download.html.en">https://www.torproject.org/download/download.html.en</a>.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget https://www.torproject.org/dist/tor-0.2.2.35.tar.gz
--2012-02-06 00:46:36--  https://www.torproject.org/dist/tor-0.2.2.35.tar.gz
Resolving www.torproject.org (www.torproject.org)... 86.59.30.36, 38.229.72.14, 38.229.72.16
Connecting to www.torproject.org (www.torproject.org)|86.59.30.36|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2787536 (2.7M) [application/x-gzip]
Saving to: `tor-0.2.2.35.tar.gz'

100%[==============================================&gt;] 2,787,536   2.20M/s   in 1.2s

2012-02-06 00:46:56 (224 KB/s) - `tor-0.2.2.35.tar.gz' saved [2787536/2787536]

root@test:~# tar xf tor-0.2.2.35.tar.gz
root@test:~# cd tor-0.2.2.35
root@test:~/tor-0.2.2.35#
</pre>
<p>Now we can configure and build tor.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/tor-0.2.2.35# ./configure --prefix=/opt/tor
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
...

root@test:~/tor-0.2.2.35# make
make  all-recursive
make[1]: Entering directory `/root/tor-0.2.2.35'
Making all in src
make[2]: Entering directory `/root/tor-0.2.2.35/src'
...

root@test:~/tor-0.2.2.35# make install
Making install in src
make[1]: Entering directory `/root/tor-0.2.2.35/src'
Making install in common
make[2]: Entering directory `/root/tor-0.2.2.35/src/common'
make[3]: Entering directory `/root/tor-0.2.2.35/src/common'
...

root@test:~/tor-0.2.2.35# cd /opt/tor/
root@test:/opt/tor#
</pre>
<h4>Configuration</h4>
<p>There is a sample configuration available which can be used as a base for further modification.</p>
<pre class="brush: bash; title: ; notranslate">
oot@test233:/opt/tor# cd etc/tor
root@test:/opt/tor/etc/tor# cp torrc.sample torrc
</pre>
<p>Have a look at the <a href="https://www.torproject.org/docs/manual.html.en">manual</a> for further information. </p>
<p>Finally we have to create the data and log directory which are configured in the config.<br />
e.g.:</p>
<pre class="brush: bash; title: ; notranslate">
Create data-directory
root@test:/opt/tor# mkdir -p /opt/tor/var/tor
root@test:/opt/tor# chown tor /opt/tor/var/tor

Create log-directory
root@test:~# mkdir /var/log/tor
root@test:~# chmod 777 /var/log/tor
</pre>
<h4>TOR as Solaris Service</h4>
<p>The final step is to integrate TOR into Solaris&#8217; <a href="http://en.wikipedia.org/wiki/Service_Management_Facility">Service Management Facility (smf)</a>. This requires a XML config file which describes the TOR-service.<br />
The required file can be found here:</p>
<p><a href="http://www.dev-eth0.de/wp-content/uploads/2012/02/tor.xml">tor.xml</a></p>
<pre class="brush: bash; title: ; notranslate">
root@test:/opt/tor# cd /tmp/
root@test:/tmp# wget http://www.dev-eth0.de/wp-content/uploads/2012/02/tor.xml
root@test:/tmp# svccfg import -V tor.xml
</pre>
<p>Now we have installed TOR as a Solaris Service and can start and stop it with the <strong>svcadm</strong> command and check it&#8217;s status with <strong>svcs</strong>.</p>
<p><strong>Commands:</strong></p>
<pre class="brush: bash; title: ; notranslate">
svcadm enable tor
svcadm disable tor
</pre>
<p>The following commands will start tor and check if everything is ok and running.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:/tmp# svcadm enable tor
root@test:~# svcs -x tor
svc:/network/tor:default (Tor Relay Daemon)
 State: online since Mon Feb  6 01:29:18 2012
   See: tor(1M)
   See: /var/svc/log/network-tor:default.log
Impact: None.
</pre>
<p>Finally you can check the tor logfile which should contain a line similar to</p>
<pre class="brush: bash; title: ; notranslate">
Feb 06 02:00:44.494 [notice] Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.
</pre>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1506&amp;md5=15077489599847bb6d944edfc17f594d" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/Uw7tpYRC9_U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/tor-on-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Ftor-on-opensolaris%2F&amp;language=de_DE&amp;category=text&amp;title=TOR+on+OpenSolaris&amp;description=As+the+currently+available+OpenSolaris+packages+of+TOR%C2%A0are+outdated%2C+I+compiled+the+sources+and+documented+what+to+do.+Basic+installation+First+we+need+to+install+some+packages+which+are+required...&amp;tags=HowTos%2COpenIndiana%2COpenSolaris%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Leseempfehlung: Android-Emulator auf Steroid</title>
		<link>http://www.dev-eth0.de/leseempfehlung-android-emulator-auf-steroid/</link>
		<comments>http://www.dev-eth0.de/leseempfehlung-android-emulator-auf-steroid/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 18:43:27 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[HowTos]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=1501</guid>
		<description><![CDATA[Die meisten Entwickler nutzen den Android-Emulator ja wahrscheinlich dafür, selbst entwickelte Programme komfortabel zu testen. Es gibt aber auch noch einen weiteren interessanten Einsatzzweck, den Gaby Becker in einem Blog-Beitrag beschrieben hat. Es geht hierbei um die Möglichkeit, über den Android Market Apps im Emulator zu installieren und diese dann sowohl lokal zu nutzen oder [...]]]></description>
				<content:encoded><![CDATA[<p>Die meisten Entwickler nutzen den Android-Emulator ja wahrscheinlich dafür, selbst entwickelte Programme komfortabel zu testen. Es gibt aber auch noch einen weiteren interessanten Einsatzzweck, den Gaby Becker in einem Blog-Beitrag beschrieben hat.</p>
<p>Es geht hierbei um die Möglichkeit, über den Android Market Apps im Emulator zu installieren und diese dann sowohl lokal zu nutzen oder für Präsentationen zu nutzen.</p>
<p><a href="http://www.gaby-becker.de/component/content/article/47-android/96-android-praesentieren-mit-dem-emulator.html">Gaby Becker: Präsentieren mit dem Emulator</a></p>
<p>&nbsp;</p>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1501&amp;md5=377ce6d02e06bff63fe5d37a89913f07" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/dj3qqt16-lk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/leseempfehlung-android-emulator-auf-steroid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Fleseempfehlung-android-emulator-auf-steroid%2F&amp;language=de_DE&amp;category=text&amp;title=Leseempfehlung%3A+Android-Emulator+auf+Steroid&amp;description=Die+meisten+Entwickler+nutzen+den+Android-Emulator+ja+wahrscheinlich+daf%C3%BCr%2C+selbst+entwickelte+Programme+komfortabel+zu+testen.+Es+gibt+aber+auch+noch+einen+weiteren+interessanten+Einsatzzweck%2C+den+Gaby+Becker+in+einem+Blog-Beitrag...&amp;tags=Android%2CHowTos%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Postfix on OpenSolaris</title>
		<link>http://www.dev-eth0.de/postfix-on-opensolaris/</link>
		<comments>http://www.dev-eth0.de/postfix-on-opensolaris/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 16:00:15 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Homeserver]]></category>
		<category><![CDATA[Solaris Server]]></category>
		<category><![CDATA[HowTos]]></category>
		<category><![CDATA[OpenIndiana]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/postfix-on-opensolaris/</guid>
		<description><![CDATA[OpenSolaris uses Sendmail as default Mail Transfer Agent (MTA) which seems to be designed as a admin-hell. I prefer Postfix with it&#8217;s easy to read config files. As the package repository of OpenSolaris doesn&#8217;t provide a current Postfix, this HowTo explains a way to build Postfix from source and install it on your OpenSolaris system. [...]]]></description>
				<content:encoded><![CDATA[<p>OpenSolaris uses <a title="Sendmail" href="http://www.sendmail.com/sm/open_source/" target="_blank">Sendmail</a> as default <a title="Message transfer agent" href="https://en.wikipedia.org/wiki/Message_transfer_agent" target="_blank">Mail Transfer Agent (MTA)</a> which seems to be designed as a admin-hell. I prefer <a title="Postfix" href="http://www.postfix.org" target="_blank">Postfix</a> with it&#8217;s easy to read config files.</p>
<p>As the package repository of OpenSolaris doesn&#8217;t provide a current Postfix, this HowTo explains a way to build Postfix from source and install it on your OpenSolaris system.</p>
<h4>Basics</h4>
<p>First step is to install/get a working GCC (preferred version &gt;4.3). One possibility is to follow my Guide about <a title="Compile GCC 4 on OpenSolaris" href="http://www.dev-eth0.de/compile-gcc-4-on-opensolaris/" target="_blank">GCC-4 on OpenSolaris</a> or to use the package repository. In addition you will need gnu-make and wget.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# pkg install gcc-43 wget nano developer/build/gnu-make

               Packages to install:    18
           Create boot environment:    No
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                18/18   3121/3121    71.5/71.5

PHASE                                        ACTIONS
Install Phase                              4183/4183

PHASE                                          ITEMS
Package State Update Phase                     18/18
Image State Update Phase                         2/2

root@test:~# PATH=/usr/bin:/usr/gcc/4.3/bin:$PATH
</pre>
<h4>Preparations</h4>
<p>Since the build environment is now set up, you can download the current postfix source release.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget http://de.postfix.org/ftpmirror/official/postfix-2.8.5.tar.gz

--2011-10-04 22:38:09--  http://de.postfix.org/ftpmirror/official/postfix-2.8.5.tar.gz
Resolving de.postfix.org (de.postfix.org)... 141.42.206.35
Connecting to de.postfix.org (de.postfix.org)|141.42.206.35|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3647010 (3.5M) [application/x-gzip]
Saving to: `postfix-2.8.5.tar.gz'

100%[======================================&gt;] 3,647,010    700K/s   in 5.6s    =

2011-10-04 22:38:15 (632 KB/s) - `postfix-2.8.5.tar.gz' saved [3647010/3647010]

root@test:~# tar xf postfix-2.8.5.tar.gz
root@test:~# cd postfix-2.8.5
</pre>
<p>One of the postfix scripts has an error and tries to use NIS and NIS+ with OpenSolaris which will result in a build-fail.</p>
<p>To fix it, remove the lines &#8220;#define HAS_NIS&#8221; and &#8220;#define HAS_NISPLUS&#8221; (line 403 and 404) from src/util/sys_defs.h or apply this path:</p>
<pre class="brush: bash; title: ; notranslate">
--- src/util/sys_defs.h.bak     Thu Jun 16 00:36:37 2011
+++ src/util/sys_defs.h Tue Oct  4 22:39:49 2011
@@ -400,8 +400,6 @@
 #define HAS_DBM
 #define DEF_DB_TYPE    &quot;dbm&quot;
 #define ALIAS_DB_MAP   &quot;dbm:/etc/mail/aliases&quot;
-#define HAS_NIS
-#define HAS_NISPLUS
 #define USE_SYS_SOCKIO_H               /* Solaris 2.5, changed sys/ioctl.h */
 #define GETTIMEOFDAY(t)        gettimeofday(t)
 #define ROOT_PATH      &quot;/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb&quot;
</pre>
<h4>Building</h4>
<p>Now you can start building Postfix.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/postfix-2.8.5# gmake makefiles CCARGS='-DUSE_TLS \
 -lssl -lcrypto -DUSE_SASL_AUTH \
 -DUSE_CYRUS_SASL -I/usr/include/sasl' \
 AUXLIBS=&quot;-L/usr/lib -lsasl -lssl -lcrypto&quot;

(echo &quot;# Do not edit -- this file documents how Postfix was built for your machine.&quot;;
&gt;makedefs.tmp
set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
...

root@test:~/postfix-2.8.5# gmake

gmake -f Makefile.in MAKELEVEL= Makefiles
(echo &quot;# Do not edit -- this file documents how Postfix was built for your machine.&quot;;
&gt;makedefs.tmp
...
</pre>
<p>If you didn&#8217;t get an error, you can now check if libsasl was linked correctly:</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/postfix-2.8.5# ldd ./bin/postconf

        libsasl.so.1 =&gt;  /usr/lib/libsasl.so.1
        libssl.so.0.9.8 =&gt;       /lib/libssl.so.0.9.8
        libcrypto.so.0.9.8 =&gt;    /lib/libcrypto.so.0.9.8
        libresolv.so.2 =&gt;        /lib/libresolv.so.2
        libsocket.so.1 =&gt;        /lib/libsocket.so.1
        libnsl.so.1 =&gt;   /lib/libnsl.so.1
        libc.so.1 =&gt;     /lib/libc.so.1
        libmd.so.1 =&gt;    /lib/libmd.so.1
        libmp.so.2 =&gt;    /lib/libmp.so.2
        libm.so.2 =&gt;     /lib/libm.so.2
</pre>
<h4>Create a OpenSolaris Package</h4>
<p>There is a cool script available which takes the compiled Postfix sources and builds a OpenSolaris package with all required settings (e.g. users, service-definitions).</p>
<p>You can find the script on Ihsan Dogan&#8217;s website: http://ihsan.dogan.ch/postfix/</p>
<p>Directlink: http://ihsan.dogan.ch/postfix/downloads/makePostfixPkg.sh</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/postfix-2.8.5# wget http://ihsan.dogan.ch/postfix/downloads/makePostfixPkg.sh

--2011-10-04 22:42:35--  http://ihsan.dogan.ch/postfix/downloads/makePostfixPkg.sh
Resolving ihsan.dogan.ch (ihsan.dogan.ch)... 82.220.5.55
Connecting to ihsan.dogan.ch (ihsan.dogan.ch)|82.220.5.55|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21030 (21K) [application/x-sh]
Saving to: `makePostfixPkg.sh'

100%[======================================&gt;] 21,030      --.-K/s   in 0.1s

2011-10-04 22:42:35 (205 KB/s) - `makePostfixPkg.sh' saved [21030/21030]

root@test:~/postfix-2.8.5# chmod +x makePostfixPkg.sh
root@test:~/postfix-2.8.5# ./makePostfixPkg.sh
...
</pre>
<p>This will result in a file named CNDpostfix-2.8.5,REV=111005-SunOS5.11-i386.pkg</p>
<h4>Install Postfix</h4>
<p>If you have a installed Sendmail, you need to remove it before the installation of postfix:</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/postfix-2.8.5# pkg uninstall sendmail
</pre>
<p>Now you can use pkgadd to install the package:</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/postfix-2.8.5# pkgadd -d CNDpostfix-2.8.5\,REV\=111005-SunOS5.11-i386.pkg

The following packages are available:
  1  CNDpostfix     Postfix MTA
                    (i386) 2.8.5r0.4.0,REV=111005

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: a

Processing package instance  from

Postfix MTA(i386) 2.8.5r0.4.0,REV=111005
http://www.postfix.org/ packaged by Ihsan Dogan
...
</pre>
<p>The final step is to configure your Postfix and activate it afterwards.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~/postfix-2.8.5# svcadm enable svc:/network/postfix:default
root@test:~/postfix-2.8.5# svcs -vx postfix
svc:/network/postfix:default (Postfix SMTP Server)
 State: online since Tue Oct  4 22:46:29 2011
   See: man -M /usr/share/man -s 1 postfix
   See: http://www.postfix.org/documentation.html
   See: /var/svc/log/network-postfix:default.log
Impact: None.
</pre>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1488&amp;md5=254cbe0438f363a4bbec5c6d3be3d63e" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/GGfN59GDuFQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/postfix-on-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Fpostfix-on-opensolaris%2F&amp;language=de_DE&amp;category=text&amp;title=Postfix+on+OpenSolaris&amp;description=OpenSolaris+uses+Sendmail+as+default+Mail+Transfer+Agent+%28MTA%29+which+seems+to+be+designed+as+a+admin-hell.+I+prefer+Postfix+with+it%26%238217%3Bs+easy+to+read+config+files.+As+the+package...&amp;tags=HowTos%2COpenIndiana%2COpenSolaris%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Upgrade an OpenIndiana Zone with pkg</title>
		<link>http://www.dev-eth0.de/upgrade-an-openindiana-zone-with-pkg/</link>
		<comments>http://www.dev-eth0.de/upgrade-an-openindiana-zone-with-pkg/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 08:00:44 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Homeserver]]></category>
		<category><![CDATA[Solaris Server]]></category>
		<category><![CDATA[HowTos]]></category>
		<category><![CDATA[OpenIndiana]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=1472</guid>
		<description><![CDATA[On September 14th 2011 the OpenIndiana Project announced the next development release of OpenIndiana (Build 151a). That&#8217;s a good reason to upgrade your system and it&#8217;s Zones. The common way to upgrade your OpenIndiana System is to run the following command. This will result in a new snapshot on your disk and a new entry [...]]]></description>
				<content:encoded><![CDATA[<p>On September 14th 2011 the OpenIndiana Project announced the next development release of OpenIndiana (Build 151a). That&#8217;s a good reason to upgrade your system and it&#8217;s Zones.</p>
<p>The common way to upgrade your OpenIndiana System is to run the following command.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# pkg image-update
                Packages to remove:     2
               Packages to install:    13
                Packages to update:   115
           Create boot environment:   Yes
...
</pre>
<p>This will result in a new snapshot on your disk and a new entry in the boot menu.</p>
<p>If you try to perform an Upgrade of a Zone this way, it will fail with the message:</p>
<pre class="brush: bash; title: ; notranslate">
pkg: Unable to clone the current boot environment.
</pre>
<p>Therefor the upgrade process has to be triggered from the global zone. Let&#8217;s say you want to upgrade the Zone &#8220;<strong>test</strong>&#8221; with the ZFS dataset under &#8220;<strong>/zones/test</strong>&#8220;. The Zone currently runs OpenIndiana Build 148 as we can see after the login:</p>
<pre class="brush: bash; title: ; notranslate">
root@global:~# zlogin test
[Connected to zone 'test' pts/2]
Last login: Wed Oct  4 22:32:48 on pts/2
OpenIndiana     SunOS 5.11      oi_148  November 2010
</pre>
<p>To perform the upgrade, we should halt the zone first.</p>
<pre class="brush: bash; title: ; notranslate">
root@global:~# zoneadm -z test halt
root@global:~# pkg -R /zones/test/root image-update -v
                Packages to remove:     2
               Packages to install:     13
                Packages to update:     115
           Create boot environment:     No
               Services to restart:     2
              Rebuild boot archive:     No
Changed fmris:
pkg://openindiana.org/runtime/perl-584@5.8.4,5.11-0.148:20101122T085618Z -&gt; None
pkg://openindiana.org/runtime/perl-584/extra@5.8.4,5.11-0.148:20101122T085622Z -&gt; None
...
</pre>
<p>If everything work fine, you should see this message:</p>
<pre class="brush: bash; title: ; notranslate">
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                              130/130 15260/15260  106.7/106.7

PHASE                                        ACTIONS
Removal Phase                              4253/4253
Install Phase                            16931/16931
Update Phase                               5112/5112

PHASE                                          ITEMS
Package State Update Phase                   245/245
Package Cache Update Phase                   117/117
Image State Update Phase                         2/2

---------------------------------------------------------------------------
NOTE: Please review release notes posted at:

http://wiki.openindiana.org/oi/oi_151a+Release+Notes

---------------------------------------------------------------------------

root@global:~#
</pre>
<p>Now it&#8217;s time to restart your zone and check it&#8217;s status.</p>
<pre class="brush: bash; title: ; notranslate">
root@global:~# zoneadm -z test boot
root@global:~# zlogin test
[Connected to zone 'test' pts/2]
Last login: Wed Oct  4 23:10:48 on pts/2
OpenIndiana (powered by illumos)    SunOS 5.11    oi_151a    September 2011
root@test:~#
</pre>
<p>As you can see, the Zone now runs OpenIndiana Build 151a&#8230;</p>
<p>And if you have multiple zones running, you can use something like this:</p>
<pre class="brush: bash; title: ; notranslate">
root@global:~# for i in `seq 220 235`; do zoneadm -z test$i halt; pkg -R /zones/test/test$i/root image-update; zoneadm -z test$i boot; done
</pre>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1472&amp;md5=1898efc8b0746d3a6c85f4e7aeb3aa97" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/8K3jTUlweqU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/upgrade-an-openindiana-zone-with-pkg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Fupgrade-an-openindiana-zone-with-pkg%2F&amp;language=de_DE&amp;category=text&amp;title=Upgrade+an+OpenIndiana+Zone+with+pkg&amp;description=On+September+14th+2011+the+OpenIndiana+Project+announced+the+next+development+release+of+OpenIndiana+%28Build+151a%29.+That%26%238217%3Bs+a+good+reason+to+upgrade+your+system+and+it%26%238217%3Bs+Zones.+The+common+way...&amp;tags=HowTos%2COpenIndiana%2COpenSolaris%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Concat and minimize JavaScript and CSS files with an ANT-Script</title>
		<link>http://www.dev-eth0.de/concat-and-minimize-javascript-and-css-files-with-an-ant-script/</link>
		<comments>http://www.dev-eth0.de/concat-and-minimize-javascript-and-css-files-with-an-ant-script/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 16:00:47 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[HowTos]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=1449</guid>
		<description><![CDATA[If you develop a website or webapplication it&#8217;s always a good idea to reduce the number of HTTP requests by combining the Javascript and CSS into single files. In addition those files should be minimized. There is a cool Java-tool available which can help you: YUI-Compressor. It can be used from the commandline and is [...]]]></description>
				<content:encoded><![CDATA[<p>If you develop a website or webapplication it&#8217;s always a good idea to reduce the number of HTTP requests by combining the Javascript and CSS into single files. In addition those files should be minimized.</p>
<p>There is a cool Java-tool available which can help you: <a title="YUI-Compressor" href="http://developer.yahoo.com/yui/compressor/" target="_blank">YUI-Compressor</a>. It can be used from the commandline and is able to minimize Javascript and CSS files. A document about the CSS minification can be found <a title="CSS-minification" href="http://developer.yahoo.com/yui/compressor/css.html" target="_blank">here</a>.</p>
<p>To automate the process of concatination and minification I wrote a little <a title="Ant" href="http://ant.apache.org/" target="_blank">ANT</a> script.</p>
<p><a href="http://www.dev-eth0.de/wp-content/uploads/2011/09/minify.zip">Ant Script for CSS and JS concatination and minification</a></p>
<p>All settings can be found in the head, pathes can be either relational or absolut. You have to download a current version of YUI-Compressor from here: </p>
<p><a title="Download YUI-Compressor" href="http://yuilibrary.com/download/yuicompressor/" target="_blank">Download YUI-Compressor</a>.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- Settings for CSS --&gt;
&lt;property name=&quot;css.src-dir&quot; value=&quot;path-to-css-source&quot;/&gt;
&lt;property name=&quot;css.dest-dir&quot; value=&quot;path-to-css-destination&quot;/&gt;
&lt;property name=&quot;css.files&quot; value=&quot;
    css1.css,
    css2.css
&quot;/&gt;

&lt;!-- Settings for JS --&gt;
&lt;property name=&quot;js.src-dir&quot; value=&quot;path-to-js-source&quot;/&gt;
&lt;property name=&quot;js.dest-dir&quot; value=&quot;path-to-js-destination&quot;/&gt;
&lt;property name=&quot;js.files&quot; value=&quot;
    js1.js,
    js2.js
&quot;/&gt;

&lt;!-- General settings --&gt;
&lt;property name=&quot;yuicompressor-jar&quot; value=&quot;path-to-yuicompressor.jar&quot;/&gt;
</pre>
<p>I defined three targets to provide a maximum of flexibility:</p>
<ul>
<li>all: Triggers css and javascript target</li>
<li>css: Processes CSS</li>
<li>javascript: Processes Javascript</li>
</ul>
<p>Those targets can be called from commandline:</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# ant -f minify.xml TARGET
</pre>
<p>The CSS and Javascript target first concat the given CSS/JS files and then uses YUI-Compressor to minify them. The concated version will be deleted afterwards.</p>
<p>NOTE: YUI-Compressor version minor 2.4.4 have a bug which prevents the usage of Media-Queries in minified CSS!!!</p>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1449&amp;md5=9b53ee8f9981fbcb80caa21002cd8511" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/59awW2u_8HA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/concat-and-minimize-javascript-and-css-files-with-an-ant-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Fconcat-and-minimize-javascript-and-css-files-with-an-ant-script%2F&amp;language=de_DE&amp;category=text&amp;title=Concat+and+minimize+JavaScript+and+CSS+files+with+an+ANT-Script&amp;description=If+you+develop+a+website+or+webapplication+it%26%238217%3Bs+always+a+good+idea+to+reduce+the+number+of+HTTP+requests+by+combining+the+Javascript+and+CSS+into+single+files.+In+addition...&amp;tags=HowTos%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Compile GCC 4 on OpenSolaris</title>
		<link>http://www.dev-eth0.de/compile-gcc-4-on-opensolaris/</link>
		<comments>http://www.dev-eth0.de/compile-gcc-4-on-opensolaris/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 18:43:36 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Homeserver]]></category>
		<category><![CDATA[Solaris Server]]></category>
		<category><![CDATA[HowTos]]></category>
		<category><![CDATA[OpenIndiana]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=1429</guid>
		<description><![CDATA[In some cases, it&#8217;s neccessary to use a newer GCC compiler (Homepage) than the one provided via a package-manager. OpenSolaris currently provices a GCC 3.4.3 and GCC 4.3. This guide should help you to compile GCC 4 on OpenSolaris, in this case GCC 4.6.1. The whole software compiled in this guide will be installed in [...]]]></description>
				<content:encoded><![CDATA[<p>In some cases, it&#8217;s neccessary to use a newer <strong>GCC</strong> compiler <a href="http://gcc.gnu.org/">(Homepage)</a> than the one provided via a package-manager. OpenSolaris currently provices a GCC 3.4.3 and GCC 4.3. This guide should help you to compile GCC 4 on OpenSolaris, in this case <strong>GCC 4.6.1</strong>.<br />
The whole software compiled in this guide will be installed in <strong>/opt/local</strong>. As I don&#8217;t run OpenSolaris on a single-core machine, I&#8217;ll use the <strong>-j</strong> switch for make to compile multithreaded.</p>
<h4>Basics</h4>
<p>Like in most howtos, we need some basic packages from the repository. Those are required to compile GCC and it&#8217;s dependencies.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# pkg install wget SUNWgcc SUNWgmake SUNWxcu4 system/library/math/header-math
               Packages to install:     7
           Create boot environment:    No
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  7/7   2393/2393    37.1/37.1

PHASE                                        ACTIONS
Install Phase                              3215/3215

PHASE                                          ITEMS
Package State Update Phase                       7/7
Image State Update Phase                         2/2
</pre>
<h4>Building dependencies</h4>
<p>The next step is to compile some dependencies of GCC. We could use OpenSolaris packages, but those are most likely outdated too.</p>
<h5>binutils</h5>
<p>The first part of software we will build are the <strong>binutils</strong> <a href="http://www.gnu.org/s/binutils/">(Homepage)</a>. The current release is 2.21.1 and can be downloaded <a href="http://ftp.gnu.org/gnu/binutils/binutils-2.21.1.tar.gz">from here</a>.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1.tar.gz
--2011-08-05 20:54:31--  http://ftp.gnu.org/gnu/binutils/binutils-2.21.1.tar.gz
Connecting to ftp.gnu.org|140.186.70.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25195472 (24M) [application/x-gzip]
Saving to: `binutils-2.21.1.tar.gz'

100%[==============================================&gt;] 25,195,472   441K/s   in 58s

2011-08-05 20:55:29 (427 KB/s) - `binutils-2.21.1.tar.gz' saved [25195472/25195472]

root@test:~# tar xjf binutils-2.21.1.tar.gz
root@test:~# cd binutils-2.21.1
root@test:~/binutils-2.21.1# ./configure --prefix=/opt/local/gnu --disable-nls
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
...

root@test:~/binutils-2.21.1# gmake -j 4 &amp;&amp; gmake install
gmake[1]: Entering directory `/root/binutils-2.21.1'
Configuring in ./intl
...
gmake[1]: Nothing to be done for `install-target'.
gmake[1]: Leaving directory `/root/binutils-2.21.1'

root@test:~/binutils-2.21.1# gmake clean
gmake[1]: Entering directory `/root/binutils-2.21.1'
Doing clean in bfd
...

root@test:~/binutils-2.21.1# cd ..
root@test:~# rm -r binutils-2.21.1*
</pre>
<h5>gmplib</h5>
<p>Now we will compile three libraries, which depend on each other. The first one is <strong>gmp</strong> <a href="http://gmplib.org/">(Homepage)</a> in <a href="ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2">version 5.0.2</a>.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
--2011-08-05 22:13:01--  ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
           =&gt; `gmp-5.0.2.tar.bz2'
Resolving ftp.gmplib.org... 130.237.222.241
Connecting to ftp.gmplib.org|130.237.222.241|:21... #connected.
Logging in as anonymous ... Logged in!
==&gt; SYST ... done.    ==&gt; PWD ... done.
==&gt; TYPE I ... done.  ==&gt; CWD (1) /pub/gmp-5.0.2 ... done.
==&gt; SIZE gmp-5.0.2.tar.bz2 ... 2024576
==&gt; PASV ... done.    ==&gt; RETR gmp-5.0.2.tar.bz2 ... done.
Length: 2024576 (1.9M) (unauthoritative)

100%[===============================================&gt;] 2,024,576    195K/s   in 11s

2011-08-05 22:13:13 (187 KB/s) - `gmp-5.0.2.tar.bz2' saved [2024576]

root@test:~# tar xfj gmp-5.0.2.tar.bz2
root@test:~# cd gmp-5.0.2
root@test:~/gmp-5.0.2# ./configure --prefix=/opt/local/gmp/5.0.2 \
    --build=i386-pc-solaris2.11

checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
...

root@test:~/gmp-5.0.2# gmake -j 4 
gcc -std=gnu99 `test -f 'gen-fac_ui.c' || echo './'`gen-fac_ui.c -o gen-fac_ui
gcc -std=gnu99 `test -f 'gen-fib.c' || echo './'`gen-fib.c -o gen-fib
...

root@test:~/gmp-5.0.2# gmake install
gmake  install-recursive
gmake[1]: Entering directory `/root/gmp-5.0.2'
...

root@test:~/gmp-5.0.2# gmake clean
Making clean in doc
gmake[1]: Entering directory `/root/gmp-5.0.2/doc'
...

root@test:~/gmp-5.0.2# cd ..
root@test:~# rm -r gmp-5.0.2*
root@test:~# ln -s /opt/local/gmp/5.0.2/lib/* /usr/lib/
</pre>
<h5>mpfr</h5>
<p>MPFR <a href="http://www.mpfr.org/">(Homepage)</a> depends on GMP and is next on our list.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget http://www.mpfr.org/mpfr-current/mpfr-3.0.1.tar.gz
--2011-08-05 21:09:42--  http://www.mpfr.org/mpfr-current/mpfr-3.0.1.tar.gz
Resolving www.mpfr.org... 152.81.144.6
Connecting to www.mpfr.org|152.81.144.6|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1478243 (1.4M) [application/x-gzip]
Saving to: `mpfr-3.0.1.tar.gz'

100%[================================================&gt;] 1,478,243    412K/s   in 3.7s

2011-08-05 21:09:46 (394 KB/s) - `mpfr-3.0.1.tar.gz' saved [1478243/1478243]

root@test:~# tar xfj mpfr-3.0.1.tar.gz
root@test:~# cd mpfr-3.0.1
root@test:~/mpfr-3.0.1# ./configure --prefix=/opt/local/mpfr/3.0.1 \
    --build=i386-pc-solaris2.11 \
    --with-gmp=/opt/local/gmp/5.0.2

checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
...

root@test:~/mpfr-3.0.1# gmake -j 4 install
gmake  install-recursive
gmake[1]: Entering directory `/root/mpfr-3.0.1'
...

root@test:~/mpfr-3.0.1# gmake clean
Making clean in tests
gmake[1]: Entering directory `/root/mpfr-3.0.1/tests'
..

root@test:~/mpfr-3.0.1# cd ..
root@test:~# rm -r mpfr-3.0.1*
root@test:~# ln -s /opt/local/mpfr/3.0.1/lib/* /usr/lib/
</pre>
<h5>mpc</h5>
<p>The final dependeny is <strong>mpc</strong> <a href="http://www.multiprecision.org/">(Homepage)</a> which depends on both GMP and MPFR. The current version is 0.9, but this one doesn&#8217;t compile on OpenSolaris. We will use <a href="http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz">0.8.2</a> instead.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz
--2011-08-05 21:32:50--  http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz
Resolving www.multiprecision.org... 213.165.76.208
Connecting to www.multiprecision.org|213.165.76.208|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 548401 (536K) [application/x-tar]
Saving to: `mpc-0.8.2.tar.gz'

100%[=====================================================&gt;] 548,401      265K/s   in 2.0s

2011-08-05 21:32:52 (265 KB/s) - `mpc-0.8.2.tar.gz' saved [548401/548401]

root@test:~# tar xfj mpc-0.8.2.tar.gz
root@test:~# cd mpc-0.8.2
root@test:~/mpc-0.8.2# ./configure --prefix=/opt/local/mpc/0.8.2 --build=i386-pc-solaris2.11 --with-gmp=/opt/local/gmp/5.0.2 --with-mpfr=/opt/local/mpfr/3.0.1
checking for a BSD-compatible install... 
...

root@test:~/mpc-0.8.2# gmake -j 4 install
Making install in src
gmake[1]: Entering directory `/root/mpc-0.8.2/src'
...

root@test:~/mpc-0.8.2# gmake clean
Making clean in doc
gmake[1]: Entering directory `/root/mpc-0.8.2/doc'
...

root@test:~/mpc-0.8.2# cd ..
root@test:~# rm -r mpc-0.8.2*
root@test:~# ln -s /opt/local/mpc/0.8.2/lib/* /usr/lib/
</pre>
<h4>GCC</h4>
<p>Now we can finally begin to compile GCC. The current release is <a href="ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.6.1/gcc-4.6.1.tar.gz">4.6.1</a>.</p>
<pre class="brush: bash; title: ; notranslate">
root@test:~# wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.6.1/gcc-4.6.1.tar.gz
--2011-08-05 21:36:24--  ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.6.1/gcc-4.6.1.tar.gz
           =&gt; `gcc-4.6.1.tar.gz'
Resolving ftp.fu-berlin.de... 130.133.3.130
Connecting to ftp.fu-berlin.de|130.133.3.130|:21... connected.
Logging in as anonymous ... Logged in!
==&gt; SYST ... done.    ==&gt; PWD ... done.
==&gt; TYPE I ... done.  ==&gt; CWD (1) /unix/languages/gcc/releases/gcc-4.6.1 ... done.
==&gt; SIZE gcc-4.6.1.tar.gz ... 93426552
==&gt; PASV ... done.    ==&gt; RETR gcc-4.6.1.tar.gz ... done.
Length: 93426552 (89M) (unauthoritative)

100%[=================================================&gt;] 93,426,552   348K/s   in 3m 57s

2011-08-05 21:40:21 (385 KB/s) - `gcc-4.6.1.tar.gz' saved [93426552]

root@test:~# tar xjf gcc-4.6.1.tar.gz
root@test:~# mkdir gcc-obj
root@test:~# cd gcc-obj/
root@test:~/gcc-obj# ../gcc-4.6.1/configure \
    --with-gmp=/opt/local/gmp/5.0.2 \
    --with-mpfr=/opt/local/mpfr/3.0.1 \
    --with-mpc=/opt/local/mpc/0.8.2 \
    --with-gnu-as \
    --with-as=/opt/local/gnu/bin/as \
    --enable-shared \
    --disable-nls \
    --enable-languages=c,c++,objc \
    --prefix=/opt/local/gcc/4.6.1

checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
...

root@test:~/gcc-obj# gmake -j 4
a lot of stuff, get a coffee...
...

root@test:~/gcc-obj# gmake install

root@test:~/gcc-obj# gmake clean

root@test:~/gcc-obj# cd ..
root@test:~/gcc-obj# rm -r gcc*

</pre>
<p>Now you have compiled your own GCC and can call it from <strong>/opt/local/gcc/4.6.1/bin</strong>.</p>
 <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=1429&amp;md5=aab818cc665a859162647120c3ca80c5" title="Flattr" target="_blank"><img src="http://www.blog.dev-eth0.de/wp-content/plugins/flattrss/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/dev-eth0de/~4/w0Y9LrRd9bU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/compile-gcc-4-on-opensolaris/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=18679&amp;popout=1&amp;url=http%3A%2F%2Fwww.dev-eth0.de%2Fcompile-gcc-4-on-opensolaris%2F&amp;language=de_DE&amp;category=text&amp;title=Compile+GCC+4+on+OpenSolaris&amp;description=In+some+cases%2C+it%26%238217%3Bs+neccessary+to+use+a+newer+GCC+compiler+%28Homepage%29+than+the+one+provided+via+a+package-manager.+OpenSolaris+currently+provices+a+GCC+3.4.3+and+GCC+4.3.+This+guide...&amp;tags=HowTos%2COpenIndiana%2COpenSolaris%2Cblog" type="text/html" />
	</item>
	</channel>
</rss><!-- Dynamic page generated in 1.244 seconds. --><!-- Cached page generated by WP-Super-Cache on 2013-05-17 21:30:06 --><!-- Compression = gzip -->
