码迷,mamicode.com
首页 > 其他好文 > 详细

源码安装svn

时间:2015-12-21 23:48:12      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:svn

源码安装svn
先卸载低版本
wget http://mirrors.hust.edu.cn/apache//apr/apr-1.5.2.tar.bz2
wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.5.4.tar.bz2
wget http://mirrors.hust.edu.cn/apache//apr/apr-iconv-1.2.1.tar.bz2
wget http://apache.fayea.com/subversion/subversion-1.9.3.tar.bz2
wget http://www.sqlite.org/sqlite-amalgamation-3071501.zip

tar -xf apr-1.5.2.tar.bz2
cd apr-1.5.2
ls -l
./configure --prefix=/usr/local/apr
make && make install
cd ..
tar -xf apr-util-1.5.4.tar.bz2
cd apr-util-1.5.4
ls -l
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
cd ..
ls -l
tar -xf apr-iconv-1.2.1.tar.bz2
cd apr-iconv-1.2.1
./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
make
make install

tar -xf subversion-1.9.3.tar.bz2
mv sqlite-amalgamation-3071501.zip subversion-1.9.3
unzip sqlite-amalgamation-3071501.zip
mv sqlite-amalgamation-3071501 sqlite-amalgamation
./configure --prefix=/usr/local/subversion --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-maintainer-mode
make & make install

/usr/local/subversion/bin/svnserve --version

vim /etc/profile.d/svn.sh
chmod a+x /etc/profile.d/svn.sh

source /etc/profile.d/svn.sh

echo $PATH

mkdir -pv /data2/svn
svnadmin create /data2/svn/web0
svnserve -d -r /data2/svn
netstat -ntulp

svn co svn://localhost/web0
cp post-commit.tmpl post-commit
chmod 777 post-commit
svn cleanup

[root@localhost ~]# cat /data2/svn/web0/hooks/post-commit
#!/bin/bash
export LANG=en_US.UTF-8                    //解决中文报错
SVN=/usr/local/subversion/bin/svn
WEB=/data0/web/www.test155.com/web0
$SVN update $WEB --username=用户名 --password 密码


开机自动启动
/usr/local/nginx/sbin/nginx >/tmp/nginx.log 2>&1
/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/etc/my.cnf & >/tmp/mysql.log 2>&1
/usr/local/php/sbin/php-fpm >/tmp/fpm.log 2>&1
/usr/local/subversion/bin/svnserve -d -r /data2/svn >/tmp/svn.log 2>&1

本文出自 “醉寒江” 博客,请务必保留此出处http://cjlozbg.blog.51cto.com/3513565/1726981

源码安装svn

标签:svn

原文地址:http://cjlozbg.blog.51cto.com/3513565/1726981

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!