VPS & Máy chủ chuyên dụng (Trung tâm kiểm soát dịch vụ lưu trữ) Trợ giúp

How to Install and Use SVN on CentOS 6

Subversion or SVN is a name for Apache Subversion, an extremely popular version control system (VCS). SVN free or open source software and is licensed through Apache. SVN is a common component for software and website development. SVN can also be used to control software when there are many collaborators so that changes aren't lost.

DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
TIME REQUIRED 30 min
RELATED PRODUCTS CentOS-based VPS or Dedicated Server

RECIPE

For these commands to work, you will need to be logged in as the root user. To install SVN and its dependencies, we will use yum.

$ yum -y install subversion , mod_dav_svn

After this installs, you will be able to use subversion on your system.

The following commands will convert a ./my-test-directory/ containing files into a working copy of a newly-created repository:

$ mkdir $HOME/my-test-directory
$ mkdir -p $HOME/.svnrepos/
$ svnadmin create ~/.svnrepos/my-test-repos
$ svn mkdir -m "Create directory structure." file://$HOME/.svnrepos/my-test-repos/trunk file://
$HOME/.svnrepos/my-test-repos/branches file://$HOME/.svnrepos/my-test-repos/tags

Committed revision 1.

$ cd ~/my-test-directory
$ svn checkout file://$HOME/.svnrepos/my-test-repos/trunk ./

Checked out revision 1.

$ svn add --force ./
$ svn commit -m "Initial import"
$ svn up

At revision 1.

Congratulations, if you made it this far then you have successfully installed SVN and created your very first repository.


Bài này có hữu ích không?
Thanks for your feedback. To speak with a customer service representative, please use the support phone number or chat option above.
Rất vui vì chúng tôi đã giúp được bạn! Chúng tôi có thể làm gì thêm cho bạn?
Rất tiếc về điều đó. Tell us what was confusing or why the solution didn’t solve your problem.