<?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>itsMine &#187; HOWTO</title>
	<atom:link href="http://blog.itsmine.co.uk/tag/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.itsmine.co.uk</link>
	<description></description>
	<lastBuildDate>Sun, 18 Apr 2010 02:28:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<atom:link rel="next" href="http://blog.itsmine.co.uk/tag/howto/feed/?page=2" />

		<item>
		<title>HOWTO: OVH Kimsufi + CentOS + VMware Server 2 + networking</title>
		<link>http://blog.itsmine.co.uk/2009/09/07/howto-ovh-kimsufi-centos-vmware-server-2-networking/</link>
		<comments>http://blog.itsmine.co.uk/2009/09/07/howto-ovh-kimsufi-centos-vmware-server-2-networking/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 00:30:51 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[OVH]]></category>

		<guid isPermaLink="false">http://blog.itsmine.co.uk/?p=728</guid>
		<description><![CDATA[This will take you through the installation and configuration of an authentic CentOS install running on an OVH Kimsufi server, allowing you to run VMware Server 2 with routed networking, since bridged networking is not possible on OVH servers. First off, some groundrules for this HOWTO we need to distinguish a few things&#8230; At time ]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">This will take you through the installation and configuration of an authentic CentOS install running on an OVH Kimsufi server, allowing you to run VMware Server 2 with routed networking, since bridged networking is not possible on OVH servers. First off, some groundrules for this HOWTO we need to distinguish a few things&#8230;</p>
<blockquote>
<p style="text-align: justify;">At time of writing, on a standard Kimsufi, OVH provide you with one static IP, and three &#8220;failover IP&#8217;s&#8221; these &#8220;failover&#8221; IP&#8217;s are just normal IP&#8217;s, although they don&#8217;t  have their own gateway (since only the host machine is allowed to use the gateway). The only thing that&#8217;s different about these &#8220;failover&#8221; IP&#8217;s is that if you have more than one Kimsufi or dedicated server with OVH then you can simply change which server the failover IP is routed to, which is quite handy for DR (disaster recovery) or even load balancing.</p>
</blockquote>
<p style="text-align: justify;">Let&#8217;s get started, first, you need to set up your server with the default CentOS image that is provided by OVH (this may already be the case if you requested this image when you ordered), if not, this is done by selecting your server from the dropdown box at the top of the manager screen, then clicking on &#8220;Services&#8221; beneath the &#8220;Dedicated servers&#8221; menu on the left-hand side. While in this menu,  ensure that &#8220;Netboot&#8221; is set to &#8220;hd&#8221; so that the boot process is kicked to the hard disk and not OVH&#8217;s custom kernels. Next, choose &#8220;Reinstall / Change OS&#8221; and follow the steps here to install CentOS, the partitioning doesn&#8217;t really matter, where possible just choose the default options and continue through the steps until the installation process starts.</p>
<p style="text-align: justify;">The installation process will continue and wipe your server clean and replace it with OVH&#8217;s CentOS image (which I might add, isn&#8217;t a <em>TRUE </em>CentOS kernel, as provided by the CentOS project). Once you&#8217;ve received your email from OVH confirming that the reinstall is complete and have got your new root password, log into the server via SSH. When you have a prompt, type the following commands:</p>
<pre class="brush: bash;">mkdir /cleaninstall
cd /cleaninstall</pre>
<p>For 32-bit CentOS:</p>
<pre class="brush: bash;">wget http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/images/pxeboot/initrd.img
wget http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/images/pxeboot/vmlinuz</pre>
<p>For 64-bit CentOS:</p>
<pre class="brush: bash;">wget http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/images/pxeboot/initrd.img
wget http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/images/pxeboot/vmlinuz</pre>
<p>Then copy the pxe boot files to the /boot partition</p>
<pre class="brush: bash;">cp vmlinuz /boot/vmlinuz.cent.pxe
cp initrd.img /boot/initrd.img.cent.pxe</pre>
<p>Next we need to set up the GRUB bootloader:</p>
<pre class="brush: bash;">yum install grub</pre>
<p>Empty the bootloader sequence and insert our new config:</p>
<pre class="brush: bash;">cat /dev/null &gt; /boot/grub/menu.lst
vi /boot/grub/menu.lst</pre>
<p>Paste the below text in this file amending the following variables to suit your info:<br />
YOURPASSWORD = A password of your choosing, this is a a temporary password and is only used during the installation via VNC<br />
IPADDR = The IP address of your OVH server (host)<br />
GATEWAY = The gateway IP address of your OVH server (find this by doing: # netstat -r | grep default)</p>
<p>For 32-bit CentOS:</p>
<pre class="brush: plain;">default 0
timeout 30
title Centos Install (PXE)
        root (hd0,0)
        kernel /boot/vmlinuz.cent.pxe vnc vncpassword=YOURPASSWORD headless ip=IPADDR netmask=255.255.255.0 gateway=GATEWAY dns=213.186.33.99 ksdevice=eth0 method=http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/ lang=en_US keymap=us
        initrd /boot/initrd.img.cent.pxe
</pre>
<p>For 64-bit CentOS:</p>
<pre class="brush: plain;">default 0
timeout 30
title Centos Install (PXE)
        root (hd0,0)
        kernel /boot/vmlinuz.cent.pxe vnc vncpassword=YOURPASSWORD headless ip=IPADDR netmask=255.255.255.0 gateway=GATEWAY dns=213.186.33.99 ksdevice=eth0 method=http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/ lang=en_US keymap=us
        initrd /boot/initrd.img.cent.pxe
</pre>
<p>Save the file (in this sequence hit Escape, colon (:), x, Enter)</p>
<p>Next we need to install GRUB into the MBR of the server disk so&#8230;</p>
<pre class="brush: bash;">grub-install /dev/sda
grub-install --recheck /dev/sda</pre>
<p>Once that&#8217;s done, we need to bounce the box:</p>
<pre class="brush: bash;">shutdown -r now</pre>
<p style="text-align: justify;">Wait a couple of minutes for the server to come back online (you can monitor it using ping requests). Once the server is contactable again fire up a VNC client and in the connection box type in the IP address of your server followed by &#8220;:1&#8243;, for example, if your IP was 192.168.0.5, the VNC connection box will read 192.168.0.5:1</p>
<p style="text-align: justify;">Enter the password you specified as  and you will be presented a VNC window at the first step of the CentOS installation screen. Follow the installer (make sure you leave the network options alone &#8211; for now at least). After the installation completes and reboots, you now have a PROPER CentOS installation free from OVH&#8217;s meddling hands.</p>
<p style="text-align: justify;">Install VMWare Server 2 as you would normally on CentOS, there are tons of HOWTO&#8217;s out there on that subject I&#8217;m sure. One thing I will say about installing VMWare Server 2 is that when asked about configuring a bridged network interface, to be honest, I wouldn&#8217;t configure one, you&#8217;ll only need NAT and Host-Only networking. To configure a Bridged interface just invites a headache of having your switch-port blocked if you ever switch on a guest VM which tries to make use of it &#8211; which can be very frustrating and WILL cause an interruption to service while OVH sort out unblocking your MAC address from their network.</p>
<p style="text-align: justify;">So, once we&#8217;ve got VMware Server 2 installed and running, we need to set up the networking so that the &#8220;failover IPs&#8221; can be used for the virtual guests. We&#8217;re going to be doing this using routed IP&#8217;s as it&#8217;s the simplest way, without having to involve NAT&#8217;ing (ugly).</p>
<p style="text-align: justify;">We&#8217;ll start off by configuring the host machine to allow proxied arp requests on the VMware host-only interface, which in this case is the &#8220;vmnet1&#8243; device &#8211; this is the default interface name that VMware Server creates, however if yours is different you&#8217;ll need to amend the below steps accordingly (this is only if you&#8217;ve had a non-standard VMware install).</p>
<pre class="brush: bash;">echo &quot;net.ipv4.conf.vmnet1.proxy_arp=1&quot; &gt;&gt; /etc/sysctl.conf &amp;&amp; sysctl -p</pre>
<p>Next on the host, we have to create a static route to allow traffic to flow to the &#8220;failover IP&#8217;s&#8221;</p>
<p>IPFAILOVER is to be subsituted with one of your failover IP&#8217;s. e.g 10.0.0.11</p>
<pre class="brush: bash;">ip route add IPFAILOVER dev vmnet1</pre>
<p style="text-align: justify;">A line like the one above is required for each failover IP which you&#8217;ll be routing.</p>
<p style="text-align: justify;">
<p style="text-align: justify;">This would not survive a reboot (bad) so we have to do something a little more inventive&#8230;<br />
We need to create a network config file in the /etc/sysconfig/network-scripts folder to set up the interface dynamically, since VMware doesn&#8217;t actually configure the interface using the standard method. In short, we need a config file to set up the interface so that CentOS is &#8220;aware&#8221; of it, and then we also need to create a route file for the interface too to set up the routing for the interface at boot.</p>
<p style="text-align: justify;">So&#8230;<br />
First off we need to find out what interface subnet the vmware installer picked to use for the vmnet1 interface on the host server, so do a</p>
<pre class="brush: bash;">ifconfig vmnet1 | grep &quot;inet addr&quot;</pre>
<p>From the output of the above command, use the &#8220;inet addr:&#8221; address for the IPADDR= and use the &#8220;Mask:&#8221; for the NETMASK=</p>
<p>Create and populate the /etc/sysconfig/network-scripts/ifcfg-vmnet1 file with the below info:</p>
<pre class="brush: bash;">vi /etc/sysconfig/network-scripts/ifcfg-vmnet1</pre>
<pre class="brush: plain;">DEVICE=vmnet1
IPADDR=*.*.*.*
NETMASK=*.*.*.*
ONBOOT=yes</pre>
<p style="text-align: justify;">Now that CentOS is aware of that network interface, the routing config to the VM&#8217;s fail-over IP needs to go into /etc/sysconfig/network-scripts/route-vmnet1 which is done by:</p>
<pre class="brush: bash;">vi /etc/sysconfig/network-scripts/route-vmnet1</pre>
<pre class="brush: plain;">IPFAILOVER dev vmnet1</pre>
<p style="text-align: justify;">A new line like the one above is required for each failover IP which you&#8217;ll be routing.</p>
<p style="text-align: justify;">
<p style="text-align: justify;">Now, unfortunately, that doesn&#8217;t solve all our problems because VMware server starts up <em>after</em> the networking service and thus <em>after</em> the virtual device is created. So we need a way to restart the networking service after VMware has started. The quickest and dirtiest way of doing that is by putting something in /etc/rc.local which will do the job. I hated having to do this, purely because it&#8217;s not &#8220;kosher&#8221; with the distro, and in general bad practise, but needs must&#8230;</p>
<pre class="brush: bash;">echo &quot;/sbin/service network restart &amp;&gt; /tmp/network-restart&quot; &gt;&gt; /etc/rc.local</pre>
<p style="text-align: justify;">Ok, so now we need to allow traffic through to the virtual machines. This is done using the iptables kernel module on the host machine (or can be done on the guest so long as there&#8217;s a rule on the host allowing all traffic through to that failover IP). Generally speaking, I like to keep my firewall rules in one place for ease of management, and that&#8217;s on the host. So, we&#8217;ll open up the iptables config file (or use my script to make it easier):</p>
<pre class="brush: bash;">vim /etc/sysconfig/iptables</pre>
<p>Find the line:</p>
<pre class="brush: plain;">-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 1194 -j ACCEPT</pre>
<p style="text-align: justify;">and insert this line below it subsituting where necessary (below example is allowing port 22 (ssh) access through to this failover IP):</p>
<pre class="brush: plain;">-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -d FAILOVERIP -j ACCEPT</pre>
<p style="text-align: justify;">As above, a new line (rule) like the one above is required for each failover IP which you&#8217;ll be routing.</p>
<p style="text-align: justify;">As far as the server, or rather, host side is concerned, we&#8217;re finished. Now we just need to configure the guest OS with the failover IP address (or addresses if you so choose). The virtual machine should be configured to use the following:</p>
<p style="text-align: justify;">Linux hosts:<br />
IP= FAILOVERIP<br />
NETMASK=255.255.255.255<br />
GATEWAY= FAILOVERIP (yes it&#8217;s the same as the interface IP)</p>
<p style="text-align: justify;">Windows hosts:<br />
IP= FAILOVERIP<br />
NETMASK=255.255.255.248<br />
GATEWAY= FAILOVERIP (yes it&#8217;s the same as the interface IP)</p>
<p style="text-align: justify;">The DNS nameservers can be set anything you wish to use, so long as they&#8217;re addressable and accessible by the VM&#8217;s. I tend to use <a href="http://www.opendns.com/" target="_blank">OpenDNS</a>&#8216;s servers unless I&#8217;m using my own.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.itsmine.co.uk/2009/09/07/howto-ovh-kimsufi-centos-vmware-server-2-networking/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>HOWTO: Install Subversion, Ruby on Rails and Redmine on CentOS5 (&amp; RHEL5)</title>
		<link>http://blog.itsmine.co.uk/2009/01/22/howto-install-subversion-and-redmine-on-centos5-rhel5/</link>
		<comments>http://blog.itsmine.co.uk/2009/01/22/howto-install-subversion-and-redmine-on-centos5-rhel5/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 10:26:05 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[redmine]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://blog.itsmine.co.uk/?p=400</guid>
		<description><![CDATA[[Update 17th Sept 2009] I&#8217;ve just noticed that Redmine version 0.8.5 was released last week, while this HOWTO should still be valid, I have not yet tested it so please report any issues you experience with new installs in the comments and I&#8217;ll look into them and amend the HOWTO where necessary [Updated 3rd June ]]></description>
			<content:encoded><![CDATA[<p>[Update 17th Sept 2009]</p>
<p>I&#8217;ve just noticed that Redmine version 0.8.5 was released last week, while this HOWTO should still be valid, I have not yet tested it so please report any issues you experience with new installs in the comments and I&#8217;ll look into them and amend the HOWTO where necessary <img src='http://blog.itsmine.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="color: #800080;">[Updated 3rd June 2009]</span></p>
<p>So since <a href="http://www.assembla.com" target="_blank">Assembla</a> changed it&#8217;s strategy and forced  a monetised service or your once private projects were to become public after some date in February I decided to set up my own subversion repos / web management interface.</p>
<p>I never really used the Assembla service to its full potential however and all I really needed was a basic SVN setup with a webinterface to show the diffs in an eye-friendly format. The only two real choices were <a href="http://www.google.co.uk/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Ftrac.edgewall.org%2F&amp;ei=c0d4SaDRK4mt-gbM_YHYDw&amp;usg=AFQjCNFj9e7EQBej7FOQLMErR3QOrAtShQ&amp;sig2=Qz479KBdRN6dyreAtLtvXg" target="_blank">Trac</a> and <a href="http://www.google.co.uk/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fwww.redmine.org%2F&amp;ei=jkd4ScX5IJKj-gbhy5nbDw&amp;usg=AFQjCNFdhje3wlQXAFvw07HLWK7lIeOIoA&amp;sig2=9hb9qskm7LLklrNLQPoMpw" target="_blank">Redmine</a>. I&#8217;d already used Trac on Assembla and countless other project sites so I was more drawn to Redmine due to it&#8217;s good interface design (imo, the Trac interface looks like it&#8217;s stuck together with Lego pieces), its features are more integrated and well, I fancied a change. The only problem was that Redmine runs on <a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a> which I&#8217;ve heard very bad things about. So I decided to take a plunge and find out wtf the hassle was all about. It turns out there weren&#8217;t any up-to-date, well written and well maintained HOWTO&#8217;s out there detailing how to get a functional RoR environment configured on CentOS / RHEL. So I wrote my own (after hitting several brick walls)&#8230;</p>
<h3>HOWTO: Install Subversion, Ruby on Rails and Redmine on CentOS5 (&amp; RHEL5)</h3>
<p>NOTES</p>
<ul>
<li>This HOWTO is written for CentOS 5.2 [updates for 5.3 in <span style="color: #800080;">purple text</span>]</li>
<li>Replace [FQDN] with either your IP address or the hostname (or FQDN) which you’ll be using to access the interface.</li>
<li>Replace [user] with the username under whom&#8217;s home directory the Subversion repository database will be located. e.g. /home/[user]/svn-repos</li>
</ul>
<ul>
<li>This HOWTO will be using the following variables:</li>
</ul>
<blockquote>
<ul>
<li>You already have the &#8220;httpd&#8221; (apache) package installed</li>
<li>You will be running apache as the user ‘apache’</li>
<li>The subversion repository root folder will be under /home/[user]/subversion/</li>
<li>The vhost&#8217;s folder locationg will be /var/www/svn</li>
<li>The subversion repository to be created will be called ‘example-repo’</li>
</ul>
</blockquote>
<p>Install and set up Subversion</p>
<pre class="brush: bash;">yum install mod_dav_svn subversion</pre>
<p>Add the group [user] to the user apache and make the subversion base URL readable and writable&#8230;</p>
<pre class="brush: bash;">usermod -aG [user] apache
chmod g+x /home/[user]
mkdir /home/[user]/subversion
chmod g+rwx /home/[user]/subversion
chown -R [user]:[user] /home/[user]/subversion</pre>
<p>Make the web directory:</p>
<pre class="brush: bash;">mkdir /var/www/svn
chown apache.apache /var/www/svn</pre>
<p>Put the following into /etc/httpd/conf.d/svn.conf (this is for a sub-repo called &#8216;example-repo&#8217;)</p>
<pre class="brush: plain;">NameVirtualHost *:80
&lt;VirtualHost *:80&gt;
        DocumentRoot &quot;/var/www/svn&quot;
        ServerName [FQDN]
        &lt;Location /example-repo&gt;
                DAV svn
                SVNPath /home/[user]/subversion/example-repo
                AuthType Basic
                AuthName &quot;Subversion repo&quot;
                AuthUserFile /var/www/passwd
                Require valid-user
        &lt;/Location&gt;

        &lt;Directory &quot;/var/www/svn&quot;&gt;
        allow from all
        Options +Indexes
        &lt;/Directory&gt;
&lt;/VirtualHost&gt;</pre>
<p>Add an HTTP auth user&#8230;</p>
<pre class="brush: bash;">htpasswd -cm /var/www/passwd [user]</pre>
<p>Create a proper SVN repository</p>
<pre class="brush: bash;">cd /home/[user]/subversion
su [user] -c &quot;svnadmin create example-repo&quot;</pre>
<p>Import any SVN repos by doing:</p>
<pre class="brush: bash;">su [user] -c &quot;svnadmin load example-repo &lt; /path/to/repo/dump/file&quot;</pre>
<p>Make sure the permissions are correct</p>
<pre class="brush: bash;">chmod g+rwx /home/[user]/subversion
chown -R [user].[user] /home/[user]</pre>
<p><strong><ins>Install Ruby on Rails</ins></strong></p>
<p>*NOTE: Ruby on Rails installation requires the EPEL yum repository (at time of writing).</p>
<pre class="brush: bash;">su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'</pre>
<p>Let&#8217;s get Ruby up and running first&#8230; [NOTE: not on an SElinux environment cba with that]</p>
<pre class="brush: bash;">yum install httpd httpd-devel apr make gcc-c++ mysql-server mysql ruby ruby-devel ruby-docs ruby-ri \
ruby-libs ruby-mode ruby-tcltk ruby-irb ruby-rdoc fcgi fcgi-devel mod_fcgid rubygems subversion-ruby</pre>
<p>Now we&#8217;ll install passenger (aka mod_rails)</p>
<pre class="brush: bash;">gem install passenger
passenger-install-apache2-module</pre>
<p>Create and insert this text into /etc/httpd/conf.d/rails.conf (or alternatively edit the existing svn.conf created when we set up subversion)<br />
NOTE:</p>
<ul>
<li>The below configuration is specific to the installation of redmine (hence the DocumentRoot)</li>
</ul>
<pre class="brush: plain;">LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.6
   PassengerRuby /usr/bin/ruby

NameVirtualHost *:80

   &lt;VirtualHost *:80&gt;
     ServerName 192.168.10.17
     DocumentRoot /var/www/rails/redmine/public
   &lt;/VirtualHost&gt;</pre>
<p><strong><ins>Now on to Redmine itself</ins></strong></p>
<p>Get Redmine 0.8 from <a class="external" href="http://www.redmine.org/wiki/redmine/Download">http://www.redmine.org/wiki/redmine/Download</a></p>
<pre class="brush: bash;">cd /usr/src
svn co http://redmine.rubyforge.org/svn/branches/0.8-stable redmine-0.8
mkdir /var/www/rails/
cd /var/www/rails/
cp -r /usr/src/redmine-0.8/ redmine/
chown -R apache.apache redmine
cd redmine</pre>
<p>Create a clean backup of source files</p>
<pre class="brush: bash;">tar czf Redmine0.8-clean.tar.gz .</pre>
<p>Initialise mySQL:</p>
<pre class="brush: bash;">service mysqld start</pre>
<p>To secure mysql:</p>
<pre class="brush: bash;">mysql_secure_installation</pre>
<p>Create a mysql database for redmine&#8230;</p>
<pre class="brush: bash;">mysql -u[username] -p</pre>
<p>At the prompt enter:</p>
<pre class="brush: bash;">create database redmine character set utf8;</pre>
<p>Quit with:</p>
<pre class="brush: bash;">quit</pre>
<p>Copy the example database file to the &#8220;live&#8221; location</p>
<pre class="brush: bash;">cd /var/www/rails/redmine
cp config/database.yml.example config/database.yml</pre>
<p>Enter the appropriate settings for the [production] section ensuring that host is set to 127.0.0.1</p>
<pre class="brush: bash;">vim /var/www/rails/redmine/config/database.yml</pre>
<p>Set up email</p>
<pre class="brush: bash;">cd /var/www/rails/redmine
cp config/email.yml.example config/email.yml</pre>
<p>Enter the appropriate settings for the [production] section ensuring that &#8220;address&#8221; is set to the <strong>IP address</strong> of the SMTP host</p>
<pre class="brush: bash;">vim /var/www/rails/redmine/config/email.yml</pre>
<p>Install rails for redmine using gem&#8230;</p>
<pre class="brush: bash;">cd /var/www/rails/redmine/app/
gem install -v=2.1.2 rails</pre>
<p>Import the redmine database into the live database specified in the above config file</p>
<pre class="brush: bash;">cd /var/www/rails/redmine/app/
rake db:migrate RAILS_ENV=&quot;production&quot;</pre>
<p>Install default configuration data in database (this is entirely optional, but recommended).</p>
<pre class="brush: bash;">cd /var/www/rails/redmine/app/
rake redmine:load_default_data RAILS_ENV=&quot;production&quot;</pre>
<p>Bring up the testing webserver, once loaded check your config by browsing to <a class="external" href="http://%5bfqdn%5d:3000/">http://[FQDN]:3000</a></p>
<pre class="brush: bash;">cd /var/www/rails/redmine/
ruby script/server -e production</pre>
<p>Make sure your apache config file edits are ok and that the services will start at boot by doing:</p>
<pre class="brush: bash;">service httpd configtest
service httpd restart
chkconfig httpd on
chkconfig mysqld on</pre>
<p>[Optional:] Add the following to your crontab which will create a database backup in the /home/[user] directory</p>
<pre class="brush: bash;">/usr/bin/mysqldump -u &lt;user&gt; -p &lt;password&gt; &lt;database&gt; | gzip &gt; /home/[user]/redmine_`date +%y_%m_%d`.gz</pre>
<p><span style="color: #800080;">Make your subversion server configuration accessible to redmine by doing the following:</span></p>
<pre class="brush: bash;">mkdir /etc/subversion
cp -r /root/.subversion/* /etc/subversion/
vim /var/www/rails/redmine/lib/redmine/scm/adapters/subversion_adapter.rb</pre>
<p><span style="color: #800080;">Change the line:</span></p>
<pre class="brush: bash;">SVN_BIN = &quot;svn&quot;</pre>
<p><span style="color: #800080;">to:</span></p>
<pre class="brush: bash;">SVN_BIN = &quot;svn --config-dir /etc/subversion&quot;</pre>
<p><span style="color: #800080;">Then restart apache:</span></p>
<pre class="brush: bash;">service httpd restart</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.itsmine.co.uk/2009/01/22/howto-install-subversion-and-redmine-on-centos5-rhel5/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Dropbox + eXtplorer: A better web interface</title>
		<link>http://blog.itsmine.co.uk/2009/01/20/dropbox-extplorer-a-better-web-interface/</link>
		<comments>http://blog.itsmine.co.uk/2009/01/20/dropbox-extplorer-a-better-web-interface/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 00:25:18 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Dropbox]]></category>
		<category><![CDATA[extplorer]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Red Hat]]></category>

		<guid isPermaLink="false">http://blog.itsmine.co.uk/?p=383</guid>
		<description><![CDATA[<script type="text/javascript" src="http://blog.itsmine.co.uk/wp-includes/js/jquery/jquery.js"></script><script type="text/javascript" src="http://blog.itsmine.co.uk/wp-content/plugins/pb-embedflash/js/sbadapter/shadowbox-jquery.js"></script><script type="text/javascript" src="http://blog.itsmine.co.uk/wp-content/plugins/pb-embedflash/js/shadowbox.js"></script><script type="text/javascript"><!--
window.onload = function() {var options ={assetURL:'',loadingImage:'http://blog.itsmine.co.uk/wp-content/plugins/pb-embedflash/css/images/loading.gif',flvPlayer:'http://blog.itsmine.co.uk/wp-content/plugins/pb-embedflash/swf/mediaplayer.swf',animate:true,animSequence:'wh',overlayColor:'#000',overlayOpacity:0.85,overlayBgImage:'http://blog.itsmine.co.uk/wp-content/plugins/pb-embedflash/css/images/overlay-85.png',listenOverlay:true,autoplayMovies:true,showMovieControls:true,resizeDuration:0.35,fadeDuration:0.35,displayNav:true,continuous:false,displayCounter:true,counterType:'default',viewportPadding:20,handleLgImages:'resize',initialHeight:160,initialWidth:320,enableKeys:true,keysClose:['c', 'q', 27],keysPrev:['p', 37],keysNext:['n', 39],handleUnsupported:'',text: {cancel:'Cancel',loading: 'loading',close:'<span class="shortcut">C</span>lose',next:'<span class="shortcut">N</span>ext',prev:'<span class="shortcut">P</span>revious',errors:{single: 'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared: 'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either: 'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}}};Shadowbox.init(options);}
--></script>Ok, so I found myself online at a workstation without admin access the other day and needed desperately to edit a file on my Dropbox account, it was just a plain text file and the edit was only small, so I set about finding a way of doing it, and came up with this as ]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Ok, so I found myself online at a workstation without admin access the other day and needed desperately to edit a file on my Dropbox account, it was just a plain text file and the edit was only small, so I set about finding a way of doing it, and came up with this as a temporary solution until Dropbox have a fully functional, released API&#8230;</p>
<p style="text-align: center;"><small>(Please open the article to see the flash file or player.)</small></p>
<p>P.S. The error was actually caused by a non-standard character in the filename (+). I&#8217;ll be filing a bug with eXtplorer for that <img src='http://blog.itsmine.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: left;">Documentation (Wiki) can also be found <a href="http://svn.bemail.co.uk/wiki/public-code/HOWTO-Dropbox-Apache-and-eXtplorer" target="_blank">here</a>.</p>
<p style="text-align: left;">
<p><strong>NOTE: Replace <em>[user]</em> with the username under which the Dropbox folder is located.<br />
NOTE: Replace <em>[FQDN]</em> with either your IP address or the hostname (or FQDN) which you&#8217;ll be using to access the interface.</strong></p>
<p><strong>NOTE: This HOWTO assumes that you will be running apache as the user &#8216;apache&#8217; and that you have already set up your Dropbox account syncing to your /home/[user]/Dropbox folder</strong></p>
<p>To get Dropbox running with apache and extplorer you need to get the following packages:</p>
<pre>yum install php httpd</pre>
<p>Make the VirtualHost director and get permissions / groups correct:</p>
<pre>mkdir /var/www/dropbox
chown apache:apache /var/www/dropbox
usermod -aG [user] apache
usermod -aG apache [user]</pre>
<p>Now create and populate an apache virtualhost config file:</p>
<pre>vim /etc/httpd/conf.d/dropbox.conf</pre>
<p>Populate it with the following text:</p>
<pre>NameVirtualHost *:80
    &lt;VirtualHost *:80&gt;
        DocumentRoot "/var/www/dropbox"
        ServerName [FQDN]
        &lt;Directory "/var/www/dropbox"&gt;
            allow from all
            Options +Indexes
            AuthType Basic
            AuthName "Dropbox"
            AuthUserFile /var/www/passwd
            Require valid-user
        &lt;/Directory&gt;
    &lt;/VirtualHost&gt;</pre>
<p>Now add a username / password to access your interface via HTTP auth:</p>
<pre>htpasswd -cm /var/www/passwd yourusername
chown apache.apache /var/www/passwd</pre>
<p>Make sure that apache has full group access to your Dropbox folder.</p>
<pre>chmod g+x /home/[user]
chmod g+rw /home/[user]/Dropbox
find /home/[user]/Dropbox -type d -exec chmod g+x {} ;</pre>
<p>Download the latest version of eXtplorer from <a class="external" href="http://extplorer.sourceforge.net/">http://extplorer.sourceforge.net/</a></p>
<pre>cd /var/www/dropbox
wget http://heanet.dl.sourceforge.net/sourceforge/extplorer/eXtplorer_2.0.1.zip
unzip eXtplorer*.zip</pre>
<p>Check we haven&#8217;t made any mistakes and set the services up:</p>
<pre>service httpd configtest
service httpd restart
chkconfig httpd on</pre>
<p>You can now log into http://[FQDN] using a browser and the default credentials (admin/admin) and set up your user, pointing the user&#8217;s &#8220;Home directory:&#8221; at /home/[user]Dropbox. Once you have set up your user you have the choice to remove the HTTP authentication which we included in the VirtualHost configuration above. Simply comment out (or delete) the following lines from your /etc/httpd/conf.d/dropbox.conf file:</p>
<pre>AuthType Basic
AuthName "Dropbox"
AuthUserFile /var/www/passwd
Require valid-user</pre>
<p>That&#8217;s it, you&#8217;re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.itsmine.co.uk/2009/01/20/dropbox-extplorer-a-better-web-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
