SERVER
1. SVN server Installation
yum install httpd mod_dav_svn subversion httpd -y
2. SVN configure
mkdir -p /data/svn svnadmin create /data/svn/repo chown -R apache.apache /data/svn/repo cd /data/svn/repo/conf vi svnserve.conf [general] anon-access = none auth-access = write password-db = passwd authz-db = authz
3. Create svn user and set permission
htpasswd -c /data/svn/repo/conf/passwd jack 123123 vi /data/svn/repo/conf/authz [repo:/] jack = rw
4. Configure HTTPD (SVN)
cd /etc/httpd/conf.d/ vi subversion.conf LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so LoadModule dontdothat_module modules/mod_dontdothat.so DAV svn SVNParentPath /data/svn Authtype Basic AuthName "SVN Repository" AuthzSVNAccessFile /data/svn/repo/conf/authz AuthUserFile /data/svn/repo/conf/passwd Require valid-user
5. Configure HTTPD Website
mkdir /var/www/html/abc vi /etc/httpd/conf.d/web.conf ServerName www.abc.com ServerAdmin jack@gmail.com DocumentRoot "/var/www/html/abc" ErrorLog /var/log/httpd/error.log CustomLog /var/log/httpd/access.log combined service httpd start
6. test ur svn
http://[ip]/svn/repo
Client
1. Client windows download and install tortoiseSVN
2. configure your windows tortoiseSVN
example : i. windows create new folder ii. right clink in your new folder and click SVN checkout iii. checkout conifgure URL of repository: http://[ip]/svn/repo Checkout directory: (if your new folder create at desktop) C:\Users\jack\Desktop\New folder iv. finished click ok then will show u completed at revision: 0
3. commit file to server
example: i. create abc folder in Desktop\New folder ii. create index.html in abc Desktop\Newfolder\abc folder iii. at New folder right click , click SVN commit iv. commit finish will show you completed At revision: 1 v. check your url http://[ip]/svn/repo inside got index.html or not
4. for url data sync to server /var/www/html/abc
login svn server and use this command svn co http://[ip]/svn/repo/abc /var/www/html/abc/ --username jack --password 123123
Leave a Reply
Want to join the discussion?Feel free to contribute!