install SVN

# svn responses /var/www/svn

# Auth User File (passwd) /etc/svn-auth-users

# public/private key /etc/httpd/ssl

####install svn####

#instal subversion and apache plug in

sudo yum install mod_dav_svn subversion

#edit conf file (svn path, auth)

# Location /XXX it’s mean http://localhost/xxx

sudo vi /etc/httpd/conf.d/subversion.conf

#create svn responses folder

sudo mkdir /var/www/svn

#create svn users

# frist time need to “-c" to create passwd file

sudo htpasswd -c /etc/svn-auth-users benny

sudo htpasswd /etc/svn-auth-users wo

####SSL####

#install ssl plugin

sudo yum install mod_ssl

#gen public/private key

sudo mkdir /etc/httpd/ssl

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/keyname.privateKey -out /etc/httpd/ssl/keyname.publicKey

#conf public/private key location

# SSLCertificateFile SSLCertificateKeyFile

sudo vi /etc/httpd/conf.d/ssl.conf

####svn####

#Create new project

#Server side

#create new response

sudo svnadmin create /var/www/svn/projectName

#client side

#copy exist code to svn server

svn import /code/java/projectName https://localhost/svn/projectName/ -m “message for ref, but MUST input"

#===below note NOT COMPLETE===

#other client download code

svn checkout https://localhost/svn/projectName/

#after code edited

svn update

svn commit

#PS

#delete all svn folder at project

find -name “.svn" -exec rm -rf {} ;

Server side:

1. make sure HTTPS enable

2. cd /var/www/svn

3. sudo svnadmin create projectName

4. chown -R apache projectName

5. chgrp -R apache projectName

Client:

0. Import(Upload) coding to svn (First use)

svn import ./projectName https://localhost/svn/projectName -m “comment"

(If haven’t comment please leave it the blank “")

1. Check out https://localhost/svn/projectName

svn checkout https://localhost/svn/projectName ./projectName

Tools:

Android: OASVN

Ubuntu: RabbitVCS

Windows: TortoiseSVN