<?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>Blog::Log &#187; ubuntu</title>
	<atom:link href="http://www.stpe.se/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stpe.se</link>
	<description>Not a blog, more a log.</description>
	<lastBuildDate>Wed, 02 Jun 2010 13:01:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing GlassFish on Debian Etch or Ubuntu</title>
		<link>http://www.stpe.se/2008/07/installing-glassfish-on-debian-etch-ubunt/</link>
		<comments>http://www.stpe.se/2008/07/installing-glassfish-on-debian-etch-ubunt/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 10:56:56 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[glassfish]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stpe.se/?p=41</guid>
		<description><![CDATA[I had to install GlassFish on an Debian Etch machine and here is how I did it (the purpose of these instructions is as a reminder to myself so I know what I did in case I have to do it again). Install Java 5 First thing needed is Java 5. To be able to [...]]]></description>
			<content:encoded><![CDATA[<p>I had to install GlassFish on an Debian Etch machine and here is how I did it (the purpose of these instructions is as a reminder to myself so I know what I did in case I have to do it again).</p>
<h3>Install Java 5</h3>
<p>First thing needed is Java 5. To be able to get Java 5 and other stuff, add <code>contrib</code> and <code>non-free</code> to each repository in <code>/etc/apt/sources.list</code> .</p>
<p>It should look something like this:</p>
<pre class="brush: xml;">
deb http://security.debian.org/ etch/updates main contrib non-free

deb http://ftp.debian.org/debian etch main contrib non-free
deb-src http://ftp.debian.org/debian etch main contrib non-free
</pre>
<p>Then simply run:<br />
<code>apt-get install sun-java5-jdk</code></p>
<h3>Download GlassFish</h3>
<p>Check the <a href="https://glassfish.dev.java.net">GlassFish website</a> for the latest version and download it (URL may be different depending on version):</p>
<p><code>wget http://java.net/download/javaee5/v2ur2/promoted/Linux/glassfish-installer-v2ur2-b04-linux.jar</code></p>
<h3>Install GlassFish</h3>
<p>Install GlassFish by running:<br />
<code>java -jar -mx256M glassfish-installer-v2-b09.jar</code></p>
<p>For convenience it might be nice to move GlassFish to a version independent directory name and make symlink (will make future upgrades easier as well):</p>
<p><code>mv glassfish /opt/glassfish-v2ur2-b09<br />
ln -s /opt/glassfish-v2ur2-b09 /opt/glassfish</code></p>
<p>Now setup GlassFish:</p>
<p><code>cd /opt/glassfish<br />
/opt/glassfish/lib/ant/bin/ant -f setup.xml</code></p>
<p>If you get an permission error, make sure ANT is executable (note that this is just a standard ANT, if you already have ANT you may use that one instead):</p>
<p><code>chmod u+x /opt/glassfish/lib/ant/bin/ant</code></p>
<p>Start the application server by running:<br />
<code><br />
/opt/glassfish/bin/asadmin start-domain<br />
</code></p>
<p>Verify that you may reach http://localhost:8080 and http://localhost:4848 (replace localhost if server is somewhere else).</p>
<p>Finally it might be a good idea to change the default admin password:<br />
<code><br />
/opt/glassfish/bin/asadmin change-admin-password --user admin<br />
</code></p>
<h3>Create init script</h3>
<p>Based on the <code>/etc/init.d/skeleton</code> I created the following init-script:</p>
<pre class="brush: xml;">
#! /bin/sh
### BEGIN INIT INFO
# Provides:          glassfish
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: glassfish initscript
# Description:       Simple initscript for GlassFish App server
### END INIT INFO

# Do NOT &quot;set -e&quot;

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/opt/glassfish/bin
DESC=&quot;GlassFish Java EE5 App server&quot;
NAME=glassfish
ASADMIN=asadmin
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (&gt;= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{
        $ASADMIN start-domain \
                || return 1
}

#
# Function that stops the daemon/service
#
do_stop()
{
        $ASADMIN stop-domain \
                || return 1
}

case &quot;$1&quot; in
  start)
        [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_daemon_msg &quot;Starting $DESC&quot; &quot;$NAME&quot;
        do_start
        case &quot;$?&quot; in
                0|1) [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_end_msg 0 ;;
                2) [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_end_msg 1 ;;
        esac
        ;;
  stop)
        [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_daemon_msg &quot;Stopping $DESC&quot; &quot;$NAME&quot;
        do_stop
        case &quot;$?&quot; in
                0|1) [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_end_msg 0 ;;
                2) [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_end_msg 1 ;;
        esac
        ;;
  restart|force-reload)
        log_daemon_msg &quot;Restarting $DESC&quot; &quot;$NAME&quot;
        do_stop
        sleep 10
        case &quot;$?&quot; in
          0|1)
                do_start
                case &quot;$?&quot; in
                        0) log_end_msg 0 ;;
                        1) log_end_msg 1 ;; # Old process is still running
                        *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
          *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
  *)
        echo &quot;Usage: $SCRIPTNAME {start|stop|restart|force-reload}&quot; &gt;&amp;2
        exit 3
        ;;
esac

:
</pre>
<p>Save it as <code>glassfish</code>, then run:</p>
<p><code>cd /etc/init.d<br />
update-rc.d glassfish defaults</code></p>
<p>Set executable permission on init script with <code>chmod a+x glassfish</code> .</p>
<p>That&#8217;s it!</p>
<p>These instructions are very much based on similar posts by Jasper Kalkers <a href="http://computingwithjasper.blogspot.com/2008/01/installing-glassfish-2-on-ubuntu-710.html">Installing Glassfish 2 on ubuntu 7.10</a> and Cay Horstmann <a href="http://weblogs.java.net/blog/cayhorstmann/archive/2006/07/installing_glas.html">Installing GlassFish and PostgreSQL on Ubuntu Server Edition</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stpe.se/2008/07/installing-glassfish-on-debian-etch-ubunt/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Simple Backup on Linux and Ubuntu</title>
		<link>http://www.stpe.se/2008/07/simple-backup-on-linux-and-ubuntu/</link>
		<comments>http://www.stpe.se/2008/07/simple-backup-on-linux-and-ubuntu/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 05:18:37 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stpe.se/?p=33</guid>
		<description><![CDATA[Incremental encrypted remote backup using Amazon S3: Duplicity Incremental backup to another (remote) directory: rdiff-backup Easily available on Ubuntu using: sudo apt-get rdiff-backup Nice instructions for automating and scheduling backups. Simple backup by simply tar&#8217;ing everything, instructions on Ubuntu Forums.]]></description>
			<content:encoded><![CDATA[<p>Incremental encrypted remote backup using Amazon S3: <a href="http://www.brainonfire.net/2007/08/11/remote-encrypted-backup-duplicity-amazon-s3/">Duplicity</a></p>
<p>Incremental backup to another (remote) directory: <a href="http://www.nongnu.org/rdiff-backup/">rdiff-backup</a></p>
<p>Easily available on Ubuntu using:</p>
<blockquote><p>sudo apt-get rdiff-backup</p></blockquote>
<p><a href="http://www.ibm.com/developerworks/linux/library/l-backup/index.html">Nice instructions</a> for automating and scheduling backups.</p>
<p>Simple backup by simply tar&#8217;ing everything, instructions on <a href="http://ubuntuforums.org/showthread.php?t=35087">Ubuntu Forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stpe.se/2008/07/simple-backup-on-linux-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 8.04 LTS released</title>
		<link>http://www.stpe.se/2008/04/ubuntu-804-lts-released/</link>
		<comments>http://www.stpe.se/2008/04/ubuntu-804-lts-released/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 13:47:04 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stpe.se/?p=5</guid>
		<description><![CDATA[Ubuntu 8.04 released, time to upgrade wardrobe server. http://www.ubuntu.com/download]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 8.04 released, time to upgrade wardrobe server.</p>
<p>http://www.ubuntu.com/download</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stpe.se/2008/04/ubuntu-804-lts-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
