Home  >  Article  >  Operation and Maintenance  >  How to configure SVN server in Ubuntu?

How to configure SVN server in Ubuntu?

PHP中文网
PHP中文网Original
2017-06-21 14:32:021651browse

When deploying a website online, most people use ftp. This method is very inconvenient. Now I want to install the SVN server online and use svn to deploy the website directly. Because the server for searching the disk is ubuntu, the following steps are based on ubuntu.

Install subversion

apt-get install subversion

Create warehouse directory

svnadmin create /home/ubuntu/svnrepos/

Configure svnserve.conf

Edit /home/ubuntu /svnrepos/conf/svnserve.conf

Remove the # in front of the following content

anon-access = none
auth-access = write

password-db = passwd
authz-db = authz

Configure user

Edit /home/ubuntu/svnrepos/conf/authz

[groups]

svn_users=sopans,sopans2

[/]

@svn_users= rw

A group of users, this group of users can read Write

Configure password

Edit /home/ubuntu/svnrepos/conf/passwd

[users]
sopans=www.sopans.com

Start the SVN service

Use the command svnserve -d -r /home/ubuntu/svnrepos/ -d It is a background service -r is the directory to use

Use the ps command to check whether the startup is successful

Link svn test, address It is the svn://ip address, the username and password are configured above, and the test is successful.

Configure the domain name, apache installs the svn module

The domain name needs to be resolved, for example, my test domain name mysvn.sopans.com

apt-get install libapache2-svn

Configure virtual host

<VirtualHost *:80>ServerName mysvn.sopans.com<Location />DAV svn
        SVNPath /home/ubuntu/svnrepos/AuthType basic
        AuthName "svn"AuthUserFile /home/ubuntu/svnrepos/conf/passwd#AuthzSVNAccessFile /home/ubuntu/svnrepos/conf/authz
        require valid-user</Location>ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>

1. Browser When you open it directly and encounter an error, the login box keeps popping up

Modify the file /home/ubuntu/svnrepos/conf/passwd. The password cannot be in plain text. You need to use htpasswd to encrypt it. Baidu Search has online tools

2. An error was encountered when submitting: Can't open file '/home/ubuntu/svnrepos/db/txn-current-lock': Permission denied

This directory/home/ubuntu/svnrepos The permission of / is given to 777

3. In this way, there is no need to use svnserve to start. Just link the domain name mysvn.sopans.com directly.

Browse Open the server and enter your username and password to view the series of problems encountered when deploying sopans, website www.sopans.com

1.PHP programmers have fun with the Linux series-how to install and use CentOS

2.PHP programmers have fun with the Linux series-building the lnmp environment

3.PHP programmers have fun with the Linux series - building an FTP code development environment

4.PHP programmers have fun with the Linux series-backup and restore MySQL

5.PHP programmers have fun with Linux Series-Automatic backup and SVN

6.PHP programmers have fun with Linux series-Linux and Windows installation nginx

7.PHP programmers have fun with Linux series-nginx beginners guide

8.PHP programmers have fun with the Linux series-HTTPS in Nginx

9.PHP programmers have fun with the Linux series-using supervisor to implement the daemon process

10.PHP programmers have fun Convert to the Linux series - upgrade PHP to PHP7

11. PHP programmers have fun with the Linux series - easily use email via telnet

12. PHP programmers have fun with the Linux series - Tencent cloud hard disk expansion mount

The above is the detailed content of How to configure SVN server in Ubuntu?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn