A step by step guide on installing subversion with http support on centos and redhat machine
- First of all, install apache/httpd
- yum install httpd
- Make sure you apache is running. You can also type 'http://localhost' at your browser and apache test page should appear if your apache is running
- /etc/init.d/httpd status
- Make it start by default on startup
- chkconfig httpd on
- Edit the apache configuration to suit your need. If not sure, leave the default setting as it is
- vi /etc/httpd/conf/httpd.conf
- Install subversion and mod_dav_svn for apache
- yum install mod_dav_svn subversion
- Go to subversion.conf in /etc/httpd/conf.d/. Edit as below
- cd /etc/httpd/conf.d/
- vi subversion.conf
- This is the most basic configuration where anyone will have unrestricted access to the repos. Location is the name that will be used in the browser address bar. In this example it will be 'http://localhost/svn/repos' (Click for larger image)
- This is a configuration with username and password for the client (Click for larger image)
- htpasswd -cm /etc/svn-auth-conf --- This command is not needed for the first configuration. To create the first user with password
- htpasswd -m /etc/svn-auth-conf --- use this command to add another user
- Configure your repository
- mkdir /var/www/svn --- create folder svn
- cd /var/www/svn --- change diectory to the newly created svn directory
- svnadmin create repos --- create svn repository named repos
- chown apache.apache -R repos --- change ownership of 'repos' to apache
- /etc/init.d/httpd restart --- restart apache
- Open you browser and type 'http://localhost/svn/repos'. You can see that a page with 'Revision 0:/' will appear. Congratulation, you just completed the setup for svn server with http.
9 comments:
I did same thing but ...
but my browser showing
403 error
Forbidden
You don't have permission to access
Hi anonymous,
May I know after which step that your browser come out with the '403 error'?
This saved me a lot of time! Good write up. Thanks for posting it.
Don't forget about changing SE Linux, it can mess this up.
Follow the instructions here:
http://wiki.centos.org/HowTos/Subversion
Make sure the subversion.conf is exactly like they say.
Anonymous Anonymous said...
I did same thing but ...
but my browser showing
403 error
Forbidden
Please check your folders structure.
I'm sure it is not correctly configured.
Also try to use
SVNPath /var/svn/www/repos property.
Amazing....this work for me :)
shailesh
using
SVNPath /var/www/svn/repos
did the trick :D
Thank you soo much, u saved me hours of pain.
Post a Comment