<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>phpslacker &#187; linux</title>
	<atom:link href="http://phpslacker.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpslacker.com</link>
	<description>yet another g33k blog *sigh*</description>
	<lastBuildDate>Sat, 12 Jun 2010 21:18:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='phpslacker.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/704ee04d116ebf72af131a280f4fcac1?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>phpslacker &#187; linux</title>
		<link>http://phpslacker.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://phpslacker.com/osd.xml" title="phpslacker" />
	<atom:link rel='hub' href='http://phpslacker.com/?pushpress=hub'/>
		<item>
		<title>Compiling ejabberd for Ubuntu Lucid server</title>
		<link>http://phpslacker.com/2010/06/12/compiling-ejabberd-for-ubuntu-lucid-server/</link>
		<comments>http://phpslacker.com/2010/06/12/compiling-ejabberd-for-ubuntu-lucid-server/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 18:54:59 +0000</pubDate>
		<dc:creator>phpslacker</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ejabberd]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://phpslacker.com/?p=266</guid>
		<description><![CDATA[But there&#8217;s an apt package Yes. But it kind of sucks. I had problems with the bundled init.d script. It tries to start ejabberd as the user &#8220;ejabberd&#8221; but something goes awry. It seems to start but I&#8217;m then unable to connect to that node using the ejabberdctl command. Maybe its just me? meh. What [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpslacker.com&amp;blog=4392513&amp;post=266&amp;subd=stickytape&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>But there&#8217;s an <a href="http://packages.ubuntu.com/lucid/ejabberd">apt package</a></h2>
<p>
Yes. But it kind of sucks. I had problems with the bundled init.d script. It tries to start <a href="http://www.ejabberd.im/">ejabberd</a> as the user &#8220;ejabberd&#8221; but something goes awry. It seems to start but I&#8217;m then unable to connect to that node using the ejabberdctl command. Maybe its just me? meh.
</p>
<h2>What about the <a href="http://www.process-one.net/en/ejabberd/downloads">Process One binary installer</a>?</h2>
<p>
That works if you&#8217;re content with running ejabberd under root user or whatever user you installed ejabberd as. If installed as a user other than root you&#8217;ll have a problem trying to start ejabberd with any user other than root. Thats because the .erlang-cookie file is expected in the $HOME directory of the user starting ejabberd. Its a file permissions nightmare. bleh.
</p>
<h2>Running ejabberd under a safe(r) user account</h2>
<h3>Install dependencies</h3>
<p>
Lets use apt to install the dependencies for ejabberd. Its just a shortcut to getting the dependencies. You can do it the hard way. If you want<br />
<code><br />
apt-get build-dep ejabberd<br />
</code>
</p>
<h3>Download ejabberd source</h3>
<p>
We&#8217;ll get the source for ejabberd 2.1.3 the lazy way too. You could of course clone the git repo and checkout version 2.1.3 but a clone can take a while over a slow-w-w-w connection.<br />
<code><br />
wget http://github.com/processone/ejabberd/tarball/v2.1.3 &amp;&amp; tar -xzf processone-ejabberd-v2.1.3-0-g962b66b.tar.gz &amp;&amp; cd processone-ejabberd-84987d6/src<br />
</code></p>
<h3>Creating a user to run ejabberd</h3>
<p>This is important. We&#8217;ll need it for the ./configure command coming later</p>
<p><code><br />
sudo groupadd --gid 107 ejabberd<br />
sudo adduser --system --no-create-home --uid 107 --gid 107 --disabled-password --disabled-login ejabberd<br />
</code>
</p>
<p><strong>Note:</strong> I&#8217;ve used the same <em>uid</em> and <em>gid</em> in the line above. <em>uid</em> 107 may already be in use on your system. You can check for <em>uid</em>&#8216;s already in use by grep&#8217;ing your /etc/passwd. Ensure the numeric value for <em>uid</em> and <em>gid</em> is the same as shown above. I&#8217;m not so sure the next step will work as intended if its not.</p>
<h3>Configure (with something special), make, make install</h3>
<p>Here&#8217;s the part that really matters<br />
<code><br />
cd /path-to-untarred-ejabberd/src<br />
sudo ./configure --prefix /usr/local/ejabberd-2.1.3/ --enable-user=ejabberd --enable-odbc --enable-full-xml<br />
sudo make<br />
sudo make install<br />
</code></p>
<p>There are two other options available for the ./configure script. Check this out. You may want MSSQL Server support or whatever. The only must-have for the purpose of this install method is the <em>&#8211;enable-user</em> option. The rest can be changed to your liking</p>
<p>
The <em>&#8211;enable-user</em> option allows ejabberd to be started by root and/or the user account specified. Permissions will be set accordingly by the install process
</p>
<h3>A sane init.d script</h3>
<p>
ejabberd is now installed but you&#8217;d like it to automatically be started on system startup? You&#8217;ll need an init.d script for that and I have one for you.
</p>
<p>
I mauled the init.d script shipped with <a href="http://www.process-one.net/en/">Process One</a>&#8216;s binary installer to my liking. <a href="http://gist.github.com/435964">Download revised init.d script from github</a>. Place it in your /etc/init.d/ folder naturally. It works. Trust me already
</p>
<h3>Make ejabberdctl executable from anywhere</h3>
<p>
This is a lazy hack you could do it &#8220;right&#8221; by modifying your $PATH env variable in /etc/profile for all users or whatever<br />
<code><br />
sudo ln -s /usr/local/ejabberd-2.1.3/sbin/ejabberdctl /usr/sbin/ejabberdctl<br />
</code>
</p>
<h3>Starting/stopping ejabberd</h3>
<p>
The ejabberd process will automagically be daemonized erlang-style and the ownership of the ejabberd process is handed over to the ejabberd user we created earlier<br />
<code><br />
root@blahblah:~# /etc/init.d/ejabberd start<br />
Starting ejabberd...<br />
done.</p>
<p>ps aux | grep ejabberd<br />
ejabberd 21200  0.0 19.5 207044 49004 ?        Sl   18:07   0:01 /usr/lib/erlang/erts-5.7.4/bin/beam.smp -K true -P 250000 -- -root /usr/lib/erlang -progname erl -- -home /usr/local/ejabberd-2.1.3/var/lib/ejabberd -- -sname ejabberd@localhost -noshell -noinput -noshell -noinput -pa /usr/local/ejabberd-2.1.3/lib/ejabberd/ebin -mnesia dir "/usr/local/ejabberd-2.1.3/var/lib/ejabberd" -s ejabberd -sasl sasl_error_logger {file,"/usr/local/ejabberd-2.1.3/var/log/ejabberd/erlang.log"} -smp auto start<br />
root     21257  0.0  0.2   6152   660 pts/5    S+   18:37   0:00 grep --color=auto ejabberd<br />
</code>
</p>
<p>Confirmation that the ejabberd node has been started<br />
<code><br />
root@blahblah:~# ejabberdctl status<br />
The node ejabberd@localhost is started with status: started<br />
ejabberd 2.1.3 is running in that node<br />
</code>
</p>
<p>And that is all. You could do the same for ejabberd 2.1.4 (I reckon). I didn&#8217;t install 2.1.4 because its a little too bleeding edge but you decide for yourself</p>
<br /> Tagged: <a href='http://phpslacker.com/tag/ejabberd/'>ejabberd</a>, <a href='http://phpslacker.com/tag/ubuntu/'>ubuntu</a>, <a href='http://phpslacker.com/tag/xmpp/'>xmpp</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stickytape.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stickytape.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stickytape.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stickytape.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stickytape.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stickytape.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stickytape.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stickytape.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stickytape.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stickytape.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stickytape.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stickytape.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stickytape.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stickytape.wordpress.com/266/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpslacker.com&amp;blog=4392513&amp;post=266&amp;subd=stickytape&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpslacker.com/2010/06/12/compiling-ejabberd-for-ubuntu-lucid-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3192d5f19ae8e0c31333c056f613de6b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">phpslacker</media:title>
		</media:content>
	</item>
		<item>
		<title>VirtualBox&#8217;ing Ubuntu Linux</title>
		<link>http://phpslacker.com/2009/02/09/virtualboxing-ubuntu-linux/</link>
		<comments>http://phpslacker.com/2009/02/09/virtualboxing-ubuntu-linux/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 20:24:26 +0000</pubDate>
		<dc:creator>phpslacker</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://phpslacker.com/?p=147</guid>
		<description><![CDATA[If you&#8217;re expecting a long hack about how to get it working sorry you won&#8217;t find it here. Ubuntu just works in VirtualBox except for one not so obvious error message on first boot. I couldn&#8217;t get a screenshot for some reason but the error message you will get on first boot of any ubuntu [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpslacker.com&amp;blog=4392513&amp;post=147&amp;subd=stickytape&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
If you&#8217;re expecting a long hack about how to get it working sorry you won&#8217;t find it here. <a href="http://www.ubuntu.com/" rel="nofollow">Ubuntu</a> just works in <a href="http://www.virtualbox.org/" rel="nofollow">VirtualBox</a> except for one not so obvious error message on first boot.</p>
<p>I couldn&#8217;t get a screenshot for some reason but the error message you will get on first boot of any ubuntu distro (desktop or server) in VirtualBox is:
</p>
<p><code><br />
Starting up ...<br />
This kernel requires the following features not present on the CPU:<br />
0:6<br />
Unable o boot - please use a kernel appropriate for your CPU.<br />
</code></p>
<p>Huh? Yeah me too. I&#8217;ve encountered this issue before I just forgot the fix so I had to google it (again). The fix is:</p>
<ol>
<li>Power-off or shutdown the running virtual machine instance</li>
<li>Select the &#8220;Settings&#8221; menu option from the context-menu on your VM instance (mine is called hardy lts in the screenshot)</li>
<li>Then from the General tab pane select &#8220;Advanced&#8221; tab pane</li>
<li>Enable PAE/NX</li>
</ol>
<p>
<a href="http://stickytape.files.wordpress.com/2009/02/picture-1.png" title="VirtualBox fixer upper"><img src="http://stickytape.files.wordpress.com/2009/02/picture-1.png?w=300&#038;h=187" alt="VirtualBox fixer upper" title="VirtualBox fixer upper" width="300" height="187" class="alignnone size-medium wp-image-149" /></a></p>
<p>That&#8217;s it! You now have a useable ubuntu virtual machine running in OS X. yay. <a href="https://help.ubuntu.com/community/VirtualBox#Known%20Issues%20and%20Gotchas" rel="nofollow">This is listed as a &#8220;Known Issue&#8221;</a> on the ubuntu wiki</p>
<p>Disclaimer: Steps may vary on your guest OS. eg. it might require 50+ clicks and a cold boot when using winblows <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  </p>
<br /> Tagged: linux, ubuntu, virtualbox <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stickytape.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stickytape.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stickytape.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stickytape.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stickytape.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stickytape.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stickytape.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stickytape.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stickytape.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stickytape.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stickytape.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stickytape.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stickytape.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stickytape.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpslacker.com&amp;blog=4392513&amp;post=147&amp;subd=stickytape&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpslacker.com/2009/02/09/virtualboxing-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3192d5f19ae8e0c31333c056f613de6b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">phpslacker</media:title>
		</media:content>

		<media:content url="http://stickytape.files.wordpress.com/2009/02/picture-1.png?w=300" medium="image">
			<media:title type="html">VirtualBox fixer upper</media:title>
		</media:content>
	</item>
	</channel>
</rss>