1.1.1 SVN的安装
[root@localhost svn]#cd /usr/local/mytools/svn(进入SVN的安装文件目录)
[root@localhost svn]# tar zxvf subversion-1.6.15.tar.gz (用tar命令解压tar.gz文件)
[root@localhost svn]# ls(查看解压后的文件)
httpd-2.2.17.tar.gz subversion-1.6.15 subversion-1.6.15.tar.gz
[root@localhost svn]# cd subversion-1.6.15(进入解压目录)
[root@localhost subversion-1.6.15]# ls(查看解压目录下的文件)
aclocal.m4 build-outputs.mk contrib HACKING README www
autogen.sh CHANGES COPYING INSTALL subversion
BUGS COMMITTERS doc Makefile.in tools
build configure gen-make.opts notes TRANSLATING
build.conf configure.ac gen-make.py packages win-tests.py
[root@localhost subversion-1.6.15]# ./configure –help(查看configure的帮助文档)
[root@localhost svn]#sqlite-amalgamation-3.6.13.tar.gz(下载并加压该包)
[root@localhost svn]tar xzvf sqlite-amalgamation-3.6.13.tar.gz
[root@localhost svn]# mkdir /usr/local/mytools/svn/subversion-1.6.15/sqlite-amalgamation | cp sqlite-3.6.13/sqlite3.c /usr/local/mytools/svn/subversion-1.6.15/sqlite-amalgamation(在svn安装包下创建sqlite-amalgamation,并且将sqlite-3.6.13包中的sqlite3.c拷贝到sqlite-amalgamation,可以解决svn编译时出现的configure: error: Subversion requires SQLite
问题)
[root@localhost subversion-1.6.15]# ./configure --prefix=/usr/local/bin/subversion1.6.15 --with-apxs=/usr/local/bin/apache2.2.17/bin/apxs --with-apr=/usr/local/bin/subversion1.6.15/svn/apr --with-apr-util=/usr/local/bin/subversion1.6.15/svn/apr-util --with-zlib=/usr/local/bin/subversion1.6.15/svn/zlib --with-ssl --enable-maintainer-mode(在当前目录下执行configure命令进行配置,--with-apxs参数表示将SVN安装到Apache下面)
[root@localhost subversion-1.6.15]#make
[root@localhost subversion-1.6.15]#make install
(在make时出错/usr/bin/ld: cannot find -lexpat
collect2: ld returned 1 exit status
make: *** [subversion/svn/svn] Error 1
原因缺少了lexpat包,使用yum查找到相应的源并进行安装
yum list expat*(估计包升级了,如果查找lexpat找不到就找expat包)
yum install expat****.386
使用yum安装后源文件一般存储在/var/cache/yum目录下
如果使用的是光盘安装,可以在安装光盘中找到相应的expat库文件
)