Yesterday I started working on a cheap storage server. I had the following requirements:
- I needed a versioning file system (so every document I store is versioned)
- I needed access via Webdav, also for this versioning
- It should have easy install
- I wanted to use cheap hardware (my 400 mhz system I have gathering dust in my cupboard should do nicely)
- I wanted to user friendly tools to support the system (under both Windows and Linux)
- It had to be secure (SSL enabled on all levels)
- It must be searchable, whatever document I throw in (doc, xls, odt, wpd, txt, xml, html, mp3 etc)
After a bit of searching, it became clear I would use Apache 2 and Subversion under Linux to achieve my goal.
The steps I took to install it all where;
- Install Fedora Core 3, server install with all installation options marked off and SELinux off (!)
- Get the network verified and working
- Import the GPG key:
rpm --import http://www.fedora.us/FEDORA-GPG-KEY
- Install Apache: yum install httpd
- Install mod_ssl: yum install mod_ssl
- Install Subversion: yum install subversion
- Install mod_dav_svn: yum install mod_dav_svn
Now your FC installation is ready to go; it already fixed a key for you so the SSL installation is ready.
Make the repository directory:
chown -R apache.apache /home/svn
Make the directory for your security:
chgrp -R apache /home/secsvn
chmod -R 750 /home/secsvn
You have to change the configuration of Subversion under Apache; it is stored here;
Add the following:
AuthName “My SVN Repository”
Make the password file:
htpasswd -cm /home/secvwn/passwd john
and type a password.
Then make the access file:
cat > /home/secsvn/access
john = rw
Meaning that john can read and write the entire repository so far. You can add more users if you want ofcourse; read the SVN book to see the syntax.
To make sure it starts at the start of the OS:
chkconfig httpd on
Now it should work; make sure you have the firewall open for Apache port 80, if you do not know or have this yet, type;
and set Apache to the list of allowed services.
From another computer, try;
This should ask your for a name and password; this is the aforementioned and created user ‘john’.
If you enter the user and it does not work, look in the /var/log/httpd/error.log file for clues. If there is something wrong with permissions, you problably mounted the repository on another drive and have SELinux security on. To fix this, either turn SELinux off or give the repository the right credentials (Google this).
[TODO: howto switch on SSL for this service]
How I made the search I will put somewhere here later, because it appeared my network card was broken and network switched off automatically after 30 minutes of use on the system.