This instructions will help you installing SVN server.
Install PHP and Apache Packages
yum install httpd php php-devel php-cli php-pear
Start Apache web server and setup for it to autostart on system boot
yum install httpd php php-devel php-cli php-pear service httpd restart chkconfig httpd on
Install svn using yum
yum install mod_dav_svn subversion
Configure Subversion (subversion.conf)
vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNParentPath /svn/repos/projectX
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/svn-auth-file
Require valid-user
</Location>
Create SVN Repository
cd /svn/repos/projectX svnadmin create svnrepo chown -R apache:apache svnrepo
Create SVN Users
Following commands will create two users for svn.
htpasswd -cb /etc/svn-auth-file admin9 pass9 htpasswd -b /etc/svn-auth-file user8 pass8
If you are wondering why I display the password on commandline. I actually hit a bug. My httpd version is 2.4.4. See this Link1 Link2
If you have httpd 2.4.6 and above you can use below command.
htpasswd /etc/svn-auth-file user7
Access Your Repository in Browser
Open using a browser to access the repository.
http://192.168.0.5/svn/svnrepo/
Enter user name and password in browser.
Checkout Files to Your Repository
svn co http://192.168.0.5/svn/svnrepo/
Add and Checkin Files to Your Repository
cd svnrepo vi fileA.txt vi fileB.txt svn add fileA.txt fileB.txt svn ci fileA.txt fileB.txt -m "First commit"
Access http://192.168.0.5/svn/svnrepo/ url in browser, you will see your new files there.
No comments :
Post a Comment