| Install CollabNet SVN Command Line Client in Windows |
| Written by scmGalaxy Admin | |
|
Link: http://www.collab.net/downloads/subversion/ 1. Platform and configuration
Product: CollabNet Subversion server Certified platforms: Windows XP SP2, Win 2003(Standard Edition) R2 Apache version: 2.2.8 ViewVC: 1.0.5 (requires ActiveState Python 2.5) Repository format: fsfs (bdb support not included)
Prerequisite: The user needs administrative privileges to install and uninstall CollabNet Subversion.
2. IMPORTANT: Apache version upgraded from 2.0 to 2.2
With the CollabNet Subversion 1.5.0 release, we have upgraded the included Apache server version from 2.0 to 2.2. This is consistent with the packages we provide for other operating systems, and also upgrades our package to the best available version of Apache.
This is important to existing users because your current Apache 2.0 server configuration cannot be automatically updated to the format of the Apache 2.2 configuration file. If you allow the installer to upgrade your existing installation, it backs up your Apache conf, logs, and htdocs folders so that you can refer to your previous configuration when configuring your new server.
3. Installation tips
If you install an Apache server, the installer asks you for a “Repository URL.” This represents the prefix of the URL which users can use to connect to Subversion. If you set this URL to ‘/svn’, then users can checkout their repository from:
http://hostname/svn/repos-name
We recommend that you use ‘/svn’ as your URL prefix, as this is common practice.
4. ViewVC installation
Users of the Apache web server option can now also have ViewVC automatically installed and configured as part of the installation. You must have ActiveState’s ActivePython 2.5 installed before installing CollabNet Subversion. Download a free version of ActivePython from:
http://www.activestate.com/Products/activepython/index.mhtml
You must install version 2.5.x.
5. Upgrade procedure
When the installer detects a previous version, it offers to upgrade your existing installation. However, if you want to add ViewVC to your installation, we recommend you use the following process for an upgrade. In general, this is the best process for any upgrade scenario:
1. Stop Apache or Subversion Server services, if running. 2. Copy/back up any customizations that were done to your Apache installation. (For example, your httpd.conf file, a password database, any content you added to the htdocs folder, and so on.) 3. Uninstall the currently installed version. 4. Manually delete the existing folder if the installer did not remove it. The uninstall process does not remove files that were added or modified after installation. 5. Follow the normal install instructions for 1.5. 6. Manually put back your Apache customizations. NOTE: You cannot simply copy back the previous configuration file. You must make the appropriate edits to your new Apache 2.2 version of the configuration file.
6. Post-installation instructions
The installer created a folder to store your repositories. You are not required to use this folder, but if you let the installer install the server to run as a service, then the server has also been configured to serve repositories from this location. It is a good idea to use the location you specified in the installer.
A. Using svnserve ==============
To use svnserve as your server, follow these steps:
1. Open a new terminal (command prompt).
NOTE: If you have an old command prompt open (prior to the Subversion installation), remember to open a brand new command prompt.
2. Create a subversion repository.
cd <Repository_Path> svnadmin create <Repository_Name>
For example: cd \repositories svnadmin create my-first-repos
3. Setup a password database.
Using notepad, edit the svnserve.conf file inside the conf directory of your repository.
For example: If your repository is C:\repositories\my-first-repos svnserve.conf is: C:\repositories\my-first-repos\conf\svnserve.conf
Inside svnserve.conf, you see the following information:
### The password-db option controls the location of the password ### database file. Unless you specify a path starting with a /, ### the file’s location is relative to the conf directory. ### Uncomment the line below to use the default password file. #password-db = passwd
Follow the above instructions, and uncomment the “password-db=passwd” line, so that it simply says:
password-db = passwd
4. Setup usernames and passwords.
Next, edit the passwd file. This passwd file is located in the same directory as svnserve.conf.
Inside the passwd file, you see the following information:
### This file is an example password file for svnserve. ### Its format is similar to that of svnserve.conf. As shown in the ### example below it contains one section labelled [users]. ### The name and password for each user follow, one account per line.
[users] #harry = harryssecret #sally = sallyssecret
To add a new user account, add your own username and password inside the [users] section. For example, if your name is “joe”, and you want to set your password to “super-secret”, add a new line like this:
joe = super-secret
Add as many users as you like.
5. Open Port on Windows firewall.
Before starting the server, the firewall must be notified that this particular port is going to be used. To enable this port in the Windows firewall, follow the instructions found here:
http://www.microsoft.com/windowsxp/using/security/internet/sp2_wfexceptions.mspx
Note: svnserve.exe is the program name which needs to be added to the exceptions list. Alternatively, you can also use the port where you decide to run the server. By default, svnserve runs on 3690.
6. Start svnserve.
If you elected to have the installer setup svnserve as a service, then open the Services application, find the entry for the Subversion server, and take the Start option. The service has been configured to start automatically on reboot. You can also run this command from the command line:
net start svnserve
If you did not install svnserve as a service and want to start the server manually, run this command:
svnserve -d -r <Repository_Path>
For example: svnserve -d -r C:\repositories
7. To provide read and write access to anonymous users, modify the conf/svnserve.conf file inside the repository.
anon-access = write
To restrict an anonymous user from the repository:
anon-access = none
8. Check out the repository.
svn co svn://localhost/<Repository_Name>
For example: svn co svn://localhost/my-first-repos
Tip: If you check out your Subversion repository from a different computer, replace ‘localhost’ with the IP address or hostname of the machine which hosts the Subversion repository.
B. Using Apache ============
To use Apache as your server, follow these steps:
1. Configure Apache.
The installer did these steps automatically based on the repository location entered in the installer. This information is only presented if you want to manually modify the configuration.
Use notepad to edit the httpd.conf file inside the httpd\conf directory of your CollabNet Subversion Server installation.
Tip: By default, httpd.conf is in the following directory:
C:\Program Files\CollabNet Subversion Server\httpd\conf\httpd.conf
At the bottom of the httpd.conf file, you see a location directive that looks something like this:
<Location /svn> DAV svn SVNParentPath C:\repositories </Location>
Change the above section to look like the following:
<Location /svn> DAV svn SVNParentPath C:\repositories SVNListParentPath On Require valid-user AuthType Basic AuthName “Subversion repository” AuthUserFile C:\repositories\password-file </Location>
2. Open a new terminal (command prompt).
NOTE: If you have an old command prompt open (prior to the Subversion installation), remember to open a new command prompt.
3. Create Subversion users.
Now create usernames with passwords that can be used to authenticate with Apache. Use the htpasswd command to create usernames and passwords for the Apache server.
Type the following at the command prompt:
htpasswd -cm <password-file> <username>
This command prompts you for a password for the user. Enter the password and retype the password when prompted.
For example: If you want to create a user ‘joe’, and the file at “C:\repositories\password-file”, type the following at the command prompt:
htpasswd -cm C:\repositories\password-file joe
Enter the desired password for the user and retype the password when prompted.
For additional users, use the following command at the command prompt:
htpasswd -m C:\repositories\password-file joe
4. Create a Subversion repository.
svnadmin create <Repository_Path>\<Repository_Name>
For example: svnadmin create C:\repositories\my-first-repos
5. Open Port on Windows firewall.
Before starting the server, the firewall must be notified that this particular port is going to be used. To enable this port in the Windows firewall, follow the instructions found here:
http://www.microsoft.com/windowsxp/using/security/internet/sp2_wfexceptions.mspx
Note: apache.exe is the program name which you need add to the exceptions list. Alternatively, you can also use the port where you decide to run the server. By default, apache is run on 80.
6. Start Apache.
If you elected to have the installer set up Apache as a service, then open the Services application, find the entry for Apache/2, and take the Start option. The service was configured to start automatically on reboot. You can also run this command from the command line:
net start apache2
To start the server manually, run the following at the command prompt:
apache
7. Checkout the repository.
svn co http://localhost/svn/<Repository_Name>
For example: svn co http://localhost/svn/my-first-repos
Tip: If you check out your Subversion repository from a different computer, replace ‘localhost’ with the IP address or hostname of the machine which hosts the Subversion repository.
7. Known issues
When trying to access a repository via ViewVC, you might see an error trace that ends with this message:
ImportError: DLL load failed with error code 182
This error occurs when you have an older version of the OpenSSL DLLs in your PATH ahead of the CollabNet Subversion bin folder. Many Windows applications ship the OpenSSL DLLs and many of them also use older versions. To fix this problem:
1. Edit your PATH so that the CollabNet Subversion bin folder is at or near the beginning of your PATH. 2. Reboot so that your Apache service can pick up the change.
8. Back-end support
If you try to access an existing BDB (Berkeley DB) based repository through CollabNet Subversion, then you might receive an alert “Failed to load module for FS type ‘bdb’.” This is because CollabNet Subversion does not support BDB. CollabNet recommends FSFS over BDB for ease of maintenance and supportability.
9. Support for CollabNet Subversion
Find out about CollabNet Technical Support at http://www.collab.net/services/subversion/
Information about CollabNet Training, Consulting, and Migration services is at http://www.collab.net/services/subversion/training.html
Join openCollabNet for community support: http://open.collab.net
10 About Subversion and CollabNet
CollabNet launched the Subversion project in 2000 in response to the demand for an open standard for Web-based software configuration management that could support distributed development. CollabNet continues to be strongly involved with the Subversion project and offers CollabNet Subversion Support, Training, and Consulting services.
CollabNet also provides the most widely used collaborative development environment in the world. More than 1,400,000 developers and IT projects managers collaborate online through CollabNet. The company is transforming the way software is developed by enabling organizations to leverage global development talents to deliver better products and innovate faster.
Visit CollabNet at http://www.collab.net for more information.
|





