博客园  :: 首页  :: 联系 :: 订阅 订阅  :: 管理

CentOS5(64位)下Apache+SVN+Submin2安装记录

Posted on 2012-12-14 18:36  Bruce Zhang  阅读(2697)  评论(0编辑  收藏  举报

(1)安装Apache,SVN

从源码安装SVN非常麻烦,这里直接使用VanDisco的rpm包进行安装。

(1.1)加入Wandisco源

wget http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco -O /tmp/RPM-GPG-KEY-WANdisco &>/dev/null
rpm --import /tmp/RPM-GPG-KEY-WANdisco
rm -rf /tmp/RPM-GPG-KEY-WANdisco

(1.2)下载/安装RPM包(64位):

wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/mod_dav_svn-1.6.18-1.x86_64.rpm
wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-1.6.18-1.x86_64.rpm
wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-devel-1.6.18-1.x86_64.rpm
wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-perl-1.6.18-1.x86_64.rpm
wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-python-1.6.18-1.x86_64.rpm
wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-tools-1.6.18-1.x86_64.rpm

yum install subversion-1.6.18-1.x86_64.rpm subversion-perl-1.6.18-1.x86_64.rpm subversion-python-1.6.18-1.x86_64.rpm subversion-tools-1.6.18-1.x86_64.rpm mod_dav_svn-1.6.18-1.x86_64.rpm subversion-devel-1.6.18
-1.x86_64.rpm

备注:Wandisco有时候会删掉某个版本的RPM包。所以,如果发现无法下载,直接到 http://opensource.wandisco.com/centos/5/RPMS 面找

合适的RPM包。

(2)安装Submin2的复制软件

(2.1)安装sqlite3(因为submin2默认需要sqlite3做数据库)。sqlite3在sqlite-devel安装时会被安装,而CentOS5默认并不会安装sqlite-devel。

yum install sqlite-devel -y 
yum install openssl-devel -y

 

(2.2)安装apx(submin2依赖的Apache模块mod_python,mod_wsgi都需要apx)。apx在httpd-devel安装时会被安装。

yum install httpd-devel

(2.3)安装python(Submin2需要Python2.5以上的版本,不过没试过Python3以上的。)

wget http://www.python.org/ftp/python/2.6.8/Python-2.6.8.tgz       
tar -zxvf Python-2.6.8.tgz
cd Python-2.6.8
./configure --with-threads --enable-shared --enable-universalsdk
make && make install    

echo '/usr/local/lib' > /etc/ld.so.conf.d/python2.6.conf
ldconfig
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/bin/python2.6 /usr/bin/python

vi /usr/bin/yum
#把首行显示的 !#/usr/bin/python 修改为 !#/usr/bin/python2.4

 备注:1. “--enable-shared”,必须加。保证python会创建共享库(shared library),否则只会创建静态库(static library)

          2. “--enable-universalsdk”,必须加。保证python会被编译成64位。

            因为后面将要安装的mod_python和mod_wsgi需要python的64位共享库。如果没有,make时会报如下错误:

/usr/sbin/apxs -c -I/usr/local/include/python2.6 -DNDEBUG   mod_wsgi.c -L/usr/local/lib 
    -L/usr/local/lib/python2.6/config  -lpython2.6 -lpthread -ldl  -lutil -lm
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -m64 -mtune=generic  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1  -I/usr/local/include/python2.6 -DNDEBUG  -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o mod_wsgi.la  -rpath /usr/lib64/httpd/modules -module -avoid-version    mod_wsgi.lo -L/usr/local/lib -L/usr/local/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm
/usr/bin/ld: /usr/local/lib/libpython2.6.a(node.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.6.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1

       3. “echo '/usr/local/lib' > /etc/ld.so.conf.d/python2.6.conf” 用以解决如下异常:

                    “./python: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object file: No such file or directory”

 未完,待续。。。