零、环境准备
1. 安装rz
sudo apt-get install lrzsz
2. 安装pcre
./configure --prefix=/usr/local/pcre/
3. 安装zlib
一、安装apr
1. http://apr.apache.org/download.cgi 下载
2. 编译安装
# ./configure --prefix=/usr/local/apr
# make; make install
二、安装apr util
1. http://apr.apache.org/download.cgi 下载
2. 编译安装
# ./configure --with-apr=/usr/local/apr --prefix=/usr/local/apr-util
# make; make install
三、安装apache
1. http://httpd.apache.org/ 下载
2. 编译安装
#./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
# make ; make install
3. 测试 wget http://localhost/,得到it works,说明apache已经配置成功了
四、安装sqllite
1. http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz 下载
2. 编译安装
# ./configure --prefix=/usr/local/sqlite
# make; make install
五、安装svn
1. http://subversion.tigris.org/downloads/subversion-1.6.13.tar.gz 下载
2. 编译安装
#./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-sqlite=/usr/local/sqlite/ --with-zlib=/usr/local/zlib/ --prefix=/usr/local/subversion --without-berkeley-db
# make; make install
PS:在编译svn时make 出错svn libsvn_subr-1.so: undefined reference to `sqlite3_open_v2'collect2: ld returned 1 exit status make: *** [subversion/svnadmin/svnadmin] Error 1
解决方法: 在svn源码目录下,mkdir sqlite-amalgamation 下载sqlite-amalgamation-3.6.13.tar.gz 解压后将cp sqlite-3.6.13/sqlite3.c sqlite-amalgamation下,重新编译,正常
六、创建数据仓库
1. 启动SVNSVR服务 ./svnserve -d
2. 创建数据仓库 ./svnadmin create /home/admin/repos
3. 导入版本文件
假设你的代码位于/code/readme, 你可以执行svn import /code/readme file:///svn/svn_rep/code/ -m “注释”