====== Howto install subversion by Jonas Levring ====== ===== Issues ===== Before you install (or buy this NAS), you must know SVN is not very fast on this NAS. Don't expect speeds above 400 kB/s. ===== Installation with Fonz Fun Plug (FFP) ===== ssh or telnet to your NAS. cd /mnt/HD_a2/ffp/pkg/packages/ funpkg -i apr-1.2.12-2.tgz funpkg -i apr-util-1.2.12-1.tgz funpkg -i neon-0.25.5-1.tgz funpkg -i subversion-1.5.2-1.tgz mkdir /mnt/HD_a2/{SVNDIR} cd /mnt/HD_a2/ffp/start/ vi svnserve.sh (note: if you don't have the Fonz packages installed, you can download the four tgz files mentioned above from [[http://www.inreto.de/dns323/fun-plug/0.5/packages/|www.inreto.de]], and put them in the /mnt/HD_a2/ffp/pkg/packages/ directory, or anywhere else you like.) edit line ([INSERT]): REPOSITORY="/mnt/HD_a2/{SVNDIR}" exit vi ([ESC] :wq [ENTER]) chmod 755 svnserve.sh ./svnserve.sh start ===== Installation with Debian ===== Start by installing Debian ([[howto:chroot_debian|howto]]) With just the minimal Debian etch (didn't try sarge) installed, I got a few errors while compiling Subversion due to missing required libraries. * On Lenny Subversion and Apache2 authentification works out of the box. (cameltheman@gmail.com) So below is a checklist to run so that ./configure while work from the first try (since it takes looooong to run, I thought it could be useful :-) ) Make sure you have a decent C compiler installed (note: on "etch" I needed both GCC **and** G++, otherwise I got an error: "Error: C compiler cannot create executables" while running ./configure) It also needs zlibc (actually a few other related libs too) Run these commands to be sure you have everything to configure subversion succesfully apt-get install gcc apt-get install make apt-get install g++ apt-get install zlibc apt-get install zlib-bin apt-get install zlib1g apt-get install zlib1g-dev Note: Do __NOT__ use the apt version of subversion - the authorization part of it is broken :-( Also, under debian etch the package zlib1g-devel does not exist, try zlib1g-dev instead. I will go through the most common parts of setting up a subversion server, but as backup there is a [[http://svnbook.red-bean.com/|good manual]] Create temp directory cd /mnt/HD_a2/ mkdir tmp cd tmp Get the source + dependencies (tested with 1.4.2) wget http://subversion.tigris.org/downloads/subversion-1.4.2.tar.gz wget http://subversion.tigris.org/downloads/subversion-deps-1.4.2.tar.gz Extract the tar's and access directory tar xzvf subversion-1.4.2.tar.gz tar xzvf subversion-deps-1.4.2.tar.gz cd subversion-1.4.2 Build and install ./configure make make install Note1: Remember to drink a cup of coffee (or 3) Note2: There are some parameters to set if you want to use subversion through Apache. But please remember that it requires Apache 2.0, and in my experience the DNS-323 is not powerful enough to run this. - Sorry - But if you want to try out, remember to check the [[http://svn.collab.net/repos/svn/trunk/INSTALL|install manual]] for parameters. Now it should be working :-) ===== Create repository ===== Create a couple of directories to ease the maintenance mkdir /mnt/HD_a2/Data mkdir /mnt/HD_a2/Data/svn cd /mnt/HD_a2/Data/svn If you are creating all the repositories inside this directory, its possible to start only one server, and still have the option to create special access rules to specific repositories. In this case we start a repository only for my latest sourcecode (called: myLatestSourceCode) mkdir myLatestSourceCode svnadmin create myLatestSourceCode/ ==== Authorization ==== Sometimes it's useful to require username and password to access and/or update the repository. By default its possible for anyone to read, but it requires username and password to update. Edit ''svnserve.conf'' (Daniel: found at: /mnt/HD_a2/Data/svn/myLatestSourceCode/conf/svnserve.conf) pico svnserve.conf Remove the ''#'' where there is only one, so it look something like this: Note: Don't uncomment ''# authz-db = authz'' [general] anon-access = read auth-access = write password-db = passwd # authz-db = authz realm = My First Repository Save the file and exit It's possible to change the name of the repository by changing the ''realm''-text. Edit the ''passwd''-file pico passwd Setup the usernames and passwords in clear-text. Example of creating a user named //foo// with the password //bar//. [users] foo = bar Save the file and exit ===== Start server ===== Now the server is ready to start.. Yeapii :-D svnserve -d --listen-port --listen-host -r /mnt/HD_a2/Data/svn/ I am running the server on port 8080, but it's up to you to choose. When setting up the ip or domain, remember not to use http in front. Example: ''svn.mydomain.com'' It is recommended to enter the //server-launch-string// in the [[howto:chroot_debian:linuxrc|linuxrc]] file ===== Access repository ===== Now its possible to access the repository by the URL: ''svn://svn.mydomain.com:8080/myLatestSourceCode''. Have fun