Linux (centos) build SVN server

The installation steps are as follows:
1、yum install subversion
 
2. Enter rpm -ql subversion to view the installation location, as shown below:
  Linux (centos) builds SVN server - Xiaomu - Green Tomato Paradise
We know that svn generates several binaries under the bin directory.
Enter svn --help to see how to use svn, as shown below.
Linux (centos) builds SVN server - Xiaomu - Green Tomato Paradise
 
 
3. Create the svn repository directory
mkdir -p /var/svn/svnrepos
 
4. Create a repository
svnadmin create /var/svn/svnrepos
After executing this command, the following files will be generated in the /var/svn/svnrepos directory
Linux (centos) builds SVN server - Xiaomu - Green Tomato Paradise
 
5. Enter the conf directory (the svn repository configuration file)
The authz file is the permission control file
passwd is the account password file
svnserve.conf SVN service configuration file
 
6. Set the account password
vi passwd
Add users and passwords in the [users] block, format: account=password, such as dan=dan
 
7. Set permissions
vi authz
Add the following code at the end:
[/]
and=rw
w=r
This means that the root directory of the repository, dan, has read and write permissions to it, and w only has read permissions.
 
8. Modify the svnserve.conf file
vi svnserve.conf
Open a few comments below:
anon-access = read # Readable by anonymous users
auth-access = write #Authorized users can write
password-db = passwd #Which file is used as the account file
authz-db=authz #Which file to use as the authority file
realm = /var/svn/svnrepos # Authentication space name, the directory where the repository is located
 
9. Start the svn repository
svnserve -d -r /var/svn/svnrepos

10. Test on Windows
Create a new test folder, right-click under the folder and select SVN checkout as shown below (TortoiseSVN must be installed in advance):
Linux (centos) builds SVN server - Xiaomu - Green Tomato Paradise
Fill in the SVN address, as shown below:
 
Linux (centos) builds SVN server - Xiaomu - Green Tomato Paradise
Enter the password, as shown below:
 
Linux (centos) builds SVN server - Xiaomu - Green Tomato Paradise
 
 
-----------------------------------------------------------------------------------------------------------------------------------
Can not connect because: Step 8, when modifying the svnserve.conf file . Be careful when uncommenting, and delete the space after the #. That is to say, to top it all up.
Then the authentication failure is to pay attention to the previous [/]. Then restart the SVN, it will not restart the reboot 
vi authz
Add the following code at the end:
[/]
and=rw
w=r
 
-----------------------------------------------------------------------------------------------------------------------------------
LZ, solved, it's a firewall problem. Allowing port 3690 now works fine later.
 
 
-----------------------------------------------------------------------------------------------------------------------------------
Ask linux SVN data storage path
svn installation directory (without apache service, the file storage format is FSFS)
/usr/local/svn
repository directory
/data/svn/cpdata/
repository directory I created it with the following command:
svnadmin create /data/svn/cpdata
To start the service I use the following command:
svnserver -d -r/data/svn/cpdata
and then use the following command to build a project
svn mkdir -m "creating a project" svn://192.168.1.100/cpdata_xy
svn mkdir -m " Creating a trunk" svn://192.168.1.100/cpdata_xy/trunk Checkout svn://192.168.1.100/cpdata_xy/trunk

with SVN client tool
can be successfully checked out, I created a text document xiaossd.txt locally, and then submitted , the submission was also successful.

What I want to know is, in which path of the server is my xiaossd.txt file stored after submission,
is it /usr/local/svn or /data/svn/cpdata/, why do I search for xiaossd on the server I can't find it. If the server changes and I want to transplant the svn library, what should I do?
 
Asker adoption
 
The warehouse /data/svn/cpdata you created has a directory db, and the data is there, managed in svn's own format.
If you want to move the library, there are two ways:
1. If the version of svn is the same, or the one to be moved is higher, just move the warehouse directly.
2. Use the commands svnadmin dump and svnadmin load to cooperate
 
 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326782620&siteId=291194637