最近准备搭个创库,方面代码备份。服务器采用Linux,在百度上,差不多都是用yum安装。而且版本都太老了,不适合新时代程序员。
对此阅读了下官方文档。记录下目前(2021-03-14 13:12:47)最新版subversion(1.14.1)的Linux服务端编译安装。
首先用yum安装这2个库:
yum install expat-devel
yum install libtool
安装Python3
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
tar -xf Python-3.6.8.tar
cd Python-3.6.8
./configure prefix=/usr/local/python3
make
make install
ln -s /usr/local/python3/bin/python3.6 /usr/bin/python3
python3 -v
随后依次安装
Apr-1.7.0
wget https://archive.apache.org/dist/apr/apr-1.7.0.tar.bz2
tar -xjf apr-1.7.0.tar.bz2
cd apr-1.7.0
./configure --prefix=/usr \
--disable-static \
--with-installbuilddir=/usr/share/apr-1/build
make
make install
Apr-Util-1.6.1
wget https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.bz2
tar -xjf apr-util-1.6.1.tar.bz2
cd apr-util-1.6.1
./configure --prefix=/usr \
--with-apr=/usr \
--with-gdbm=/usr \
--with-openssl=/usr \
--with-crypto
make
make install
最后SQLite-3.34.1
wget https://sqlite.org/2021/sqlite-autoconf-3340100.tar.gz
tar -zxvf java.tar.gz
cd sqlite-autoconf-3340100
./configure --prefix=/usr \
--disable-static \
--enable-fts5 \
CPPFLAGS="-DSQLITE_ENABLE_FTS3=1 \
-DSQLITE_ENABLE_FTS4=1 \
-DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
-DSQLITE_SECURE_DELETE=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1"
make
make install
最后搞Subversion-1.14.1
wget https://archive.apache.org/dist/subversion/subversion-1.14.1.tar.bz2
tar -xjf subversion-1.14.1.tar.bz2
cd subversion-1.14.1
PYTHON=python3 ./configure --prefix=/usr \
--disable-static \
--with-apache-libexecdir \
--with-lz4=internal \
--with-utf8proc=internal
make
make install
这样服务端就搭建好了。
查看版本号:
svnserve --version
创建好创库后
svnserve -d -r /var/svn
端口号为3690
lsof -i:3690
PS:
停止svnserver命令:
killall svnserve