<?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>Server Cobra</title>
	<atom:link href="http://www.servercobra.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.servercobra.com</link>
	<description>Ubuntu, Servers, Python, and Django</description>
	<lastBuildDate>Thu, 16 Feb 2012 17:24:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>FreeNAS to Ubuntu: Torrent Server (Transmission)</title>
		<link>http://www.servercobra.com/freenas-to-ubuntu-torrent-server-transmission/</link>
		<comments>http://www.servercobra.com/freenas-to-ubuntu-torrent-server-transmission/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 19:27:46 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[FreeNAS to Ubuntu]]></category>
		<category><![CDATA[Torrent]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=748</guid>
		<description><![CDATA[If you're coming from FreeNAS 7 to Ubuntu, you remember the very handy torrent server that was built in. Well we can exactly replicate that with Transmission's and its WebGUI. A torrent server provides you a great way to download torrents directly to your server. It also allows you to constantly seed torrents, even when [...]]]></description>
			<content:encoded><![CDATA[<p>If you're coming from FreeNAS 7 to Ubuntu, you remember the very handy torrent server that was built in. Well we can exactly replicate that with Transmission's and its WebGUI. A torrent server provides you a great way to download torrents directly to your server. It also allows you to constantly seed torrents, even when your main computers are off. I use this to host copies of OS's (such as Ubuntu!) so other people can download them faster.<span id="more-748"></span></p>
<p><strong>Note: </strong>This is an article in the series <a title="FreeNAS to Ubuntu" href="http://www.servercobra.com/tag/freenas-to-ubuntu/">FreeNAS to Ubuntu</a>. Check out the article for the <a title="Replacing FreeNAS with Ubuntu File Server" href="http://www.servercobra.com/replacing-freenas-with-ubuntu-file-server/">initial Ubuntu fileserver setup coming from FreeNAS</a>.</p>
<p>First we need to install Transmission.</p>
<pre class="brush: bash; title: ; notranslate">
sudo apt-get install -y transmission-daemon
</pre>
<p>Transmission's settings are saved in a JSON file. We'll edit that to update the settings appropriately. We're going to enable the remote interface, allow all computers connect to it, change the password (which will be encrypted when we reload the settings), and change the download-dir and incomplete-dir. First, let's stop transmission. For some reason, it occasionally overwrites the settings when restarting. </p>
<pre class="brush: bash; title: ; notranslate">
sudo service transmission-daemon stop
sudo nano /var/lib/transmission-daemon/info/settings.json
----
# Change:
# &quot;rpc-enabled&quot;: false,
&quot;rpc-enabled&quot;: true,

# &quot;rpc-password&quot;: &quot;$kljfkljwerjwauiouak438908&quot;,
&quot;rpc-password&quot;: &quot;plaintext-new-password&quot;,

# &quot;rpc-whitelist-enabled&quot;: true,
&quot;rpc-whitelist-enabled&quot;: false,

# &quot;download-dir&quot;: &quot;&quot;,
&quot;download-dir&quot;: &quot;/mnt/storage/Torrents/&quot;,
# &quot;incomplete-dir-enabled&quot;: false,
&quot;incomplete-dir-enabled&quot;: true,
# &quot;incomplete-dir&quot;: &quot;&quot;,
&quot;incomplete-dir&quot;: &quot;/mnt/storage/Torrents/incomplete&quot;,
</pre>
<p>Now we need to create the appropriate directories, and give them proper permissions. We are going to own the directory to the Transmission user and group (debian-transmission), give that user:group full permissions, and then give read permissions to the world (the rest of the users). You could alternately add yourself to the to the debian-transmission group, so that you have write and execute permissions, but for this tutorial, we're going to share it out via Samba, so read is all we'll need. </p>
<pre class="brush: bash; title: ; notranslate">
mkdir -p /mnt/storage/Torrents/incomplete/

chown -R debian-transmission:debian-transmission /mnt/storage/Torrents/
chmod -R 774 /mnt/storage/Torrents/
</pre>
<p>Now that everything is ready, we need to restart the server to encrypt the password and reload the settings.</p>
<pre class="brush: bash; title: ; notranslate">
sudo service transmission-daemon start
</pre>
<p>Now you should be able to connect to your server by visiting "hostname:9091". You can set up port forwarding on your router so you can connect when you're away from home, by forwarding a port to your server's IP and port 9091. This port can be changed in the transmission config file. The setting is called ""rpc-port": 9091,". </p>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/freenas-to-ubuntu-torrent-server-transmission/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Bash Alias for Python/Virtualenv</title>
		<link>http://www.servercobra.com/bash-alias-for-pythonvirtualenv/</link>
		<comments>http://www.servercobra.com/bash-alias-for-pythonvirtualenv/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 19:10:18 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Script Tips]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=738</guid>
		<description><![CDATA[If you are writing Python apps, you should definitely be using virtualenv. It creates an isolated virtual environment (hence the name), where you can install Python apps without affecting the rest of the apps on your machine. For example, if I have a website that relies on Django 1.2, and other sites that rely on [...]]]></description>
			<content:encoded><![CDATA[<p>If you are writing Python apps, you should definitely be using virtualenv. It creates an isolated virtual environment (hence the name), where you can install Python apps without affecting the rest of the apps on your machine. For example, if I have a website that relies on Django 1.2, and other sites that rely on Django 1.3, I can put them in virtualenvs and just install the correct package versions in each. This can also be applied to running different Python versions per project as well, such as 2.5 for one and 3.0 in another. Yet another great use of virtualenvs is testing your code in multiple version of Python.<span id="more-738"></span></p>
<p>Sold yet? Good! The only thing I find tedious about virtualenvs is constantly typing long commands to activate a virtualenv. The common command is:</p>
<pre class="brush: bash; title: ; notranslate">
source ~/programming/project/bin/activate
</pre>
<p>That's more than I want to type each time. So let's make it an alias! Simply replace PROJECT with the name of your project. Note: This assumes you place all your projects in your home directory under a directory called "programming". Modify that to meet your needs.</p>
<pre class="brush: bash; title: ; notranslate">
echo 'alias PROJECT=&quot;source $HOME/programming/PROJECT/bin/activate&quot; ' &gt;&gt; ~/.bash_aliases

# Or if you want to also move to the directory:
echo 'alias PROJECT=&quot;source ~/programming/PROJECT/bin/activate; cd ~/programming/PROJECT&quot; ' &gt;&gt; ~/.bash_aliases

bash
</pre>
<p>Well that's pretty cool. Now you just type whatever your project name is, and the alias will activate the virtualenv so you can get to work. If you use the second option, it will also move you into the project directory. What if you have 30+ Python projects, like me? Do you really want to write an alias for each one, and create a new one each time you make a new project? I don't, so I'll write a simple function to take care of it. Put this in your ~/.bash_aliases (or the bottom of ~/.bashrc if you really want).</p>
<pre class="brush: bash; title: ; notranslate">
# Python virtualenv
SRC_DIRECTORY=&quot;$HOME/programming&quot;
venv () {
        source $SRC_DIRECTORY/$1/bin/activate;
        cd $SRC_DIRECTORY/$1;

# Then run &quot;bash&quot; again to reload the file, and you're done!
}
</pre>
<p>To run it, simply type "venv PROJECT" into bash. It will activate the environment and move you to the project directory. You can change SRC_DIRECTORY to whatever you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/bash-alias-for-pythonvirtualenv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minecraft 1.0 Ubuntu Installation</title>
		<link>http://www.servercobra.com/minecraft-1-0-ubuntu-installation/</link>
		<comments>http://www.servercobra.com/minecraft-1-0-ubuntu-installation/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 23:50:01 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Minecraft]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=719</guid>
		<description><![CDATA[The full version of Minecraft 1.0.0 was finally released today! You can just updated your client, or install from scratch here. Client Server Ubuntu Client Installation: If you don't already have Minecraft installed, check this Minecraft Installation tutorial. And for the Ubuntu-based server installation:]]></description>
			<content:encoded><![CDATA[<p>The full version of Minecraft 1.0.0 was finally released today! You can just updated your client, or install from scratch here. <span id="more-719"></span></p>
<ul>
<li><a href="https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar">Client</a></li>
<li><a href="https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar">Server</a></li>
</ul>
<p>Ubuntu Client Installation:</p>
<p>If you don't already have Minecraft installed, check this <a title="Installing Minecraft On Ubuntu" href="http://www.servercobra.com/installing-minecraft-on-ubuntu/">Minecraft Installation tutorial</a>.</p>
<pre class="brush: bash; title: ; notranslate">
# Backup your old client, just in case
mv ~/.minecraft/bin/minecraft.jar ~/.minecraft/bin/minecraft.jar.bak
# Download the new one
cd ~/.minecraft/bin; wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar
# And play like normal!
minecraft
# If you didn't alias this:
java -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame
</pre>
<p>And for the Ubuntu-based server installation:</p>
<pre class="brush: bash; title: ; notranslate">
# Stop the server
stopmc
# Or if you haven't followed my tutorials, get to your console (tmux or screen) and type &quot;stop&quot;.
# Backups are important!
mv ~/minecraft/minecraft_server.jar ~/minecraft/minecraft_server.jar.bak
# Get the new one
cd ~/minecraft; wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar
# Start minecraft again!
startmc
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/minecraft-1-0-ubuntu-installation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Minecraft 1.9 Release Candidate 2 Ubuntu Installation</title>
		<link>http://www.servercobra.com/minecraft-1-9-release-candidate-2-ubuntu-installation/</link>
		<comments>http://www.servercobra.com/minecraft-1-9-release-candidate-2-ubuntu-installation/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 23:58:24 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Minecraft]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=709</guid>
		<description><![CDATA[Jeb tweeted the links to the Release Candidate 2 client and server today. If you missed them, here they are: Client Server Ubuntu Client Installation: And for the Ubuntu-based server installation:]]></description>
			<content:encoded><![CDATA[<p>Jeb tweeted the links to the Release Candidate 2 client and server today. If you missed them, here they are:<span id="more-709"></span></p>
<ul>
<li><a href="http://assets.minecraft.net/rc2/minecraft.jar">Client</a></li>
<li><a href="http://assets.minecraft.net/rc2/minecraft.jar">Server</a></li>
</ul>
<p>Ubuntu Client Installation:</p>
<pre class="brush: bash; title: ; notranslate">
# Backup your old client, just in case
mv ~/.minecraft/bin/minecraft.jar ~/.minecraft/bin/minecraft.jar.bak
# Download the new one
cd ~/.minecraft/bin; wget http://assets.minecraft.net/rc2/minecraft.jar
# And play like normal!
minecraft
# If you didn't alias this:
java -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame
</pre>
<p>And for the Ubuntu-based server installation:</p>
<pre class="brush: bash; title: ; notranslate">
# Stop the server
stopmc
# Or if you haven't followed my tutorials, get to your console (tmux or screen) and type &quot;stop&quot;.
# Backups are important!
mv ~/minecraft/minecraft_server.jar ~/minecraft/minecraft_server.jar.bak
# Get the new one
cd ~/minecraft; http://assets.minecraft.net/rc2/minecraft_server.jar
# Start minecraft again!
startmc
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/minecraft-1-9-release-candidate-2-ubuntu-installation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Minecraft 1.9 Prerelease 6 Ubuntu Installation</title>
		<link>http://www.servercobra.com/minecraft-1-9-prerelease-6-ubuntu-installation/</link>
		<comments>http://www.servercobra.com/minecraft-1-9-prerelease-6-ubuntu-installation/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 19:51:00 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Minecraft]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=705</guid>
		<description><![CDATA[Jeb tweeted the links to the 1.9.6 client and server today. The release candidate should be out Sunday, so find those bugs! If you missed them, here they are: Client Server Note: This is outdated. For the updated client, check this page. Ubuntu Client Installation: And for the Ubuntu-based server installation:]]></description>
			<content:encoded><![CDATA[<p>Jeb tweeted the links to the 1.9.6 client and server today. The release candidate should be out Sunday, so find those bugs! If you missed them, here they are:<span id="more-705"></span></p>
<ul>
<li><a href="http://assets.minecraft.net/1_9-pre6/minecraft.jar">Client</a></li>
<li><a title="http://assets.minecraft.net/1_9-pre6/minecraft_server.jar" href="http://assets.minecraft.net/1_9-pre6/minecraft.jar">Server</a></li>
</ul>
<p><strong>Note:</strong> This is outdated. <a href="http://www.servercobra.com/minecraft-1-9-release-candidate-2-ubuntu-installation/">For the updated client, check this page. </a><br />
Ubuntu Client Installation:</p>
<pre class="brush: bash; title: ; notranslate">
# Backup your old client, just in case
mv ~/.minecraft/bin/minecraft.jar ~/.minecraft/bin/minecraft.jar.bak
# Download the new one
cd ~/.minecraft/bin; wget http://assets.minecraft.net/1_9-pre6/minecraft.jar
# And play like normal!
minecraft
# If you didn't alias this:
java -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame
</pre>
<p>And for the Ubuntu-based server installation:</p>
<pre class="brush: bash; title: ; notranslate">
# Stop the server
stopmc
# Or if you haven't followed my tutorials, get to your console (tmux or screen) and type &quot;stop&quot;.
# Backups are important!
mv ~/minecraft/minecraft_server.jar ~/minecraft/minecraft_server.jar.bak
# Get the new one
cd ~/minecraft; http://assets.minecraft.net/1_9-pre6/minecraft-server.jar
# Start minecraft again!
startmc
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/minecraft-1-9-prerelease-6-ubuntu-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dive Into Python Mirror</title>
		<link>http://www.servercobra.com/dive-into-python-mirror/</link>
		<comments>http://www.servercobra.com/dive-into-python-mirror/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 17:54:51 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=690</guid>
		<description><![CDATA[Recently, DiveIntoPython.org was taken down. It is was a site/book written by Mark Pilgrim to help you learn Python. It is how I taught myself Python, and still a very valuable resource that I go back to time and time again. Unfortunately, Mark has taken down all of his sites on the Internet, with no [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, DiveIntoPython.org was taken down. It is was a site/book written by Mark Pilgrim to help you learn Python. It is how I taught myself Python, and still a very valuable resource that I go back to time and time again. Unfortunately, Mark has taken down all of his sites on the Internet, with no notice/explanation.  Luckily, he has provided all of his sites under open licenses, allowing and encouraging people to mirror them. I bought <a title="Dive Into Python" href="http://diveIntoPython">DiveIntoPython.net</a>, and found an old copy of his site, and put it up. Unfortunately, it is not complete: it is still missing some of the downloads and all of the translations. If you have copies of the files or the translations, please leave a comment or <a href="mailto:josh@servercobra.com">email me</a>. </p>
<p>Likewise, I have also mirrored DiveIntoPython3 at <a title="Dive Into Python 3" href="http://DiveIntoPython3.net">DiveIntoPython3.net</a> and DiveIntoHTML5 at <a title="Dive Into HTML 5" href="http://DiveIntoHTML5.net">DiveIntoHTML5.net</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/dive-into-python-mirror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Minecraft On Ubuntu</title>
		<link>http://www.servercobra.com/installing-minecraft-on-ubuntu/</link>
		<comments>http://www.servercobra.com/installing-minecraft-on-ubuntu/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 18:51:02 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Minecraft]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=676</guid>
		<description><![CDATA[Minecraft has become one of the most popular games among geeks. Unlike many games, it runs fantastically (actually better in my case) than on Windows! However, the installation process is a bit more involved. This guide will help you get it installed and running smoothly. Ubuntu Versions: Tested on 10.04 through 11.10, 32 and 64 [...]]]></description>
			<content:encoded><![CDATA[<p>Minecraft has become one of the most popular games among geeks. Unlike many games, it runs fantastically (actually better in my case) than on Windows! However, the installation process is a bit more involved. This guide will help you get it installed and running smoothly.<span id="more-676"></span></p>
<p><strong>Ubuntu Versions: </strong>Tested on 10.04 through 11.10, 32 and 64 bit.</p>
<p><strong>Installation:</strong> Installation of Minecraft is surprisingly easy. First, we need to get the official version of Java from Oracle, then we download a Java .jar file, and run it!</p>
<p>Ubuntu comes with the OpenJDK, which doesn't work well with Minecraft. Let's download the official version, and set that as the default for Java.</p>
<pre class="brush: bash; title: ; notranslate">
# Run updates
sudo apt-get -y -q update &amp;&amp; sudo apt-get -y -q upgrade
# Get some software so we can add the repository with Java in it, then update again
sudo apt-get install python-software-properties
sudo apt-get -y -q update
# Add the repository with Java in it, then update to get a list of packages
sudo add-apt-repository &quot;deb http://archive.canonical.com/ lucid partner&quot;
sudo apt-get -y -q update
# Finally, install Java!
sudo apt-get -y install sun-java6-jre sun-java6-plugin
sudo update-alternatives --config java
# Select 2 here. It should be something like &quot;/usr/lib/jvm/java-6-sun/jre/bin/java&quot;
</pre>
<p>Now that we have Java installed, we can get the client. You can either go to Minecraft.net and download it, or you can just download it from the command line. We've already got the command line open, so let's use that. We're going to put it in the games folder so other users can easily access Minecraft also.</p>
<pre class="brush: bash; title: ; notranslate">
sudo mkdir /usr/local/games/minecraft
sudo wget -O /usr/local/games/minecraft/minecraft.jar https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar
# Make it executable, for good measure
chmod 755 /usr/local/games/minecraft/minecraft.jar
</pre>
<p>Now that we have the game files downloaded and in place, we need to run it to finish the install by simply starting the game! We're going to make an alias in bash to start Minecraft up. If you want to make a desktop shortcut, simply copy the part in quotations into the launcher.</p>
<pre class="brush: bash; title: ; notranslate">
nano ~/.bash_aliases

----
alias minecraft=&quot;java -Xmx1024M -Xms512M -cp /usr/local/games/minecraft/minecraft.jar net.minecraft.LauncherFrame &amp;&quot;
----

# Reload terminal for alias to take effect
bash
</pre>
<p>Now to launch the game, all you have to do is type:</p>
<pre class="brush: bash; title: ; notranslate">
minecraft
</pre>
<p>Log in with your account and it will download the rest of the files and place them in ~/.minecraft.</p>
<p>One common problem people have with playing Minecraft on Ubuntu is the infamous stuck-key problem. Basically, you'll be going in one direction, hold down a key, and when you release the key, you'll keep going. This is a serious problem if you're headed towards a pool of lava and the game keeps you moving forward to your pixely and block-filled doom, or building a tall structure, only to be fall off and have your blocky items explode all over the ground. To fix this, we just need to update a few files. There is a handy script to do this for you.</p>
<p>Note: only use this after running Minecraft once (so it installs all the required files).</p>
<pre class="brush: bash; title: ; notranslate">
cd /tmp
wget -O lwjgl.tar.gz https://files.dafrito.com/upgrade-lwjgl.tar.gz
tar xvf lwjgl.tar.gz
sudo ./upgrade-lwjgl.sh
</pre>
<p>Have fun playing Minecraft!!</p>
<p>If you want to install a Minecraft server so you can play with your friends, check the <a title="Minecraft Server on Ubuntu" href="http://www.servercobra.com/minecraft-server-on-ubuntu/">Minecraft Server On Ubuntu</a> article. If you'd like to play a pre-release version of Minecraft, which has all the latest updates and additions but a few more bugs, check the <a title="Minecraft 1.0 Ubuntu Installation" href="http://www.servercobra.com/minecraft-1-0-ubuntu-installation/">Minecraft 1.0 Ubuntu Installation</a> article.</p>
<p>If anything didn't work for you, please leave a comment and I'll try and help you! If it did work, I always appreciate a quick "It worked!" comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/installing-minecraft-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>FreeNAS to Ubuntu: Initial Fileserver Setup with ZFS</title>
		<link>http://www.servercobra.com/freenas-to-ubuntu-initial-fileserver-setup-with-zfs/</link>
		<comments>http://www.servercobra.com/freenas-to-ubuntu-initial-fileserver-setup-with-zfs/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 18:03:43 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[FreeNAS to Ubuntu]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=625</guid>
		<description><![CDATA[Background: I have always loved FreeNAS. It was one of the first servers I ever set up, back in the day in my parent's basement. It was running on a Pentium 3, 933MHz, 256MB of RAM, and about 500GB of storage space. Eventually, it got upgraded to a real piece of server hardware, more drives, etc. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Background: </strong>I have always loved FreeNAS. It was one of the first servers I ever set up, back in the day in my parent's basement. It was running on a Pentium 3, 933MHz, 256MB of RAM, and about 500GB of storage space. Eventually, it got upgraded to a real piece of server hardware, more drives, etc. When they announced the buyout by iX Systems and the upgrade to version 8 with a complete rewrite, I was skeptical. I've tried their new software, and I wasn't overly impressed. I've been having various issues on v7 as well, mostly related to ZFS and random crashes. v8 is much more enterprise oriented, and dropped the fun bits for home servers, such as torrent server and UPnP, for media streaming. I bought 4 new 2TB drives and an external enclosure, and tried to reinstall FreeNAS to start fresh. No such luck, and after a few hours of crashes on start, I gave up and decided, it's time to go with Ubuntu, like the rest of my house, with ZFS of course.<span id="more-625"></span></p>
<p><strong>Goals: </strong>To replace FreeNAS, there are a few pieces of software that absolutely have to work. Mainly, they'd be Samba for Windows sharing, NFS for ESXi and Linux sharing, ZFS for the storage pool (file system and redundancy), a web server to stream/download files in the pools, and preferably some type of web administration software. Nice things would be UPnP that actually works with my Xbox (FreeNAS never did), and on the fly encoding (maybe DivX?) to stream my HD movies over the Internet when I'm not at home. We'll get a basic version up in this tutorial, and then the more advanced stuff in the next one.</p>
<p><strong>Installation: </strong>Install Ubuntu server like normal. Since this is my main file server, I'm going with Ubuntu 10.04. I don't feel like upgrading this every 18 months when support runs out. Since 10.04 is a LTS (Long Term Service) release, it will be supported until April 2015. You'll also want the 64 bit edition, because ZFS on Linux is better supported by 64 bit. Install like normal. I'm using one drive as the OS disk, and the rest will go into zpools. The only thing to make sure you do is to install OpenSSH server when it asks which server software to install.</p>
<p><strong>Configuration:</strong> First off, let's update the server.</p>
<pre class="brush: bash; title: ; notranslate">
sudo apt-get -y -q update &amp;&amp; sudo apt-get -y -q upgrade
</pre>
<p>Next, let's get ZFS installed, since most everything else relies on it. There is a project called ZFS on Linux, which provides a port of the ZFS kernel module for Linux. It can't be included directly in the Linux kernel because of incompatible licenses, but we can put it in ourselves. Versions below 0.60 won't let you mount the ZFS pools (serious problem right?). <del datetime="2012-02-16T17:09:47+00:00">So we will install the 0.60rc6 straight from the git repo where it is being actively developed. Hold onto your seat! We're going to be compiling directly from source.</del> As rj in the comments pointed out, there is now a PPA with ZFS on Ubuntu, so we'll use that method. You can still get the newest code straight from the repo and compile if you are having problems.</p>
<pre class="brush: bash; title: ; notranslate">
sudo apt-get -y install build-essential gawk zlib1g-dev uuid-dev vim-nox python-software-properties
sudo add-apt-repository ppa:zfs-native/stable
sudo apt-get update
sudo apt-get install ubuntu-zfs

# Add zfs modules to be loaded at boot
sudo nano /etc/modules
---
# Add on:
spl
zavl
znvpair
zunicode
zcommon
zfs
---

# Incorporate new modules into the boot files
sudo update-initramfs -u

# Make init script to mount all the ZPools on boot (isn't fully working on one of my machines)
wget -O zfs-init.tar http://osdir.com/ml/attachments/tarUdnnwPCuOh.tar
tar xvf zfs-init.tar
sudo cp zfs-init/etc/default/zfs /etc/default/zfs
sudo cp zfs-init/etc/init/* /etc/init/
</pre>
<p>Now that we have ZFS installed, we either need to mount existing pools, or create new pools. ZFS allows you to create pools with redundancy such as mirroring, or RAIDZ(x), which allows x amount of drives to die without losing data. For example RAIDZ can lose on drive, RAIDZ2 can lose 2, and RAIDZ3 can lose 3.</p>
<p>Note: all ZFS and ZPool commands must be run as root/sudo</p>
<pre class="brush: bash; title: ; notranslate">
# Let's create a RAIDZ (like RAID 5) pool named storage from 3 disks
sudo zpool create storage raidz /dev/sdb /dev/sdc /dev/sdd

# Import an existing pool named storage (perhaps created on a previous FreeNAS box)
sudo zpool import storage

# And then we can create filesystems on the pool, much like folders. We already have a root folder at /mnt/storage/
sudo zfs create storage/Movies
sudo zfs create storage/Music
sudo zfs create storage/Upload

# Now your ZFS should look like this:
# /mnt/storage
#            /Movies
#            /Music
#            /Upload
</pre>
<p>Now that we have the server's pools in order, we need to provide a way to upload/download data. We will start by using SMB, which allows Windows, Linux, and Macs connect. It also allows us to provide public read-only shares, public writable shares, and password protected shares.</p>
<pre class="brush: bash; title: ; notranslate">
# Prepare sharing
sudo apt-get -y install samba nfs-kernel-server
sudo nano /etc/samba/smb.conf
---
# Change
# security = user
# to
security = user

# No password, read only share
[sharename]
comment = This is a share
path = /mnt/storage/share
browsable = yes
guest ok = yes
read only = yes
create mask = 0755

# No password, writable share
[writableshare]
comment = This is a writable share
path = /mnt/storage/writable
guest ok = yes
writeable = True
create mask = 0744

# Password protected share
[passwordsharename]
comment = This share requires a password
path = /mnt/storage/secret
browsable = yes
guest ok = no
read only = yes
create mask = 0755
user = username otheruser

# To allow users to connect to password protected shares, run smbpasswd to generate the login password
sudo  smbpasswd -a username
sudo smbpasswd  -a otheruser
</pre>
<p>In my case, this worked without restarting Samba, however it might be a good idea anyway.</p>
<pre class="brush: bash; title: ; notranslate">
sudo reload smbd
</pre>
<p>You should now be able to connect to the server by going to "smb://serverip" in Nautilus or "\\serverip" in Windows Explorer. Add as many shares as you need.</p>
<p>This gives you a very basic file server. If you want to get a torrent server similar to the FreeNAS one, you can check out the <a title="FreeNAS to Ubuntu: Torrent Server (Transmission)" href="http://www.servercobra.com/freenas-to-ubuntu-torrent-server-transmission/">Ubuntu Torrent Server</a> article.</p>
<p>In my next articles, I will explore using NFS to share data to Linux clients, a torrent server, UPnP for streaming to XBox 360/PS3, and a web server to share files over the Internet (hopefully with on the fly encoding), and maybe those sweet beeps that FreeNAS makes on startup/shutdown.</p>
<p>If anything in the tutorial doesn't work for you, make sure to leave a comment and I'll try to fix it! "It worked!" comments are also appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/freenas-to-ubuntu-initial-fileserver-setup-with-zfs/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Minecraft 1.9 Prerelease 5 Ubuntu Installation</title>
		<link>http://www.servercobra.com/minecraft-1-9-prerelease-5-ubuntu-installation/</link>
		<comments>http://www.servercobra.com/minecraft-1-9-prerelease-5-ubuntu-installation/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 19:52:50 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Minecraft]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=654</guid>
		<description><![CDATA[Jeb tweeted the links to the 1.9.5 client and server today. If you missed them, here they are: Client Server Note: This is outdated. For the updated client, check this page. Ubuntu Client Installation: And for the Ubuntu-based server installation:]]></description>
			<content:encoded><![CDATA[<p>Jeb tweeted the links to the 1.9.5 client and server today. If you missed them, here they are:<span id="more-654"></span></p>
<ul>
<li><a href="http://assets.minecraft.net/1_9-pre5/minecraft.jar">Client</a></li>
<li><a title="http://assets.minecraft.net/1_9-pre5/minecraft_server.jar" href="http://assets.minecraft.net/1_9-pre5/minecraft.jar">Server</a></li>
</ul>
<p><strong>Note:</strong> This is outdated. <a href="http://www.servercobra.com/minecraft-1-9-release-candidate-2-ubuntu-installation/">For the updated client, check this page. </a></p>
<p>Ubuntu Client Installation:</p>
<pre class="brush: bash; title: ; notranslate">
# Backup your old client, just in case
mv ~/.minecraft/bin/minecraft.jar ~/.minecraft/bin/minecraft.jar.bak
# Download the new one
cd ~/.minecraft/bin; wget http://assets.minecraft.net/1_9-pre5/minecraft.jar
# And play like normal!
minecraft
# If you didn't alias this:
java -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame
</pre>
<p>And for the Ubuntu-based server installation:</p>
<pre class="brush: bash; title: ; notranslate">
# Stop the server
stopmc
# Or if you haven't followed my tutorials, get to your console (tmux or screen) and type &quot;stop&quot;.
# Backups are important!
mv ~/minecraft/minecraft_server.jar ~/minecraft/minecraft_server.jar.bak
# Get the new one
cd ~/minecraft; http://assets.minecraft.net/1_9-pre5/minecraft-server.jar
# Start minecraft again!
startmc
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/minecraft-1-9-prerelease-5-ubuntu-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minecraft 1.9 Prerelease 4 Ubuntu Installation</title>
		<link>http://www.servercobra.com/minecraft-1-9-prerelease-4-ubuntu-installation/</link>
		<comments>http://www.servercobra.com/minecraft-1-9-prerelease-4-ubuntu-installation/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 19:58:32 +0000</pubDate>
		<dc:creator>Josh Gachnang</dc:creator>
				<category><![CDATA[Minecraft]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.servercobra.com/?p=642</guid>
		<description><![CDATA[Jeb tweeted the links to the 1.9.4 client and server yesterday. If you missed them, here they are: Client Server Note: This is outdated. For the updated client, check this page. Ubuntu Client Installation: And for the Ubuntu-based server installation:]]></description>
			<content:encoded><![CDATA[<p>Jeb tweeted the links to the 1.9.4 client and server yesterday. If you missed them, here they are:<span id="more-642"></span></p>
<ul>
<li><a href="http://assets.minecraft.net/1_9-pre4/minecraft.jar">Client</a></li>
<li><a title="http://assets.minecraft.net/1_9-pre4/minecraft_server.jar" href="http://assets.minecraft.net/1_9-pre4/minecraft.jar">Server</a></li>
</ul>
<p><strong>Note:</strong> This is outdated. <a href="http://www.servercobra.com/minecraft-1-9-release-candidate-2-ubuntu-installation/">For the updated client, check this page. </a></p>
<p>Ubuntu Client Installation:</p>
<pre class="brush: bash; title: ; notranslate">
# Backup your old client, just in case
mv ~/.minecraft/bin/minecraft.jar ~/.minecraft/bin/minecraft.jar.bak
# Download the new one
cd ~/.minecraft/bin; wget http://assets.minecraft.net/1_9-pre4/minecraft.jar
# And play like normal!
minecraft
# If you didn't alias this:
java -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame
</pre>
<p>And for the Ubuntu-based server installation:</p>
<pre class="brush: bash; title: ; notranslate">
# Stop the server
stopmc
# Or if you haven't followed my tutorials, get to your console (tmux or screen) and type &quot;stop&quot;.
# Backups are important!
mv ~/minecraft/minecraft_server.jar ~/minecraft/minecraft_server.jar.bak
# Get the new one
cd ~/minecraft; http://assets.minecraft.net/1_9-pre4/minecraft-server.jar
# Start minecraft again!
startmc
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.servercobra.com/minecraft-1-9-prerelease-4-ubuntu-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

