CentOS 7 on the deployment of Apache Subversion (SVN) server
Apache Subversion (SVN) is a widely used version control solution that helps to store various versions of files such as source code and documentation.
In this article, I'll show you how to use Apache Subversion and Apache build SVN server on a CentOS 7 server instance.
1. Prerequisites
- CentOS 7 (minimum installation, but not required).
- A sudo user login (also directly from the root).
Make a non-root user before the command added sudo
.
2. Install Apache
Use YUM to install Apache:
Delete the default Apache welcome page:
Apache prevent the /var/www/html
display files in the directory:
3. Installation SVN and mod_dav_svn module
To SVN conjunction with Apache, Apache module needs to be installed in addition to SVN mod dav svn
:
Configuring SVN
-
SVN modify configuration files
Note: In this configuration, we specify a file HTTP access authentication
/etc/svn/svn-auth
and user access control file/svn/authz
. Both will be created in the future. -
Create a SVN repository
-
SVN set up user accounts
HTTP access authentication create a file using the following command
/svn/svn-auth
and SVN user accountuser001
:If you want to create additional user accounts SVN, see the following command:
Warning: Do not use now
-c
sign, otherwise it will rebuild the authentication files, and clear all user accounts previously set. -
Set permissions for users
Assumptions:
- The user
user001
is an administrator. - The user
user002
has read and write permissions. - Users
user003
can only read.
You can then modify the following settings:
Save and Exit:
- The user
-
Start Apache and modify firewall rules
Start Apache:
Open the HTTP service port:
Finally, use the following path from the SVN SVN Client Access server repo
repo1
:
The tutorial is over. thanks for reading.