HOWTO: Installing Subversion(1.4.3) and Apache(2.0.59) on OS X(10.4.9)
Prerequisites
Download the following(I have listed the versions I used in parentheses)
- Xcode must be installed in order to compile subversion and apache
- OS X Firewall must be modified to allow port 8080 TCP traffic in the Sharing applet within System Preferences
Download the following(I have listed the versions I used in parentheses)
Apache Steps
- Extract source code
tar xzvf httpd-2.0.59.tar.gz
- Set environment variable in terminal
export ac_cv_func_poll=no
- Edit apr_socket_send method in source code file srclib/apr/network_io/unix/sendrecv.c
- Replace
- With
- Replace
- With
do { rv = write(sock->socketdes, buf, (*len)); } while (rv == -1 && errno == EINTR); try_write: do { rv = write(sock->socketdes, buf, (*len)); } while (rv == -1 && errno == EINTR); else { do { rv = write(sock->socketdes, buf, (*len)); } while (rv == -1 && errno == EINTR); } else { goto try_write; } - Replace
- Change directories into Apache Code
cd httpd-2.0.59 - Configure build options
./configure --enable-mods-shared=most --enable-ssl --with-mpm=worker --without-berkeley-db - Make source code
make - Install Apache to /usr/local/apache2
sudo make install
- Extract source code
tar xzvf subversion-1.4.3.tar.gz tar xzvf subversion-deps-1.4.3.tar.gz
- Change directories into Subversion Code
cd subversion-1.4.3
- Configure build options
./configure --prefix=/usr/local \ --mandir=/usr/local/share/man --with-ssl \ --with-apxs=/usr/local/apache2/bin/apxs --with-zlib \ --enable-swig-bindings=no --without-berkeley-db \ --with-apr=/usr/local/apache2 \ --with-apr-util=/usr/local/apache2
- Make source code
make
- Install Subversion to /usr/local/bin
sudo make install
- Edit httpd.conf file located at /usr/local/apache2/conf/httpd.conf
- Replace
- With
- Replace
- With
- Add Location block
Listen 80 #Listen 80 Listen 8080 User nobody #User nobody User www DAV svn SVNPath /Users/mike/svnrepo AuthType Basic AuthName "Subversion Repository" AuthUserFile /usr/local/apache2/etc/svn-auth-file Require valid-user - Replace
- Create directory for Apache username/passwords
-
/usr/local/apache2/etc
-
- Change directories into etc dir
-
cd /usr/local/apache2/etc
-
- Generate svn-auth-file for Apache
-
sudo htpasswd -c svn-auth-file mike -
-
-
- Create Subversion repository
-
svnadmin create /Users/mike/svnrepo
-
- Change user and group ownership of repository so Apache www user can modify files
-
sudo chown -R www:mike svnrepo
-
- sudo /usr/local/apache2/bin/apachectl start
- http://localhost:8080/svn
- Note: you will need to enter the username and password you created earlier in order to gain access