Use of SVN version management system (CENTOS+SUBVERSION+APACHE+JSVNADMIN+TORTOISESVN)

Source: Internet
Author: User
Tags server port tortoisesvn

1, Server: 192.168.4.221
Root User Action
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

Browser Access http://192.168.4.221/

2. 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 N SVN modules
# 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 "Subversion repositories"
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

3, Installation Jsvnadmin

Svnadmin Introduction
(On Google Code, FQ is required to download.) We also put the latest version of Jsvnadmin in the group share)
https://code.google.com/p/jsvnadmin/
https://jsvnadmin.googlecode.com/files/ Svnadmin-3.0.5.zip


4. 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 install mysql-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
# Vi/etc/sysconfig/iptables
-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-u root password ' wusc.123 '
Log in to the database:
# mysql-u Root-p
MySQL Authorized remote access (first login to MySQL with root)
Mysql> GRANT All privileges on * * to ' root ' @ '% ' identified by ' wusc.321 ' with
GRANT OPTION;
mysql> FLUSH privileges;


5, use 7 TOMCAT7 deployment Svnadmin
# 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
# Unzip svnadmin.war-d Svnadmin
Backup
# MV svnadmin.war/root/tools/
# CD Svnadmin/web-inf
# VI Jdbc.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 n svnadmin database and import corresponding data (utf--8 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
Configured in/etc/httpd/conf.d/subversion.conf.
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

6, SVN authentication Failure resolution method

Modify the SVN path below the corresponding project file inside the conf/svnserve.conf file, see whether the PASSWORD-DB = passwd before the # removed, and to shelf; authz-db = Authz Similarly, modify realm = My First Repository, change to its own server address, the front of the # number also to be removed, shelf.

Use of SVN version management system (CENTOS+SUBVERSION+APACHE+JSVNADMIN+TORTOISESVN)

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.