Installation of SVN version management system CentOS + Subversion + Apache + jsvnadmin

Source: Internet
Author: User
Tags tortoisesvn

CI Server: 192.168.4.221

Root User Action

Recommended to update the operating system before installation

# Yum Update

Restart after update is complete

# reboot

Installing Apache

# yum Install httpd httpd-devel

# service httpd Start

# Chkconfig httpd on

# vi/etc/httpd/conf/httpd.conf

Find servername and modify it into

ServerName localhost:80

Open port 80 in the firewall:

# Vi/etc/sysconfig/iptables

-A input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT

# Service Iptables Restart

http://192.168.4.221/

Install SVN service

# Yum Install mod_dav_svn Subversion

MOD_DAV_SVN module must be installed

Restart Apache after installing SVN

# Service httpd Restart

See if the test installs the SVN module

# Ls/etc/httpd/modules/| grep SVN

Mod_authz_svn.so

Mod_dav_svn.so

# SVN--version

Create SVN Library home directory (multi-Library mode, one profile to manage multiple libraries)

# mkdir/svn/

# CD/ETC/HTTPD/CONF.D

# ls

You can now see a subversion.conf configuration file (generated when installing the MOD_DAV_SVN module)

# VI Subversion.conf

Add the following content

#Include/svn/httpd.conf

<Location/svn/>

DAV SVN

Svnlistparentpath on

Svnparentpath/svn

AuthType Basic

AuthName "Subversionrepositories"

Authuserfile/svn/passwd.http

Authzsvnaccessfile/svn/authz

Require Valid-user

</Location>

Redirectmatch ^ (/SVN) $ $1/

Creating/svn/passwd.http and/svn/authz

# touch/svn/passwd.http

# Touch/svn/authz

Restart Apache

# Service httpd Restart

Installing Jsvnadmin

Svnadmin Introduction

(on Google Code, FQ is required to download.) We will also put the latest version of the Jsvnadmin in the group share)

https://code.google.com/p/jsvnadmin/

Https://jsvnadmin.googlecode.com/files/svnadmin-3.0.5.zip

Install MySQL (separate installation, separate from the database of the business system)

# Rpm-qa | grep MySQL # to see if the MySQL database is already installed on the operating system,

If you have one, you can uninstall it by RPM-E command or rpm-e--nodeps command.

# yum Installmysql-server MySQL Mysql-devel

# service Mysqld Start

# chkconfig--list| grep mysqld

Mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off

Use the above command to see that MySQL is not set to boot, so you need to set up boot

# Chkconfig Mysqld on

To facilitate remote management, open port 3306 in the firewall

#

-A input-m state--state new-m tcp-p TCP--dport 3306-j ACCEPT

Restart the firewall for the port configuration to take effect

# Service Iptables Restart

Set the password for the root user of the MySQL database:

# mysqladmin-uroot password ' root '

Log in to the database:

# mysql-u Root-p

MySQL Authorized remote access (first login to MySQL with root)

Mysql> GRANT allprivileges on * * to ' root ' @ '% ' identified by ' wusc.321 ' with GRANT OPTION;

Mysql> flushprivileges;

Deploying Svnadmin with TOMCAT7

# Cd/root

Download the latest version of TOMCAT7 's tar.gz package using wget

# TAR-ZXVF Apache-tomcat-7.0.xx.tar.gz

# MV Apache-tomcat-7.0.xx Svnadmin-tomcat

Modify the Tomcat port to 9000 and the container code to UTF-8

# Vi/root/svnadmin-tomcat/conf/server.xml

Modify the following red-labeled content

<server port= "9005" shutdown= "Shutdown" >

<connector port= "9000" protocol= "http/1.1"

connectiontimeout= "20000"

Redirectport= "8443" uriencoding= "UTF-8"/>

Open port 9000 in the firewall

# Vi/etc/sysconfig/iptables

-A input-m state--state new-m tcp-p TCP--dport 9000-j ACCEPT

Restart the firewall for the port configuration to take effect

# Service Iptables Restart

# Cd/root/svnadmin-tomcat/webapps

# RM-RF *

Upload Svnadmin.war to/root/svnadmin-tomcat/webapps directory

# Cd/root/svnadmin-tomcat/webapps

Extract

# unzipsvnadmin.war-d Svnadmin

Backup

# MV svnadmin.war/root/tools/

# Cdsvnadmin/web-inf

# vijdbc.properties

The contents should read as follows

Db=mysql

#MySQL

Mysql.jdbc.driver=com.mysql.jdbc.driver

Mysql.jdbc.url=jdbc:mysql://127.0.0.1:3306/svnadmin?characterencoding=utf-8

Mysql.jdbc.username=root

Mysql.jdbc.password=wusc.123

Create a Svnadmin database and import the appropriate data (UTF-8 encoding)

Perform Db/mysql5.sql and Db/lang/en.sql

Start Svnadmin-tomcat

#/root/svnadmin-tomcat/bin/startup.sh

Open in Browser: http://192.168.4.221:9000/svnadmin/

Example: Input admin,wusc.123

Create a library

At this time

A wusc_edu SVN repository directory is created under the/svn/directory.

At the same time, there will be more than one httpd.conf file, the same content as subversion.conf, in the/etc/httpd/conf.d/subversion.conf has been configured.

The/svn/authz authorization file will read more:

[Aliases]

[Groups]

Wusc_edu_developer=

Wusc_edu_manager=

Wusc_edu_tester=

[wusc_edu:/]

@wusc_edu_manager =RW

The above process is actually called the SVN corresponding command to do the corresponding operation

Configure Library Directory Permissions

# CD/SVN

# chown-r Apache.apache wusc_edu

# Chmod-r 777 Wusc_edu

(If you create a new library, you need to perform the above two-step authorization action on the newly created library directory)

Turn off SELinux (access control for Linux)

Modify the/etc/selinux/config file

# Vi/etc/selinux/config

Change Selinux=enforcing to Selinux=disabled

Restart the machine

# reboot

Use of SVN version management Platform (subversion+apache+jsvnadmin):

Install SVN management client TortoiseSVN to facilitate operation and management of SVN library

Http://tortoisesvn.net/downloads.html

(Note 64-bit system to install 64-bit version)

The wusc_edu library can then be manipulated accordingly

(1) User group

(2) User

(3) Authorization

(4) Import Project

Installation of SVN version management system CentOS + Subversion + Apache + jsvnadmin

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.