SVN服务器搭建
2017-08-22 本文已影响0人
WFF_FFW
环境介绍:
centos: 7.3
mysql版本:5.6.29
IP:192.168.1.180
mysql及nginx安装可参考:http://www.jianshu.com/p/d9f33d1189d8
0).svn相关包下载

将上图中所需的包儿放在/root/SVN
创建SVN目录: mkdir /root/SVN
1.)svn install
yum install openssh-clients zlib zlib-devel gcc-c++ unzip vim -y
2.)安装apr
cd /root/SVN
tar -zxf apr-1.5.2.tar.gz
cd apr-1.5.2
./configure --prefix=/usr/local/apr && make && make install

3.)安装apr-util
cd /root/SVN
tar -zxf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr && make && make install

4.)解压subversion
cd /root/SVN
tar -zxf subversion-1.8.10.tar.gz
unzip sqlite-amalgamation-3071501.zip
5.)移动到subversion-1.8.10并重命名
mv sqlite-amalgamation-3071501 /root/SVN/subversion-1.8.10
cd subversion-1.8.10
mv sqlite-amalgamation-3071501 sqlite-amalgamation
6.)编译安装
./configure --prefix=/usr/local/subversion --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-zlib --enable-maintainer-mode

make && make install

7.)配置环境变量
vim /etc/profile
export SVN_PATH="/usr/local/subversion"
export PATH="$PATH:$RUBY_HOME/bin:$SVN_PATH/bin"
8.)环境变量生效
source /etc/profile
9.)创建svn版本库路径
mkdir -p /opt/subversion-test/svn/wff
svnadmin create /opt/subversion-test/svn/wff
vim /opt/subversion-test/svn/wff/conf/passwd

注:用户 = 密码
admin = wff.abc..
10.)启动svn
svnserve -d -r /opt/subversion-test/svn/ --listen-port=3692

11.)查看svn版本
svnserve --version

注意:
svnserve --version 查看svn版本会报如下错:

解决方法如下:
原因是本地有这个libsvn_repos-1.so.0但是不知道在哪儿
find / -name libsvn_repos-1.so*

vim /etc/ld.so.conf添加/usr/local/subversion/lib
/sbin/ldconfig -v 更新下配置即可
再运行就正确了
