<?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>Low Town Dogs Home</title>
	<atom:link href="http://ccgi.lowtowndogshome.force9.co.uk/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://ccgi.lowtowndogshome.force9.co.uk</link>
	<description>I make all this stuff up you know!</description>
	<lastBuildDate>Fri, 20 Nov 2009 01:11:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ubuntu Static IP Address</title>
		<link>http://ccgi.lowtowndogshome.force9.co.uk/?p=17</link>
		<comments>http://ccgi.lowtowndogshome.force9.co.uk/?p=17#comments</comments>
		<pubDate>Fri, 20 Nov 2009 01:10:02 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ccgi.lowtowndogshome.force9.co.uk/?p=17</guid>
		<description><![CDATA[I like a static address for servers, by default my install of Ubuntu has a dynamically assigned address. To fix this I simply used my favourite text editor to change the settings in /etc/network/interfaces
Replace the line
iface eth0 inet dhcp
with:
iface eth0 inet static
address required ip address
nnetmask required subnet mask
network required network address
broadcast required broadcast address
gateway required gateway address (i.e. your routers address [...]]]></description>
			<content:encoded><![CDATA[<p>I like a static address for servers, by default my install of Ubuntu has a dynamically assigned address. To fix this I simply used my favourite text editor to change the settings in /etc/network/interfaces<br />
Replace the line</p>
<blockquote><p>iface eth0 inet dhcp</p></blockquote>
<p>with:</p>
<blockquote><p>iface eth0 inet static<br />
address <strong>required ip address</strong><br />
nnetmask <strong>required subnet mask</strong><br />
network <strong>required network address</strong><br />
broadcast <strong>required broadcast address</strong><br />
gateway <strong>required gateway address</strong> (i.e. your routers address on your LAN)</p></blockquote>
<p>Replace the text in bold with your particular network details.</p>
<p>For your new settings to take effect issue the following command:</p>
<blockquote><p>sudo /etc/init.d/networking restart</p></blockquote>
<p>Enter your password if prompted. If you’re logged on remotely, you\’ll probably loose the connection in which case you’ll need to reconnect using the new IP address. Double check the static address is being used by typing:</p>
<blockquote><p>ifconfig</p></blockquote>
<p>That’s about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ccgi.lowtowndogshome.force9.co.uk/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading APEX from v.2 to v.3 on Oracle XE</title>
		<link>http://ccgi.lowtowndogshome.force9.co.uk/?p=13</link>
		<comments>http://ccgi.lowtowndogshome.force9.co.uk/?p=13#comments</comments>
		<pubDate>Thu, 19 Nov 2009 01:41:18 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://ccgi.lowtowndogshome.force9.co.uk/?p=13</guid>
		<description><![CDATA[I spent a few hours trying to upgrade the default version of APEX bundled with Oracle XE to version 3.1.2 (According to the name of the ZIP file) on my trusty virtual ubuntu server. After a number of total uninstalls, reinstalls and bad language due to forgetting to back up data I finally managed it.
The [...]]]></description>
			<content:encoded><![CDATA[<p>I spent a few hours trying to upgrade the default version of APEX bundled with Oracle XE to version 3.1.2 (According to the name of the ZIP file) on my trusty virtual ubuntu server. After a number of total uninstalls, reinstalls and bad language due to forgetting to back up data I finally managed it.</p>
<p>The documentation provided by Oracle didn’t work 100% and I had to dig around quite a bit so thought I’d consolidate what I found on here.</p>
<p>I’m going to be repeating the process on my netbook running Fedora 10 as I go.</p>
<h2>Prerequisites</h2>
<p>You need to have already installed oracle XE on your machine, see my earlier post for details on how I did it.</p>
<h2>Assumptions</h2>
<p>This post doesn’t cover migrating apps from version 2 to version 3, in fact it assumes that you’re starting with a fresh XE install.</p>
<h2>Get the apex install from Oracle</h2>
<p>Ok, not going to go into too much detail here , I ended up with a zip file called apex_3.1.2.zip. It’s available from the oracle site <a href="http://www.oracle.com/technology/products/database/application_express/index.html" target="_blank">here</a>.</p>
<h2>Save, Unzip and Install</h2>
<p>Save the zip file in your home directory and unzip it simply by issuing:</p>
<blockquote><p>unzip apex_3.1.2.zip</p></blockquote>
<p>Obviously, the filename may have changed by the time anyone else reads this so amend accordingly.</p>
<p>Once done, you’ll see a new folder called apex, cd into this new directory.</p>
<blockquote><p>cd apex</p></blockquote>
<h2>Open SQL*PLus and start running scripts</h2>
<p><a href="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen1.jpg"><img title="screen1" src="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen1-thumb.jpg" alt="screen1" width="150" height="150" /></a></p>
<p>You should be able to issue:</p>
<blockquote><p>sqlplus sys as sysdba</p></blockquote>
<p>from within the apex directory, if not have a look at my earlier post about installing oracle XE, you probably need to set up a few environment variables (e.g. ORACLE_HOME etc).</p>
<p>You’ll be prompted for your sysdba password if all goes well.</p>
<p><a href="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen2.png"><img title="screen2" src="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen2-thumb.png" alt="screen2" width="150" height="150" /></a></p>
<p>At the SQL*Plus command line enter:</p>
<blockquote><p>@apexins &lt;password&gt; SYSAUX SYSAUX TEMP /i/</p></blockquote>
<p>replacing &lt;password&gt; with your sys password.</p>
<p>This will kick off a script that runs for a few minutes, I noticed a few error messages scrolling past. I’m guessing that these aren’t much to worry about as the end result seems to work ok.</p>
<p>Oracle’s instructions are <a href="http://www.oracle.com/technology/products/database/application_express/html/3.0.1_and_xe.html" target="_blank">here</a>.</p>
<p>When the script finishes, about 35-40 minutes later in my case, you’ll be disconnected from the database and will hopefully see some output that looks like the following:</p>
<p><a href="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen03.png"><img title="screen03" src="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen03-thumb.png" alt="screen03" width="150" height="150" /></a><a href="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen4.png"> <img title="screen4" src="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen4-thumb.png" alt="screen4" width="150" height="150" /></a></p>
<p>Next we have a problem because we run a script that appears to try to read/write from the apex folder in our home directory. By saving the zip file in our home folder we inadvertently blocked oracle from seeing it.<br />
To get round this on Ubuntu, I used a nice elegant solution which I’ll document later. For now I used the following to temporarily open up permissions on my home folder.</p>
<p>start a terminal session as root:</p>
<blockquote><p>su -</p></blockquote>
<p>in Fedora or</p>
<blockquote><p>sudo –u root –i</p></blockquote>
<p>in Ubuntu.</p>
<p>Before changing any permissions, it’s worth making a note of what they were beforehand so you can easily change them back afterwards.</p>
<blockquote><p>chmod 777 /home/&lt;your account&gt;</p>
<p>chmod 777 /home/&lt;your account&gt;/apex –R</p>
<p>exit</p></blockquote>
<p>This is very dodgy but worked for me.</p>
<p>Now reconnect to the database and run a couple more scripts:</p>
<blockquote><p>@apxldimg /home/&lt;your account&gt;</p></blockquote>
<p><a href="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen5.png"><img title="screen5" src="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen5-thumb.png" alt="screen5" width="150" height="150" /></a></p>
<p>Output will look similar to that above, note you need to replace &lt;your account&gt; with your home folder name (in my case dave).</p>
<p>Next run:</p>
<blockquote><p>@apxxepwd &lt;password&gt;</p></blockquote>
<p>replacing &lt;password&gt; with the sys password.</p>
<p><a href="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen6.png"><img title="screen6" src="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen6-thumb.png" alt="screen6" width="150" height="150" /></a></p>
<p>According to Oracle, that’s it, done! But if you point your browser to:</p>
<blockquote><p>http://localhost:8080/apex</p></blockquote>
<p>You’ll be dismayed to see that none of the images have loaded and you’ll get something that looks like:</p>
<p><a href="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen08.png"><img title="screen08" src="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen08-thumb.png" alt="screen08" width="150" height="150" /></a></p>
<p>The fix is to start a new SQL*Plus session from within the ~/apex/utilities directory (~ = your home folder and if you’ve followed this post to the letter the following should work:</p>
<blockquote><p>cd ~/apex/utilities</p>
<p>sqlplus sys as sysdba</p></blockquote>
<p>… enter sys password when prompted then:</p>
<blockquote><p>@reset_image_prefix</p></blockquote>
<p>If you think you can get away with @utilities\reset_image_prefix from an already open SQL*Plus session, it doesn’t work!</p>
<p>Successful output looks similar to:</p>
<p><a href="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen9.png"><img title="screen9" src="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen9-thumb.png" alt="screen9" width="150" height="150" /></a></p>
<p>Now the web console should look more like:</p>
<p><a href="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen10.png"><img title="screen10" src="http://ccgi.lowtowndogshome.force9.co.uk/wp-content/uploads/2009/11/screen10-thumb.png" alt="screen10" width="150" height="150" /></a></p>
<h2>Tidy up</h2>
<p>Let’s revert the permissions on our home directory before we do anything else. Open up a terminal session:</p>
<blockquote><p>cd /home</p>
<p>chmod 700 &lt;your account&gt;</p>
<p>chmod 755 &lt;your account&gt;/apex -R</p></blockquote>
<p>Replace &lt;your account&gt; with your account name, once again, I used dave. The permissions specified above match the original permissions on the respective folders.</p>
<p>In fact, at this stage, you can probably delete (or rename) the apex directory.</p>
<blockquote><p>It’s a bit different!</p></blockquote>
<p>Before you can do anything you need to visit:</p>
<blockquote><p>http://localhost:8080/apex/apex_admin</p></blockquote>
<p>..to create accounts. The admin password is admin, password is the one you specified above. You’ll be prompted to change the password at first login but it’ didn’t complain when I used the same one!</p>
<p>There’s a new thing called a workspace and at this stage I’m not sure if it’s a totally new entity or just a friendly name for an existing oracle object.</p>
<p>Once you’ve created a workspace with an associated admin user, you can go to:</p>
<blockquote><p>http://localhost:8080/apex</p></blockquote>
<p>.. and get developing.</p>
<p>There are also a number of pre-built applications <a href="http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html" target="_blank">here</a>.</p>
<p>That’s about it for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://ccgi.lowtowndogshome.force9.co.uk/?feed=rss2&amp;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Samba</title>
		<link>http://ccgi.lowtowndogshome.force9.co.uk/?p=11</link>
		<comments>http://ccgi.lowtowndogshome.force9.co.uk/?p=11#comments</comments>
		<pubDate>Thu, 19 Nov 2009 01:31:50 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ccgi.lowtowndogshome.force9.co.uk/?p=11</guid>
		<description><![CDATA[To install SAMBA use sudo apt-get install samba, Irrespective of the OS, I always have a dave user. So what I usually do is share out my Linux home directory on the file server so it’s available to any other machine on the network logged on as me.
The file you need to edit is:
/etc/samba/smb.conf
Look for [homes], you [...]]]></description>
			<content:encoded><![CDATA[<p>To install SAMBA use sudo apt-get install samba, Irrespective of the OS, I always have a dave user. So what I usually do is share out my Linux home directory on the file server so it’s available to any other machine on the network logged on as me.</p>
<p>The file you need to edit is:</p>
<blockquote><p>/etc/samba/smb.conf</p></blockquote>
<p>Look for [homes], you should see something like:</p>
<blockquote><p>;[homes]<br />
;   comment = Home Directories<br />
;   browseable = no</p></blockquote>
<p>The semicolons are commenting out the 3 lines, I replaced the above with:</p>
<blockquote><p>[homes]<br />
comment = Home Directories<br />
path = %H/files<br />
browseable = no<br />
writeable = yes<br />
create mask = 700<br />
directory mask = 700<br />
invalid users = root bin daemon nobody named sys tty disk mem kmem users</p></blockquote>
<p>Rather than sharing out the /home/dave directory, this shares out a sub directory called files. This is just for tidiness as there are a lot of hidden files in the former that clutter up windows explorer if you have it set to show hidden files.</p>
<p>Use:</p>
<blockquote><p>sudo /etc/init.d/samba restart</p></blockquote>
<p>to restart the samba service with the new settings.</p>
<p>Now I need to create my files directory, this is simply a matter of:</p>
<blockquote><p>cd ~<br />
mkdir files</p></blockquote>
<p>The cd ~ moves me back to my /home/dave directory so I create the files directory in the right place.</p>
<p>Finally:</p>
<blockquote><p>sudo smbpasswd -a dave</p></blockquote>
<p>adds a samba user for dave. Samba has it’s own set of users separate from the OS, this command just creates a new samba user. You will be prompted for a password, I use the same password for samba as I use for logging onto the machine (and my windows box for that matter).</p>
<p>From a windows box, I can now navigate to \\server IP\dave where server IP is the IP address of my server.</p>
<p>NOTE: There’s a chance that you might have to restart the samba service last. I forgot to create the files directory and one of my attempts to fix the problem was to restart the server after creating the samba user (it’s done before in the above instructions).</p>
<p>This setup is pretty basic. Things I’d like to do in addition would be:</p>
<p>Create a read only share that’s available to anyone to store media for viewing on any machine on the network, irrespective of the user logged on. Although selected users should have permissions to upload,change and delete files.</p>
<p>Create a share that can be updated by anyone. This would be useful for backing up files from pocket PC devices on the network that don’t seem to be able to log on as a particular user.</p>
<p>I’ve had a brief look at SME server which does all sorts of cool stuff, including being a domain controller for windows boxes. Currently I have to keep my windows, linux and samba passwords in sync, SME server would provide a single central mechanism for keeping everything in line. Hopefully I’ll cover this in a later post.</p>
]]></content:encoded>
			<wfw:commentRss>http://ccgi.lowtowndogshome.force9.co.uk/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
