Install the svn service in centos

Source: Internet
Author: User

Note: The originality here refers to the records that have been collected and tested successfully on the server. It's not something of your own. Think about it!

 

Installing Svn in centos is simple, and Yum can be used quickly.

yum install mod_dav_svn subversion

The following describes how to configure SVN.
1. Create the svn root directory:

[root@vm-moodle ~]# mkdir -p /opt/svn/ 

2. Create a data warehouse:

[root@vm-moodle ~]# mkdir -p /opt/svn/edu/[root@vm-moodle ~]# svnadmin create opt/svn/edu/

3. modify the configuration file:

[Root @ VM-moodle ~] # Cd/opt/SVN/edu/CONF/[root @ VM-moodle conf] # ll total 24-rw-r -- r -- 1 Root 710 10-25 authz-RW-r -- r -- 1 Root 325 10-25 passwd-RW-r -- 1 Root 1449 10-25 svnserve. conf ##************************************* * ************************** # Note, do not leave spaces before the parameters in the following configuration file. Otherwise, the consequences will be borne by you! ##************************************** * *********************** [Root @ VM-moodle conf] # vi svnserve. conf [general] anon-access = none # Do not allow anonymous access auth-access = write # authenticated users can write password-DB = passwd # Password File authz-DB = authz # user authentication File [root @ VM-moodle conf] # vi authz [Edu: /] hansy = RW # Add a user named in the EDU repository with the write permission. [Root @ VM-moodle conf] # vi passwdhansy = 87827192 # The password can be an encrypted password or plaintext, which is determined based on the previous configuration.

4. Start the service:

# Start the svn service and specify the svn root directory: [root @ VM-moodle ~] # Svnserve-d-r/opt/SVN/# Check whether the service is normal: [root @ VM-moodle ~] # Netstat-tunlp | grep svntcp 0 0 0.0.0.0: 3690 0.0.0.0: * en 3970/svnserve # Listen listening port 3690

5. Install tortoisesvn client on win
Download the required tortoise version for installation. Because the installation is not connected to Web services such as Apache, the svn protocol is used during client access.
For example: SVN: // 192.168.1.10/EDU
Enter the user name and password for normal access.

 

Q:
Q: after installing the svn service, I cannot connect to the svn server using the svn client in windows?
A: Generally, port 3690 of Svn in centos is not enabled. Use the following method:

[Root @ VM-moodle ~] # Iptables-I input-P TCP -- dport 3690-J accept # Open Port 3690 [root @ VM-moodle ~] #/Etc/rc. d/init. d/iptables save # It is very important to save the configuration. [root @ VM-moodle ~] #/Etc/init. d/iptables status # Check whether the operation is successful:

Q: After the svnserve-based Subversion server is configured, this error occurs when the client accesses the Subversion Database: svnserve. conf: 12: Option expected. Why is this error?
A: When the Subversion reads the configuration file svnserve. conf, it cannot identify the configuration file with leading spaces. See the following configuration file.

[general]### These options control access to the repository for unauthenticated### and authenticated users. Valid values are "write", "read",### and "none". The sample settings below are the defaults.anon-access = read  auth-access = write

In the preceding configuration file, anon-access is the top line. No problem is found, and Auth-access has leading spaces, which may cause this error.
To avoid this error, we should also remove the leading space when removing the # Before these rows.

Q: How do I enter the tortoisesvn user name and password?
A: in many cases, when using tortoise for convenience, we check the password input box to save the verification information. However, when we want to log on with another user, we may find that we do not know how to log on with another user. The authentication information such as tortoise's username and password is cached in the directory of the client file system:
C:/Documents and Settings/Administrator/Application Data/subversion/auth
Delete all the folders under auth and reconnect to the remote server for check. The dialog box appears!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.