Linux Environment Source code compilation install SVN

Source: Internet
Author: User

Zhoulf 2015/2/28 OriginalInstallation Instructions

Installation environment: Red Hat Enterprise Linux
Installation method: Source Installation
Software: apr-1.5.0.tar.gz, apr-iconv-1.2.1.tar.gz, apr-util-1.5.3.tar.gz, Sqlite-amalgamation-201311181848.zip, Subversion-1.8.4.tar.gz

Installation Prerequisites

Install APR, apr-util, Apr-iconv software prior to installation

Installation

Upload the subversion-1.8.4.tar.gz file to the/usr/local to do the following:

#!/bin/bash
#-------------------ready to--------------------------
#安装之前要安装apr, Apr-util, Apr-iconv software

#检查是否安装了低版本的SVN
Rpm-qa Subversion

#卸载/Remove an existing installation
Yum Remove Subversion
Rm-rf/usr/local/svn

#--------------------------------------Installation-----------------------------------------------------
#进入安装目录
Cd/usr/local

#解压压缩包
Tar-zxv-f subversion-1.8.4.tar.gz

#修改用户权限
Chown-r root:root/usr/local/subversion-1.8.4

#进入安装目录
CD subversion-1.8.4

#将sqlite-amalgamation-201311181848.zip upload to/usr/local/subversion-1.8.4, then unzip to install SQLite support
Mkdir-p sqlite-amalgamation
Unzip-o-D sqlite-amalgamation sqlite-amalgamation-201311181848.zip

#配置
./configure \
--PREFIX=/USR/LOCAL/SVN \
--WITH-APR=/USR/LOCAL/APR \
--with-apr-util=/usr/local/apr-util \
--with-zlib=/usr/local/zlib

#编译安装
Make && make install

#----------------------Verification-------------------
#验证
/usr/local/svn/bin/svnserve--version

#删除安装源文件
Cd/usr/local
RM-RF subversion-1.8.4

#-----------------------Configure environment Variables--------------------------------
#添加环境变量
Cat>>/etc/profile<<eof
#----------------------------------
Export SVN_HOME=/USR/LOCAL/SVN
Export path=\
Svn_home/bin:\
PATH
#----------------------------------
Eof

#配置生效
Source/etc/profile

#验证配置
Svnserve--version

#--------------------------------------A single warehouse configuration-----------------------------------------------------
#建立版本库 (You can create multiple, the following items need to be reconfigured after you create a new library.) Note the difference between the installation directory and the repository directory, the following is the Repository directory)
Mkdir-p/var/svn/repos
Chmod-r 775/var/svn/repos

#建立svn版本库 (corresponding to the above directory), after executing the command automatically generate the configuration file, folder discovery contains Conf, db,format,hooks, locks, README.txt and other files, stating that an SVN library has been established
Svnadmin Create/var/svn/repos

#------------------------------------A single warehouse configuration-----------------------------------------
#==> Note: Before the line of the configuration file # and spaces are removed, you must remove
#生成密码文件, configure user information (you can add multiple, user name password pairs in a way)
Cat>/var/svn/repos/conf/passwd<<eof
[Users]
Admin=123
Zhoulf=123
Test=123
Eof

#权限控制authz配置 (read-only R, read-write RW, no user listed, no access allowed), [/svn/repos] Specify resource file path, only allow azimuth in this directory
Cat>/var/svn/repos/conf/authz<<eof
[/]
Admin=rw
[/svn/repos]
Zhoulf=rw
Test=r
Eof

#修改配置
Cat>/var/svn/repos/conf/svnserve.conf<<eof
[General]
Anon-access=none
Auth-access=write
password-db=/var/svn/repos/conf/passwd
Authz-db=/var/svn/repos/conf/authz
Realm=/var/svn/repos
Eof

#启动SVN
Svnserve-d-r/var/svn/repos

#客户端访问路径
admin/123-svn://192.168.1.102/
zhoulf/123-svn://192.168.1.102/svn/repos/


#连接成功后手动创建以下目录 to ensure standardization.
Svn://192.168.1.102/svn/repos/trunk
Svn://192.168.1.102/svn/repos/tags
Svn://192.168.1.102/svn/repos/branches

#停止SVN服务
Ps-aux |grep SVN
#kill-9 XXX

#------------------------------------Multi-warehouse Configuration Run-----------------------------------------
#如果一台服务器上同时启动多个版本管理, the boot path must be the root path of all project warehouses
Svnserve-d-r/var/svn/repos

#例如:/var/svn/repos1/var/svn/repos2------------------->/VAR/SVN







Linux Environment Source code compilation install SVN

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.