<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.81 (http://www.squarespace.com/) on Sun, 20 May 2012 04:23:46 GMT--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Home</title><link>http://www.astall.com/home/</link><description></description><lastBuildDate>Fri, 24 Feb 2012 20:28:17 +0000</lastBuildDate><copyright></copyright><language>en-GB</language><generator>Squarespace Site Server v5.11.81 (http://www.squarespace.com/)</generator><item><title>BBC iPlayer on Ubuntu</title><category>iPlayer</category><category>ubuntu</category><dc:creator>Chris Astall</dc:creator><pubDate>Fri, 24 Feb 2012 20:21:58 +0000</pubDate><link>http://www.astall.com/home/2012/2/24/bbc-iplayer-on-ubuntu.html</link><guid isPermaLink="false">581355:6726715:15173557</guid><description><![CDATA[<p>I was looking for a way to download and watch <a href="http://www.bbc.co.uk/iplayer/tv">BBC iPlayer</a> content on Ubuntu (Natty Descktop) and came across this <a href="http://www.christopherdowning.co.uk/2012/01/11/a-basic-get_iplayer-tutorial/">great post </a>by <a href="http://www.christopherdowning.co.uk/">Christopher Downing</a> on how to get it installed.</p>
<p>The only problem I cam across was whilst doing the update when I had to install a new Key, this was acheived by:</p>
<p><textarea style="height: auto;" cols="80" rows="2" readonly="readonly">
gpg --keyserver keyserver.ubuntu.com --recv &lt;missing-key&gt;
gpg --export --armor &lt;missing-key&gt; | sudo apt-key add -</textarea></p>
<p>The rest of Christophers post worked a treat.&nbsp;</p>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-15173557.xml</wfw:commentRss></item><item><title>Lowry Parsons</title><category>ibooks</category><category>kindle</category><category>publishing</category><dc:creator>Chris Astall</dc:creator><pubDate>Mon, 09 Jan 2012 22:25:37 +0000</pubDate><link>http://www.astall.com/home/2012/1/9/lowry-parsons.html</link><guid isPermaLink="false">581355:6726715:14510376</guid><description><![CDATA[<p>Have recently been working on a new venture, <a href="http://www.lowryparsons.com">Lowry Parsons</a>, a publisher of eBooks. This has involved creating the website, but more interestingly publishing an ebook for Amazon Kindle. The book, <a href="http://www.amazon.co.uk/gp/product/B006O9WYIC/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=lowrpars-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=B006O9WYIC">The Five Minute Master on Email Overload</a>, is available on <a href="http://www.amazon.co.uk/gp/product/B006O9WYIC/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=lowrpars-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=B006O9WYIC">Amazon </a>now.&nbsp;</p>
<p>More on the publishing process to follow as well as how to publish on Apple iBooks.</p>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-14510376.xml</wfw:commentRss></item><item><title>Confluence and JIRA with HTTPS</title><category>apache</category><category>confluence</category><category>http</category><category>https</category><category>jira</category><category>ssl</category><dc:creator>Chris Astall</dc:creator><pubDate>Thu, 01 Sep 2011 08:11:03 +0000</pubDate><link>http://www.astall.com/home/2011/9/1/confluence-and-jira-with-https.html</link><guid isPermaLink="false">581355:6726715:12695246</guid><description><![CDATA[<p>So I wanted to get the development server running over HTTPS. This was always on my list of things to get done but the issue was forced as a supplier was having trouble accessing SVN over HTTP and after some research it seemed that it might be because a proxy somewhere between them and server was tripping out the relevant WebDAV HTTP methods. One way around this was to use HTTPS.</p>
<p>So to check things out I obtained a free 30 day SSL from <a href="http://www.ssl247.co.uk/">SSL247</a>. This has issued me with a <a href="http://www.rapidssl.com/">RapidSSL</a> certificate, which is great as they seem preety cheap and as this is a develoment server I have no need for and <a href="http://en.wikipedia.org/wiki/Extended_Validation_Certificate">EV cert</a>&nbsp;so I applied and within 5 mins I had my certificate.&nbsp;</p>
<p>With this installed the static webpages and SVN worked fine. I have yet to get the supplier to try but at this point everything was OK. The problems came when trying to get&nbsp;Confluence and JIRA servers running with HTTPS.&nbsp;</p>
<p>I knew that I had to change the base URLs, so once this was done I tried to access the server and I was getting redirected at various points to the HTTP version. Unfortunatly the documentation on the <a href="http://www.atlassian.com/">Atlassian</a> website all refers to getting Confluence and JIRA serving HTTPS directly. This though is not what I required as I wanted <a href="http://httpd.apache.org/">Apache </a>to be the SSL endpoint and forward the traffic to Confluence and JIRA using HTTP. This would be OK as the Confluence and JIRA installations were only available on localhost and so no issues.</p>
<p>After seraching the internet I stumbled across <a href="http://www.lackhead.org/">Lackhead.org</a> who had the answer. The full answer is <a href="http://www.lackhead.org/2009/10/confluence-mod_proxy-and-ssl-oh-my/">here</a>, but in breif the <code>proxyPort</code>, <code>scheme</code> and <code>proxyName</code> elements needs to be added to <code><Connector></code> section of the <code>server.xml</code>, like so</p>
<p><textarea style="height: auto;" cols="80" rows="5" readonly="readonly">
<Connector port="8091" protocol="HTTP/1.1"
           connectionTimeout="20000"
           proxyPort="443" scheme="https" proxyName="mysite.com"
           URIEncoding="UTF-8"
           redirectPort="8443" /></textarea></p>
<p>And that's it, restart Tomcat and it all works. You can now remove the non-ssl directives from the Apache config so that Confluence, JIRA and SVN are no longer accessible on HTTP. Of course if you have links to those old URLs you will need to add rewrite rules to redirect the http versions to the https versions</p>
<p><textarea style="height: auto;" cols="80" rows="3" readonly="readonly">
    RewriteEngine On
    RewriteRule ^/jira(.*)       https://mysite.com/jira$1       [R]
    RewriteRule ^/confluence(.*) https://mysite.com/confluence$1 [R]</textarea></p>
<p>
<p>And that really is it.</p>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-12695246.xml</wfw:commentRss></item><item><title>Getting MySQL Workbench to work on a remote host</title><category>mysql</category><category>ubuntu</category><dc:creator>Chris Astall</dc:creator><pubDate>Thu, 02 Jun 2011 17:28:22 +0000</pubDate><link>http://www.astall.com/home/2011/6/2/getting-mysql-workbench-to-work-on-a-remote-host.html</link><guid isPermaLink="false">581355:6726715:11664200</guid><description><![CDATA[<p>When you first install <a href="http://www.mysql.com/">MySQL </a>on Ubuntu 10.04 server it is configured to only allow connections from localhost and so if you want to connect <a href="http://www.mysql.com/downloads/workbench/">MySQL Workbench</a> to the server for administration purposes then you need to allow connections from any IP address. This editing the <code>/etc/mysql/my.cnf</code> file and find the section <code>[mysqld]</code> and edit the <code>bind-address</code> entry from <code>127.0.0.1</code> to be your full IP address or if you want to bind to all addresses then use <code>0.0.0.0</code>. Also make sure that there is no <code>skip-networking</code> section.</p>
<p>And don't forget to restart MySql</p>
<p><textarea style="height: auto;" cols="80" rows="1" readonly="readonly">
sudo /etc/init.d/mysql restart</textarea></p>
<p>And grant privileges to root for remote administration, through the mysql console</p>
<p><textarea style="height: auto;" cols="80" rows="1" readonly="readonly">
grant all on *.* to root;</textarea></p>
<p>You will also need to add the MySql port to the firewall rules to allow access</p>
<p><textarea style="height: auto;" cols="80" rows="1" readonly="readonly">
sudo ufw allow 3306</textarea></p>
<p>Thanks to Vivek Gite over at <a href="http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html">nixCraft</a> for his great artical on the same subject.</p>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-11664200.xml</wfw:commentRss></item><item><title>Building an Development Server</title><category>Server</category><category>apache</category><category>development</category><category>mysql</category><category>subversion</category><category>tomcat</category><category>ubuntu</category><dc:creator>Chris Astall</dc:creator><pubDate>Wed, 01 Jun 2011 17:23:54 +0000</pubDate><link>http://www.astall.com/home/2011/6/1/building-an-development-server.html</link><guid isPermaLink="false">581355:6726715:11647847</guid><description><![CDATA[<p>So as part of a project I am working on I need to have a development server that will allow me to run a number of development tools, specifically <a href="http://www.atlassian.com/software/jira/">JIRA</a>, <a href="http://www.atlassian.com/software/confluence/">Confluence </a>, <a href="http://subversion.tigris.org/">Subversion</a>, and <a href="http://www.mysql.com/">MySQL</a> but later maybe some other tools.</p>
<p>First I looked at the options for hosting. I would need a host wher eI could run tomcat and apache, this really meant a dedicated server or a cloud service. After a quite look into a number of providers I plumpted for a <a href="http://www.rackspace.co.uk/cloud-hosting/cloud-products/cloud-servers/">Rackspace Cloud Server</a>. Sign up was astraight forward and after a phone call from Rackspace to confirm my details I was ready to create my first VM. This was very easy using their web based front end and within 10 mins I had a new <a href="http://www.ubuntu.com/business/server/overview">Ubuntu 10.04 LTS Server</a> up and running and was able to logon with SSH.</p>
<h2>Security</h2>
<p>So how to configure this new server. Since Rackspace give you root access it was nessassary to secure the server. This involved logging on as root and seting up two new groups, sshlogins and admin, adding a newuser, putting the newuser in both the groups:</p>
<p><textarea style="height: auto;" cols="80" rows="5" readonly="readonly">
addgroup sshlogin 
addgroup admin 
adduser newuser 
adduser newuser sshlogin 
adduser newuser admin</textarea></p>
<p>Next we need to restricting ssh to the new sshlogins group only. To do this edit the <code>/etc/ssh/sshd_config</code> file, find where it says <code>PermitRootLogin yes</code> and change it to <code>PermitRootLogin no</code> then at the bottom of file add:</p>
<p><textarea style="height: auto;" cols="80" rows="2" readonly="readonly">
# Permit only sshlogins group 
AllowGroups sshlogin</textarea></p>
<p>for this to take effect the sshd needs to be restarted:</p>
<p><textarea style="height: auto;" cols="80" rows="1" readonly="readonly">
sudo /etc/init.d/ssh restart</textarea></p>
<p>And finally allowing the admin group to perform sudo actions. This involes editing the <code>/etc/sudoers</code> file, however as this is so important this needs to be done using visudo, adding the following line at the bottom.</p>
<p><textarea style="height: auto;" cols="80" rows="2" readonly="readonly">
# Members of the admin group may gain root privileges 
%admin ALL=(ALL) ALL</textarea></p>
<p>Then save the file.</p>
<p>Now logout of root and log back in again as newuser</p>
<p>Next we need to stop any connections to ports except those we wish to have access through, i.e. 22 (for SSH) and 80 (for the Webserver). To do this will be use the inbuilt iptables, however to make life easier we will use <a href="https://help.ubuntu.com/10.04/serverguide/C/firewall.html">ufw</a> to configure the firewall. To do this first you will need to install <a href="https://help.ubuntu.com/10.04/serverguide/C/firewall.html">ufw</a>:</p>
<p><textarea style="height: auto;" cols="80" rows="1" readonly="readonly">
sudo apt-get ufw</textarea></p>
<p>And configure the firewall as follows (thanks for Mike Descy at <a href="http://1000umbrellas.com/2010/04/29/how-to-set-up-the-firewall-using-ufw-on-ubuntu-lucid-lynx-server">101Umbrellas</a>):</p>
<p><textarea style="height: auto;" cols="80" rows="5" readonly="readonly">
sudo ufw default deny incoming 
sudo ufw default allow outgoing 
sudo ufw allow ssh 
sudo ufw allow www 
sudo ufw enable</textarea></p>
<h2> Installing base software</h2>
<p>The base software for this installation is <a href="http://www.atlassian.com/software/jira/">JIRA</a>, <a href="http://www.atlassian.com/software/confluence/">Confluence </a>, <a href="http://subversion.tigris.org/">Subversion</a> and <a href="http://www.mysql.com/">MySQL</a>. To install these and the other required components <code>tomcat6-user</code> for the private instance features of tomcat and <code>ttf-dejavu</code> for the fonts required as the server is installed with X11 use:</p>
<p><textarea style="height: auto;" cols="80" rows="6" readonly="readonly">
sudo apt-get install apache2
sudo apt-get install tomcat6
sudo apt-get install tomcat6-user
sudo apt-get install subversion
sudo apt-get install libapache2-svn
sudo apt-get install mysql-server
sudo apt-get install ttf-dejavu</textarea></p>
<h2>Configuring MySQL</h2>
<p>MySQL needs to have some options set so it can work for Jira and Confluence. The easiest way to do this is to edit <code>/etc/mysql/my.cnf</code> and add the following lines at the end of the <code>[mysqld]</code> section just before the <code>[mysqldump]</code> section start</p>
<p><textarea style="height: auto;" cols="80" rows="7" readonly="readonly">
default-collation=utf8_bin
character-set-server=utf8
collation-server=utf8_bin
default-character-set=utf8
default-storage-engine=INNODB
max_allowed_packet=32M
transaction-isolation=READ-COMMITTED</textarea></p> 
<p>And then restart MySQl</p>
<p><textarea style="height: auto;" cols="80" rows="1" readonly="readonly">
sudo /etc/init.d/mysql restart</textarea></p>
<p>Now we need Databases and users for Jira and confluence. To create these logon to the mysql console as root and enter:</p>
<p><textarea style="height: auto;" cols="80" rows="7" readonly="readonly">
create database jiradb character set utf8;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on
  jiradb.* TO 'jirauser'@'localhost' IDENTIFIED BY 'mypassword';

create database confluencedb character set utf8;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on
  confluencedb.* TO 'confluenceuser'@'localhost' IDENTIFIED BY 'mypassword';</textarea></p>
<h2>Configuring Tomcat for Jira and Confluence</h2>
<p>The <code>tomcat6-user</code> is required later for creating the separate tomcat instances</p><p>Confluence and Jira will need home directories as does tomcat for it's server instances, I put these in the <code>/srv</code> directory where the tomcat instance will also live eventually</p>
<p><textarea style="height: auto;" cols="80" rows="6" readonly="readonly">
cd /srv
sudo mkdir -p jira
sudo mkdir -p confluence
sudo mkdir -p tomcat
sudo chown tomcat6:tomcat6 jira
sudo chown tomcat6:tomcat6 confluence</textarea></p>
<p>We are going to create two new tomcat instances one for jira and one for confluence. Here we are setting the HTTP connection ports to 8090 and 8091 respectivly and the control ports to 8015 and 8016. Once the server instances are created the <code>Catalina/localhost</code> directories need to be created for each of the new tomcat instances</p>
<p><textarea style="height: auto;" cols="80" rows="5" readonly="readonly">
cd /srv/tomcat
sudo tomcat6-instance-create -p 8090 -c 8015 jira
sudo tomcat6-instance-create -p 8091 -c 8016 confluence
sudo mkdir -p jira/conf/Catalina/localhost
sudo mkdir -p confluence/conf/Catalina/localhost</textarea></p>
<p>Since Jira and Confluence require some extra jars to work, namely those in the <a href="http://www.atlassian.com/software/jira/downloads/binary/jira-jars-tomcat-distribution-4.3-rc1-tomcat-6x.zip">http://www.atlassian.com/software/jira/downloads/binary/jira-jars-tomcat-distribution-4.3-rc1-tomcat-6x.zip</a> and the <a href="http://dev.mysql.com/downloads/connector/j">MySQL JDBC driver</a> these need to be downloaded and put into the system-wide tomcat <code>/usr/share/tomcat6/lib</code> directory.</p> 
<p>Next we need the <code>.war</code> files for Jira and Confluence. These need to be compliled and I suggest you do this on a seperate machine and follow the Atlassian instructions for <a href="http://confluence.atlassian.com/display/JIRA043/Installing+JIRA+WAR-EAR">Jira</a> and <a href="http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide">confluence </a>to build <code>.war</code> files and then copy the <code>.war</code> files to the live server ready for deployment to the tomcat instances.</p>
<p>Web configuration files for Jira and Confluence need to be created before starting the servers. For Jira the file, <code>/srv/tomcat/jira/conf/Catalina/localhost/jira.xml</code> should contain:</p>
<p><textarea style="height: auto;" cols="80" rows="18" readonly="readonly">
<Context path="/jira" docBase="/srv/files/atlassian-jira-4.3.3.war" debug="0" useHttpOnly="true">

    <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
            username="jirauser"
            password="mypassword"
            driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://127.0.0.1:3306/jiradb?useUnicode=true&amp;amp;characterEncoding=UTF8"
            maxActive="20"
            validationQuery="select 1"/>

    <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
    factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
    <Manager pathname=""/>

</Context></textarea></p>
<p>And for Confluence, something very similar the file, <code>/srv/tomcat/confluence/conf/Catalina/localhost/confluence.xml</code> should contain:</p>
<p><textarea style="height: auto;" cols="80" rows="19" readonly="readonly">
<Context path="/confluence" docBase="/srv/files/confluence-3.5.4.war" debug="0" useHttpOnly="true">

    <Resource name="jdbc/ConfluenceDS" auth="Container" type="javax.sql.DataSource"
            username="confluenceuser"
            password="mypassword"
            driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://127.0.0.1:3306/confluencedb?useUnicode=true&amp;amp;characterEncoding=UTF8"
            maxActive="20"
            validationQuery="select 1"/>

    <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
    factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
    <Manager pathname=""/>

</Context></textarea></p>
<p>To set the memory allocation settings for Tomcat edit both <code>jira/bin/setenv.sh</code> and <code>confluence/bin/setenv.sh</code> and add the following line at the end:</p>
<p><textarea style="height: auto;" cols="80" rows="4" readonly="readonly">
export CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Xms128m -Xmx512m -XX:MaxPermSize=256m -Djava.awt.headless=true"</textarea></p>
<p>Next you need to stop the default tomcat instance from automatically starting and set the Jira and Confluence instances to automatically start. To do this you need to create, and make executable, <code>/etc/init.d/jira</code> and <code>/etc/init.d/confluence</code> scripts as:</p>
<p><code>/etc/init.d/jira</code></p>
<p><textarea style="height: auto;" cols="80" rows="16" readonly="readonly">
# Jira auto-start
    # description: Auto-starts the tomcat jira instance

    case $1 in
    start)
            sh /srv/tomcat/jira/bin/startup.sh
            ;;
    stop)
            sh /srv/tomcat/jira/bin/shutdown.sh
            ;;
    restart)
            sh /srv/tomcat/jira/bin/shutdown.sh
            sh /srv/tomcat/jira/bin/startup.sh
            ;;
    esac
    exit 0</textarea></p>
<p><code>/etc/init.d/confluence</code></p>
<p><textarea style="height: auto;" cols="80" rows="16" readonly="readonly">
# Confluence auto-start
    # description: Auto-starts the tomcat confluence instance

    case $1 in
    start)
            sh /srv/tomcat/confluence/bin/startup.sh
            ;;
    stop)
            sh /srv/tomcat/confluence/bin/shutdown.sh
            ;;
    restart)
            sh /srv/tomcat/confluence/bin/shutdown.sh
            sh /srv/tomcat/confluence/bin/startup.sh
            ;;
    esac
    exit 0</textarea></p>
<p>And make them executable:</p>
<p><textarea style="height: auto;" cols="80" rows="2" readonly="readonly">
sudo chmod 755 /etc/init.d/jira
sudo chmod 755 /etc/init.d/confluence</textarea></p>
<p>Then it is necessary to disable the default tomcat instance and enable the jira and confluence instances. Thanks to <a href="http://www.debuntu.org/how-to-manage-services-with-update-rc.d">http://www.debuntu.org/how-to-manage-services-with-update-rc.d</a> for this. Anyway here are the commands you need:</p>
<p><textarea style="height: auto;" cols="80" rows="4" readonly="readonly">
sudo update-rc.d -f tomcat6 stop 
sudo update-rc.d -f tomcat6 stop 80 0 1 2 3 4 5 6 .
sudo update-rc.d -f jira defaults 93 7
sudo update-rc.d -f confluence defaults 94 6</textarea></p>
<p>Startup Jira and Confluence:</p>
<p><textarea style="height: auto;" cols="80" rows="2" readonly="readonly">
sudo /etc/init.d/jira start
sudo /etc/init.d/confluence start</textarea></p>
<h2>Configuring Apache HTTPD</h2>
<p>There are a number of things to configure in Apache. First you need to enable the proxy modules as these are required for the Proxy rules that are required. To do this:</p>
<p><textarea style="height: auto;" cols="80" rows="2" readonly="readonly">
cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/proxy* .
</textarea></p>
<p>Next the default site configuration file, <code>/etc/apache2/sites-enabled/000-default</code> needs to be edited to set the <code>ServerName</code>,  <code>ServerAdmin</code> and <code>DocumentRoot</code> properties as such:</p>
<p><textarea style="height: auto;" cols="80" rows="3" readonly="readonly">
ServerAdmin name@domain.com
ServerName  server.domain.com
DocumentRoot /srv/www</textarea></p>
<p>Then the proxy rules sections need to be added at the bottom of the file, but before the closing <code></VirtualHost></code> tag:</p>
<p><textarea style="height: auto;" cols="80" rows="21" readonly="readonly">
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyRequests Off
    ProxyPreserveHost On

    ProxyPass        /jira        http://localhost:8090/jira
    ProxyPassReverse /jira        http://localhost:8090/jira
    <Location /jira>
        Order allow,deny
        Allow from all
    </Location>

    ProxyPass        /confluence  http://localhost:8091/confluence
    ProxyPassReverse /confluence  http://localhost:8091/confluence
    <Location /confluence>
        Order allow,deny
        Allow from all
    </Location></textarea></p>
<p>I like to put a basic <code>index.html</code> file in the <code>/srv/www</code> directory that allows users to find the Jira and Confluence sites. I use something like:</p>
<p><textarea style="height: auto;" cols="80" rows="16" readonly="readonly">
<!doctype html> 
<html> 
  <head> 
    <meta charset="utf-8"> 
    <title>Demo</title> 
  </head> 
  <body> 
    <h1> Development Server</h1> 
    <ul> 
      <li>For issue tracking, including defects and change requests use <a href="http://www.astall.com/jira">jira</a></li> 
      <li>For all knowledge sharing and documents use the <a href="http://www.astall.com/confluence">wiki</a></li> 
    </ul> 
  </body> 
</html></textarea></p>
<p>And restart Apache:</p>
<p><textarea style="height: auto;" cols="80" rows="1" readonly="readonly">
sudo /etc/init.d/apache2 restart</textarea></p>
<h2>Configuring Subversion</h2>
<p>This is fairly easy, I have decided to use http as the access method and thanks to the Ubuntu documentation on <a href="https://help.ubuntu.com/10.04/serverguide/C/subversion.html">Subversion</a> all you need to do is:</p>
<p><textarea style="height: auto;" cols="80" rows="4" readonly="readonly">
cd /srv
sudo mkdir -p svn
svnadmin create /srv/svn/project
sudo chown -R www-data:www-data /srv/svn</textarea></p>
<p>You then need to add the following to the Apache config file <code>/etc/apache2/sites-enabled/000-default</code>, after the previously added proxy sections but before the final <code></VirtualHosts></code> tag:</p>
<p><textarea style="height: auto;" cols="80" rows="8" readonly="readonly">
    <Location /svn/project>
        DAV svn
        SVNPath /srv/svn/project
        AuthType Basic
        AuthName "You repos name"
        AuthUserFile /etc/subversion/passwd
        Require valid-user
    </Location></textarea></p>
<p>Then you need to add a password for any users, the <code>-c</code> option is required for the first user but not any others:</p>
<p><textarea style="height: auto;" cols="80" rows="2" readonly="readonly">
sudo htpasswd -c /etc/subversion/passwd user1
sudo htpasswd /etc/subversion/passwd user2</textarea></p>
<p>And restart Apache:</p>
<p><textarea style="height: auto;" cols="80" rows="1" readonly="readonly">
sudo /etc/init.d/apache2 restart</textarea></p>
<h2>Whats Left to do:</h2>
<p>This setup all works and is all that is really required. However there are a couple of other things that you may wish to do:</p> 
<ul>
<li>Start jira and confluence as tomcat6 user - currently the tomcat instances run as root and this has security implications. Making the tomcat instances run as the tomcat6 user adds small amount of security such that if a hacker finds a security hole in tomcat then they only have limited access.</li>
<li>Configure Apache for SSL - This again adds more security and we can even stop all access to Jira, Confluence and Subversion without going through the SSL version of the site, thus stopping any password snooping</li>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-11647847.xml</wfw:commentRss></item><item><title>reCAPTCHA</title><category>Programming</category><category>reCAPTCHA</category><dc:creator>Chris Astall</dc:creator><pubDate>Tue, 17 May 2011 17:27:21 +0000</pubDate><link>http://www.astall.com/home/2011/5/17/recaptcha.html</link><guid isPermaLink="false">581355:6726715:11486087</guid><description><![CDATA[<p>In building a new website I was looking for a CAPTCHA program for User registration and after a very short search came across <a href="http://www.google.com/recaptcha/learnmore">reCAPTCHA</a>. Part <a href="http://www.google.com">Google</a>, this CAPTCHA tries to harness the astonishing 150,000 man hours of work humans around the world spend each day solving CAPTCHAs for good use, reading old books. Amazing.</p>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-11486087.xml</wfw:commentRss></item><item><title>Documenting a SQL Server 2008 DB</title><category>CSS</category><category>HTML</category><category>Programming</category><category>SQL</category><category>XML</category><dc:creator>Chris Astall</dc:creator><pubDate>Mon, 16 May 2011 08:31:58 +0000</pubDate><link>http://www.astall.com/home/2011/5/16/documenting-a-sql-server-2008-db.html</link><guid isPermaLink="false">581355:6726715:11471711</guid><description><![CDATA[<p>So I needed to document a SQL Server 2008 table structure and after a short look on the internet couldn't find anything obviously easy and free, maybe it was becuase I was tied but i thougt I would go ahead and write my own.&nbsp;</p>
<p>The apprach I thought I would take was to extra the structure in XML using <code>FOR XML</code> <a href="http://msdn.microsoft.com/en-us/library/ms345137(v=sql.90).aspx">SQL Server syntax</a>. I could then using <a href="http://www.w3schools.com/xsl/">XSLT </a>to translate the XML into HTML and add a <a href="http://www.w3schools.com/css/default.asp">CSS </a>to format it ready for printing.</p>
<p>First to get the structure from the DB.</p>
<p><textarea cols="80" rows="20" readonly style="height: auto">
SELECT a.name as "@tablename",
       (
       SELECT b.[colorder] as "@seq",
              b.[name] as "@columnname",
              c.[name] as "@datatype",
              b.[length] as "@length",
              CASE WHEN b.[cdefault] > 0 THEN d.[text] ELSE NULL END as "@default",
              CASE WHEN b.[isnullable] = 0 THEN 'No' ELSE 'Yes' END as "@nullable"
         FROM syscolumns b 
        INNER JOIN systypes c ON  b.[xtype] = c.[xtype]
         LEFT JOIN syscomments d ON  b.[cdefault] = d.[id]
        WHERE b.id = a.id
        ORDER BY b.[colorder]
           FOR XML PATH ('column'), type
       ) as "columns"
  FROM sysobjects a
 WHERE a.[xtype] = 'u'
 ORDER BY a.name
   FOR XML PATH ('table'), root ('database') 
</textarea></p>
<p>Take the output of this and add the following two lines at the top</p>
<p><textarea cols="80" rows="2" readonly style="height: auto">
&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;?xml-stylesheet type="text/xsl" href="structure.xsl"?&gt; </textarea></p>
<p>Then save the XML into a directory which includes the attached two files. Open the XML in <a href="http://www.mozilla.com/en-US/firefox/new/">Firefox </a>(or <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home">IE</a> 7, 8 or 9) and the formated table structure will be displayed.</p>
<ul>
<li><a href="http://www.astall.com/storage/Structure.xsl">structure.xsl</a></li>
<li><a href="http://www.astall.com/storage/Structure.css">structure.css</a></li>
</ul>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-11471711.xml</wfw:commentRss></item><item><title>Yarnton Village Community Website now live</title><category>client</category><category>yarnton-village</category><dc:creator>Chris Astall</dc:creator><pubDate>Tue, 22 Mar 2011 13:33:21 +0000</pubDate><link>http://www.astall.com/home/2011/3/22/yarnton-village-community-website-now-live.html</link><guid isPermaLink="false">581355:6726715:10871340</guid><description><![CDATA[<p>After a major redesign the <a href="http://www.yarnton-village.org.uk/">Yarnton Village Community Website</a> is now live. &nbsp;Go over an have a look and see what you think.</p>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-10871340.xml</wfw:commentRss></item><item><title>iPad Backup</title><category>Backup</category><category>iPad</category><dc:creator>Chris Astall</dc:creator><pubDate>Fri, 03 Dec 2010 11:04:14 +0000</pubDate><link>http://www.astall.com/home/2010/12/3/ipad-backup.html</link><guid isPermaLink="false">581355:6726715:9628124</guid><description><![CDATA[<p>A quick update on the iPad backup. Since the 4.2 upgrade, which I had to turn the backup off to complete, the backup is running in a much more normal time. Looks like Apple fixed the issue. Thanks Apple.</p>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-9628124.xml</wfw:commentRss></item><item><title>New PC</title><category>PC</category><category>RAID</category><category>Server</category><category>i7</category><category>iSCSI</category><dc:creator>Chris Astall</dc:creator><pubDate>Tue, 30 Nov 2010 17:03:34 +0000</pubDate><link>http://www.astall.com/home/2010/11/30/new-pc.html</link><guid isPermaLink="false">581355:6726715:9603086</guid><description><![CDATA[<p>So it's that time again when I think&nbsp;I&nbsp;need a new PC. I have some big projects coming up and a need to run multiple VMs means this machine is going to have to be meaty. My requirements are something like:</p>
<ul>
<li>4, 6 or 8 cores of Intel's&nbsp;latest i7 processor</li>
<li>8, 12 or 16GB of memory</li>
<li>Some fast HDs, although as most of my storage will come from my iSCSI SAN, a <a href="http://www.qnap.com/pro_detail_feature.asp?p_id=146">QNAP TS-859</a> so these will be for the OS and possibly the VMs.</li>
<li>RAID controller as I would like the internal HDs to be mirrored for&nbsp;resilience</li>
<li>Dual&nbsp;Ethernet&nbsp;would also be useful as then the iSCSI SAN traffic can be offloaded rather than running on the same port as the network traffic.&nbsp;</li>
<li>I will also probably need a DVD/CD drive for getting software installed.</li>
<li>Although a graphics card and sound card are required these are not that important as this will not be used for Gaming or Sound production, so something fairly basic will be OK.&nbsp;</li>
<li>I would also like the machine to as small as possible, this means I need to decide on the importance of additional HDs and PCI cards, HDs shouldn't be an issue as most of the storage will be on the iSCSI SAN. PCI cards should also not be too much of an issue, I will need graphics, and possibly an HD controller, but probably not anything else.</li>
</ul>
<p>&nbsp;</p>
<p>So off to find some potential components.</p>]]></description><wfw:commentRss>http://www.astall.com/home/rss-comments-entry-9603086.xml</wfw:commentRss></item></channel></rss>
