A, Svn independent service installation
ContOS AS 5
installation package for http://www.woaidiannao.com:
wget http://subversion.tigris.org/downloads/subversion-1.6.5.tar.gz
wget http://subversion .tigris.org/downloads/subversion-deps-1.6.5.tar.gz.
Compile:
tar xfvz Subversion-1.6.5.tar.gz
tar-deps-1.6.5.tar.gz xfvz Subversion
subversion-deps package has four directories zlib apr apr-util neon are dependent on these four directories, compile the code necessary to subversion
cd Subversion-1.6.5
. / configure-prefix = / opt / svn-without-Berkeley- DB-with-zlib = / usr
(Note: to run svnserve, apache compile without parameters to fsfs format version of the library does not compile Berkeley-DB)
Clean make
make
make install
Test:
svnserve-Version
if shown below, the installation Success:
svnserve, Version 1.6.5 (r21228)
2. svn configuration
build repository directory, can be built more:
mkdir-P / opt / svndata / repos
set up a repository:
svnadmin create / opt / svndata / repos
changes to a repository configuration file:
vi / opt / svndata / repos / conf / svnserve.conf
[General]
anon-access = none
auth-access = write
password-DB = / opt / svndata / repos / conf / pwd.conf
AuthZ-DB = / opt / svndata / repos / conf / authz.conf
realm = repos
configured to allow access to the user:
vi / opt / svndata / repos / conf / pwd.conf
Note: the user profile changes take effect immediately, without restarting the svn.
File format is as follows:
[users]
=
=
which, [users] is necessary. Listed below to access the svn users, each user line. Example:
[users]
= password Alan
King = Hello
configure user access rights:
vi / opt / svndata / repos / conf / authz.conf
user groups defined in the document repository and directory permissions.
Note:
* permission of the user profile name must appear in the user profile has been defined.
* For permission to modify the configuration file take effect immediately, without restarting the svn.
User Group format:
[groups]
= ,
where a user group can contain one or more users, between users separated by commas.
Repository directory format:
[: / project / directory]
@ =
=
which box number written in a variety of parts can be:
/, that root and below. The root directory is specified when starting svnserve, we specify / opt / svndata. Thus, / is said to set permissions on all versions of libraries.
repos1: /, that repository a set of permissions
repos2: / abc,, that the repository 2 abc project set permissions
repos2: / abc / aaa,, that the repository 2 abc set permissions aaa directory project
Permissions can be the main user group, user or *, the user group in front of the @, * that all users. Permissions can be w, r, wr, and air, air that does not have any rights.
Example:
[groups]
ADMIN = Alan
[/]
@ ADMIN = rw
[repos1: / abc / AAA]
King = rw
[repos2: / Pass]
King =
3. start svn
svn user to create a boot:
useradd svn
passwd svn
prompted svn set a password for the user
to allow users to access the svn repository:
chown-R svn: svn / opt / svndata
chown-R svn: svn / opt / Data
start svn:
svnserve-d-listen-port 9999-R / opt / svndata
- d is the daemon mode (background) to run
-listen-port 9999 that the use of port 9999, you will need to be replaced by the port.
-R / opt / svndata specify the root directory is / opt / svndata
check:
PS-ef | grep svnserve
if shown below, is a successful start:
svn 6941 1 0 15:07? 00:00:00 svnserve-d-listen- port 9999-r / opt / svndata
two, svn integration of services with apache
apache need to open the webdav functionality
. / configure-prefix = / usr / local / Apache-enable-so-enable-dav-enable-dav = share-FS
tar xfvz Subversion-1.6.5.tar.gz
tar-deps-1.6.5.tar.gz xfvz Subversion
. / configure-prefix = / usr/local/svn1-with-apxs = / usr / local / Apache / bin / apxs
View a dynamic library has not been installed
vi / usr / local / Apache / conf / httpd.conf
LoadModule dav_module modules / mod_dav.so
LoadModule dav_svn_module modules / mod_dav_svn.so
LoadModule authz_svn_module modules / mod_authz_svn.so
configuration http.conf
vi / opt / Apache / conf / httpd.conf
configuration:
DAV svn
SVNParentPath / Data / svn / / / parent directory svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile / Data / svn / passwd
AuthzSVNAccessFile / Data / svn / auth
Require valid-user
Build SVN repositories
# mkdir-P / Data / svn / repos
# svnadmin create / Data / svn / repos
SVN repository backup before
# svnadmin dump / data / svn / repos> / root / repos
out of the backup data back to the local
# svnadmin load / data / svn / repos /
set up local access control file
# / usr / local / Apache / bin / htpasswd [-c] / Data / svn / passwd North
/ / first set the user to use -c indicates a new user file.
# / Usr / local / apache / bin / htpasswd passwd username (new users)
to establish a local project control file
touch / data / svn / auth
file content:
[groups]
[repos: /]
# wxy = rw
North = rw
= rw Tom
ContOS AS 5
installation package for http://www.woaidiannao.com:
wget http://subversion.tigris.org/downloads/subversion-1.6.5.tar.gz
wget http://subversion .tigris.org/downloads/subversion-deps-1.6.5.tar.gz.
Compile:
tar xfvz Subversion-1.6.5.tar.gz
tar-deps-1.6.5.tar.gz xfvz Subversion
subversion-deps package has four directories zlib apr apr-util neon are dependent on these four directories, compile the code necessary to subversion
cd Subversion-1.6.5
. / configure-prefix = / opt / svn-without-Berkeley- DB-with-zlib = / usr
(Note: to run svnserve, apache compile without parameters to fsfs format version of the library does not compile Berkeley-DB)
Clean make
make
make install
Test:
svnserve-Version
if shown below, the installation Success:
svnserve, Version 1.6.5 (r21228)
2. svn configuration
build repository directory, can be built more:
mkdir-P / opt / svndata / repos
set up a repository:
svnadmin create / opt / svndata / repos
changes to a repository configuration file:
vi / opt / svndata / repos / conf / svnserve.conf
[General]
anon-access = none
auth-access = write
password-DB = / opt / svndata / repos / conf / pwd.conf
AuthZ-DB = / opt / svndata / repos / conf / authz.conf
realm = repos
configured to allow access to the user:
vi / opt / svndata / repos / conf / pwd.conf
Note: the user profile changes take effect immediately, without restarting the svn.
File format is as follows:
[users]
which, [users] is necessary. Listed below to access the svn users, each user line. Example:
[users]
= password Alan
King = Hello
configure user access rights:
vi / opt / svndata / repos / conf / authz.conf
user groups defined in the document repository and directory permissions.
Note:
* permission of the user profile name must appear in the user profile has been defined.
* For permission to modify the configuration file take effect immediately, without restarting the svn.
User Group format:
[groups]
where a user group can contain one or more users, between users separated by commas.
Repository directory format:
[
@
which box number written in a variety of parts can be:
/, that root and below. The root directory is specified when starting svnserve, we specify / opt / svndata. Thus, / is said to set permissions on all versions of libraries.
repos1: /, that repository a set of permissions
repos2: / abc,, that the repository 2 abc project set permissions
repos2: / abc / aaa,, that the repository 2 abc set permissions aaa directory project
Permissions can be the main user group, user or *, the user group in front of the @, * that all users. Permissions can be w, r, wr, and air, air that does not have any rights.
Example:
[groups]
ADMIN = Alan
[/]
@ ADMIN = rw
[repos1: / abc / AAA]
King = rw
[repos2: / Pass]
King =
3. start svn
svn user to create a boot:
useradd svn
passwd svn
prompted svn set a password for the user
to allow users to access the svn repository:
chown-R svn: svn / opt / svndata
chown-R svn: svn / opt / Data
start svn:
svnserve-d-listen-port 9999-R / opt / svndata
- d is the daemon mode (background) to run
-listen-port 9999 that the use of port 9999, you will need to be replaced by the port.
-R / opt / svndata specify the root directory is / opt / svndata
check:
PS-ef | grep svnserve
if shown below, is a successful start:
svn 6941 1 0 15:07? 00:00:00 svnserve-d-listen- port 9999-r / opt / svndata
two, svn integration of services with apache
apache need to open the webdav functionality
. / configure-prefix = / usr / local / Apache-enable-so-enable-dav-enable-dav = share-FS
tar xfvz Subversion-1.6.5.tar.gz
tar-deps-1.6.5.tar.gz xfvz Subversion
. / configure-prefix = / usr/local/svn1-with-apxs = / usr / local / Apache / bin / apxs
View a dynamic library has not been installed
vi / usr / local / Apache / conf / httpd.conf
LoadModule dav_module modules / mod_dav.so
LoadModule dav_svn_module modules / mod_dav_svn.so
LoadModule authz_svn_module modules / mod_authz_svn.so
configuration http.conf
vi / opt / Apache / conf / httpd.conf
configuration:
DAV svn
SVNParentPath / Data / svn / / / parent directory svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile / Data / svn / passwd
AuthzSVNAccessFile / Data / svn / auth
Require valid-user
Build SVN repositories
# mkdir-P / Data / svn / repos
# svnadmin create / Data / svn / repos
SVN repository backup before
# svnadmin dump / data / svn / repos> / root / repos
out of the backup data back to the local
# svnadmin load / data / svn / repos /
set up local access control file
# / usr / local / Apache / bin / htpasswd [-c] / Data / svn / passwd North
/ / first set the user to use -c indicates a new user file.
# / Usr / local / apache / bin / htpasswd passwd username (new users)
to establish a local project control file
touch / data / svn / auth
file content:
[groups]
[repos: /]
# wxy = rw
North = rw
= rw Tom
Install the client TortoiseSVN, access to the server
http://192.168.0.180/svn/repos
Note: SVN is the APACHE configuration when the additions.
Install the end of this basic
Install the end of this basic
Third, routine maintenance commands and arguments
start svn service
svnserve-d - listen-port 20000-r / opt / svndata
create repository
svnadmin create fs-type fsfs / opt / svndata / mark
view a repository of information
svn list file: / / / opt / svndata / Mark
svn List - verbose file: / / / opt / svndata / Mark
into the library directory structure
svn import / tmp / mark / file: / / / opt / svndata / mark / - message "init "(mark folder under the bo)
start svn service
svnserve-d - listen-port 20000-r / opt / svndata
create repository
svnadmin create fs-type fsfs / opt / svndata / mark
view a repository of information
svn list file: / / / opt / svndata / Mark
svn List - verbose file: / / / opt / svndata / Mark
into the library directory structure
svn import / tmp / mark / file: / / / opt / svndata / mark / - message "init "(mark folder under the bo)
Mark delete the repository folder under the bo
DELETE svn svn: / / 192.168.0.180:20000 / opt / svndata / Mark / bo-M "DELETE"
/ / export
$ svnlook youngest oldrepo
$ svnadmin dump oldrepo>; dumpfile
/ / restore
$ svnadmin load newrepo
stop the subversion service
PS-aux | grep svnserve
kill -9 ID No.
DELETE svn svn: / / 192.168.0.180:20000 / opt / svndata / Mark / bo-M "DELETE"
/ / export
$ svnlook youngest oldrepo
$ svnadmin dump oldrepo>; dumpfile
/ / restore
$ svnadmin load newrepo
stop the subversion service
PS-aux | grep svnserve
kill -9 ID No.