1. Install SVN
Yum-y Install Subversion
2. Create SVN repository Path
Mkdir-p/opt/svn/project1
Mkdir-p/opt/svn/project2
Svnadmin Create /OPT/SVN/project1
Svnadmin Create /OPT/SVN/project2
Note: For specification, it is usually created under the project directory:
Mkdir-p/opt/svn/projec1/Trunk
Mkdir-p/opt/svn/projec1/Tags
Mkdir-p/opt/svn/projec1/Branches
Item 2 operation and a similar.
3. Import Project Source code
svn import -M "first import" /home/yousourcecode file:///opt/svn/project1/trunk/
Item 2 operation and a similar.
Note:/home/yousourcecode is the path to your project's initial source code, this directory can be an empty directory, so that the import of the code to the future client through the SVN add to complete, or directly import /home/ the original source code under the Yousourcecode directory.
4. Modify the configuration file
(1) SVN service configuration
Vim/opt/svn/project1/conf/svnserve.conf
The contents are as follows:
[General]
Anon-access = None
auth-access = Write
Password-db = passwd
Auth-db = Authz
(2) User Configuration
vim/opt/svn/project1/conf/passwd
The contents are as follows:
XXX = * * */user name = password
5. Start SVN service
svnserve-d-R /opt/svn/
Note: If you start multiple versioning at the same time on a single server, the boot path must be the root path for all project warehouses:
/opt/svn/Project1 /opt/svn/project2-------------------> /opt/svn/
Access Path (Reference):
svn://222.64.89.36/Project1
svn://222.64.89.36/Project2
6. Close SVN
Ps-ef | grep SVN
Kill-9 Port number
Linux/centos Build SVN Project