Wednesday, October 18, 2006

Installing Bugzilla on a Windows XP computer already running Apache and MySQL

The complete expalnation I followed is here.

The first task was to verify that I can run another instance of Apache on a different port and can configure this instance to run as a Windows service.
This process is described here.
I copied httpd.conf file with the name "httpd_for_bugzill.conf" and have made the changes recommended in the article above.
Then I open a cmd window and typed:
apache -k install -n "Apache for Bugzilla" -f "C:/Program Files/Apache Group/Apache2/conf/httpd_for_bugzilla.conf"
This installed the new windows serivice "Apache for Bugzilla" which uses "httpd_for_bugzilla.conf" file.
Then I went ot "Control Panel/Administartive Tools/Services" and selected "Apache for Bugzilla" -> Start to start the new Win service.
I downloaded latest stable Bugzilla release from http://www.bugzilla.org/download and I have uncompressed the .tar.gz archive.
The rest of the installation was quite straight forward, probably excluding the fact that some Perl modules described in the installation guide above where not found by the Perl packages management utility (e.g. GD package), so I did not install them
The tricky thing was an email configuration, but I finished that quite fast since fortunately we have a configured SMTP server.

Wednesday, October 11, 2006

Subversion installation on Windows

My target was to set up a SVN service for a distributed teamwork with multiple Java projects (Eclipse). SVN can be served by Apache or by a dedicated "svnserve" service. I decided to focus on SVN configuration with svnserve. The latest can also run over SSH protocol.

It seems that there is a lot of information in the net how to get SVN up an running on Windows, but not all of it is correct and in my experience it took me considerable amount of time to get everything working. I am putting here my own experience trying to be as precise as I can, mostly for myself, if I will need to do it again sometime later.
First, I got the Subversion Windows binaries. I picked up the latest v1.4.0 here: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 - the "...setup.exe" file.
I run the setup on my local computer and got the Subversion installed there.
Now I needed to create a repository and run the service. I downloaded TortoiseSVN client http://tortoisesvn.net/downloads, installed and run it. I has created an empty directory "C:/usr/home/david/Development/svn" and used TortoiseSVN to create a SVN repository there.
Then I took care of the client side.I got Subclipse SVN plug-in for Eclipse pointing Eclipse to the subclipse web site- details are here: http://subclipse.tigris.org/install.html
.The tricky part was the local repository URL. The correct URL looks like this: file:///C:/usr/home/david/Development/svn
Note 3 slashes after "file:" and the disk drive name ("C:") inside. It took me some time to configure out that this is the correct URL format, since some sources on the Internet tell you that you have to remove the drive name (and you do not).
Now, I needed to run svnserve, preferable as a Windows service. I did it using Microsoft "sc.exe" utility, which I believe is a part of WinXP - at least I did not install any resource kit or whatever to get it. I just has opened the "cmd" window and typed "sc" and it was there. More details on that can be found here: http://svn.collab.net/repos/svn/tags/1.4.0/notes/windows-service.txt

The command to define a new service looks like this:
sc create SvnServe binPath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service -r C:\usr\home\david\Development\svn --listen-port 7401" displayname= "Subversion Service" depend= Tcpip
This command defines C:\usr\home\david\Development\svn as a root repository and port 1234 as a SVN port.
Note that command options are followed inmediately by "=" sign and then space - the commands works this way only! :-O

The next step was to run the service:
sc start SvnServe
Then I went to Control Panel/Administrative Tools/Services and changed service from "Manual" start-up mode to "Automatic".
This completed the service installation on my local machine.

On the client side, when I finally entered the correct URL, the Subclipse told me that the created repository revision is 5, while the expected repository revision is 3. It seems that Eclipse did not install the latest SVN client binaries.
This note http://subclipse.tigris.org/servlets/ReadMsg?listName=users&msgNo=7969
confirmed that I need to update the Subclipse by replacing one of the Subclipse dlls with the new one. I got the new dll here http://subversion.tigris.org/downloads/svn-win32-1.4.0_javahl.zip and overwrited the old one.
After the dll replacement (you have to exit Eclipse first) Subclipse strated to work on my local machine with the local repository.
Now I started the installation on the remote server following the steps described above. I installed and run SVN, TortoiseSVN, created a new repository and defined the svnserve as a Windows service.

However, when I tried to commit a test project to the freshly installed remote SVN repository the Subclipse refused saying something about Authorization.

To get it work I needed to make changes in conf\svnserve.conf file on a remote server. This article http://donie.homeip.net:8080/pebble/Steve/2006/02/27/1141079943879.html describes this in more details.

I wanted to provided the access only to the named users, so I denied the anonymous access to the repositry:
##### NO ANONYMOUS ACCESS!
anon-access = none


and allowed the authorized read/write
auth-access = write

I also pointed to the passowrds DB in the configuration file:
password-db = passwd.txt

And has created "passwd.txt" in the same conf directory.
The "passwd.txt" format is simple:
[users]
name1=password1
name2=password2


Both name and password are in clear text.
Then I restarted the Windows service I created and hitted "refresh" in my local Eclipse SVN repository view. This time I was asked for the user name and password to access the repository. When I provided my user credntials, I was able to commit/update my work to the remote SVN server.