Since all my code is stored in Subversion, which is currently installed on Windows Home Server, I had to check how to install a Subversion server on Amahi server and how to migrate all my repositories there. The installation is pretty straight forward, everything is done form command line.
1. Install subversion:
yum install subversion
2. For some reason SQLite was outdated for me, so verify that you have the latest version:
yum update sqlite
3. Create a root folder for all your repositories. It can be any name and any location. I choose to add a root folder named "svnrepos":
mkdir /svnrepos
4. Now create a repository. I called it "main":
svnadmin create /svnrepos/main
5. (Optional). Importing from old repository
a. First, create a dump file with all data from your old repository:
svnadmin dump /path_to_old_repository > outfile.dump
Note, that "path_to_old_repository" is physical path, not a URL. You should execute the command on the server having your old subversion. The "outfile.dump" is a path and file name where to save exported repository.
b. Copy the output file somewhere on the new server
c. Import it into newly created repository, by running the following command on new server:
svnadmin load /svnrepos/main < outfile.dump
Note, that here we again need the physical path to repository, not URL.
d. Verify that all data imported successfully, by checking it in your favorite SVN client. To access from another machine, use the following syntax: svn://server/repository_path. For example:
svn://server/svnrepos/main
6. Configure security - unless you want everything to be public. I use my favorite Nano for editing in command line.
a. Enable security first:
nano /svnrepos/main/conf/svnserve.conf
Make sure to write those lines (either add them or uncomment and change):
anon-access = none
auth-access = write
password-db = passwd
b. Edit passwords file:
nano /svnrepos/main/conf/passwd
Add the user:
john = password
c. Protect the passwords file - after this command only root will have access to the file:
chmod o= /svnrepos/main/conf/passwd
7. Start svn server as daemon:
svnserver –d
posted @ Saturday, December 04, 2010 8:23 PM