Ref:http://svnbook.red-bean.com/en/1.5/index.html
(A) To install Subversion : yum install mod_dav_svn subversion
(B) How to create a Repo :
svnadmin create /svn
So it will create a svn directory under / directory
[root@mail /]# pwd / [root@mail /]# ls aquota.group boot dev lib opt sbin svn usr aquota.user conffile etc media proc selinux sys var bin data home mnt root srv tmp [root@mail /]#
(C) How to import Directory in svn repos ?
svn import directory/ file:///svn/directory
output :
[root@mail /]# svn import /root/script/ file:///svn/script Adding /root/script/checkmory.sh Committed revision 1.
Note After typing the svn import command it will open a Vim editor ,and will ask you to write some comments about this import
Example: I would of write: I am adding the /root/script directory into svn repository.
Pic:
Note : if you see bellow error :
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found
which means: you need to add “vim ” program path into bash_profile files
How to add vim programm path in .bash_profile file :
vi /root/.bash_profile add this line : export SVN_EDITOR="/bin/vi"
Now save the file and logoff and log on agian
(d) How to check list of projects in svn repo
[root@mail /]# svn list file:///svn
Output :
script/
Which means script directory has been added into svn repository.
Now if you want to see what is inside script directory
[root@mail /]# svn list file:///svn/script checkmemory.sh
Tags: Centos-How to install subversion, How to install subversion in Centos/Redhat, Linux:how to install subversion
[...] Fosiul.co.uk Dedicated To Linux « How to install Subversion [...]