经过很长一段时间的研究终于在AIX 系统上装上了 svn ,太不容易了。可能由于系统的不一样会出现不同的问题,仅供大家参考借鉴。
<!--[if !supportLists]-->1、<!--[endif]-->介质准备
subversion-1.4.6-apache-python.tar.gz |
<!--[if !supportLists]-->ü <!--[endif]-->下载apr-util-1.2.12.tar.gz、apr-1.2.12.tar.gz包
<!--[if !supportLists]-->ü <!--[endif]-->从http://www.collab.net上下载集成版的SVN(subversion-1.4.6-apache-python.tar.gz)。
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter" /> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0" /> <v:f eqn="sum @0 1 0" /> <v:f eqn="sum 0 0 @1" /> <v:f eqn="prod @2 1 2" /> <v:f eqn="prod @3 21600 pixelWidth" /> <v:f eqn="prod @3 21600 pixelHeight" /> <v:f eqn="sum @0 0 1" /> <v:f eqn="prod @6 1 2" /> <v:f eqn="prod @7 21600 pixelWidth" /> <v:f eqn="sum @8 21600 0" /> <v:f eqn="prod @7 21600 pixelHeight" /> <v:f eqn="sum @10 21600 0" /> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /> <o:lock v:ext="edit" aspectratio="t" /> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:415.5pt; height:245.25pt'> <v:imagedata src="file:///C:\Users\StyleAnt\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:414.75pt;height:191.25pt'> <v:imagedata src="file:///C:\Users\StyleAnt\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
我下载的最高版本是1.4.6的二进制包。对应的Apache的版本是2.2.4。
<!--[if !supportLists]-->ü <!--[endif]-->下载Apache 2.2.4版本。(这里就不赘述,可以上Apache官方下载,名称为httpd-2.2.4.tar.gz)
注:查看当前AIX的OS命令:bootinfo –K,如下图,这是我的机器上的版本。
<!--[if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" style='width:132pt;height:20.25pt'> <v:imagedata src="file:///C:\Users\StyleAnt\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
检查当前的机器上是否具备gcc的编译器命令,gcc –v
<!--[if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style='width:414.75pt;height:42.75pt'> <v:imagedata src="file:///C:\Users\StyleAnt\AppData\Local\Temp\msohtmlclip1\01\clip_image007.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
如果没有,请安装,否则编译Apache的时候会报错(方法如下,摘抄至网络,多谢这位哥们的无私奉献,O(∩_∩)O~)。
安装GCC (1)从IBM上下载 (2)因AIX5.3已默认安装rpm,故只需以root身份利用ftp将上述五个rpm文件上传到/usr/opt/freeware/src/packages/SOURCES (3)以root登录并安装 #cd /usr/opt/freeware/src/packages/SOURCES #rpm -ivh gcc-4.2.0-3.aix5.3.ppc.rpm #rpm -ivh libgcc-4.2.0-3.aix5.3.ppc.rpm #rpm -ivh libstdcplusplus-4.2.0-3.aix5.3.ppc.rpm #rpm -ivh libstdcplusplus-devel-4.2.0-3.aix5.3.ppc.rpm #rpm -ivh gcc-cplusplus-4.2.0-3.aix5.3.ppc.rpm |
2、安装SVN,步骤如下:
<!--[if !supportLists]-->ü <!--[endif]--># gunzip subversion-1.4.6-apache-python.tar.gz
<!--[if !supportLists]-->ü <!--[endif]--># tar -xvf subversion-1.4.6-apache-python.tar
<!--[if !supportLists]-->ü <!--[endif]-->给subversion目录添加权限,参照:# chown -R root:system /opt/subversion/
<!--[if !supportLists]-->ü <!--[endif]-->在AIX的profile里添加LIBPATH=/opt/subversion/lib
<!--[if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" style='width:168pt;height:90pt'> <v:imagedata src="file:///C:\Users\StyleAnt\AppData\Local\Temp\msohtmlclip1\01\clip_image009.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
3、安装Apache2.2.4,步骤如下:
<!--[if !supportLists]-->ü <!--[endif]-->apr-1.2.12.tar.gz步骤:
# gunzip apr-1.2.12.tar.gz
# tar xvf apr-1.2.12.tar
# cd apr-1.2.12
# ./configure
# make
# make install
<!--[if !supportLists]-->ü <!--[endif]-->apr-util-1.2.12.tar.gz步骤:
# gunzip apr-util-1.2.12.tar.gz
# tar xvf apr-util-1.2.12.tar
# cd apr-util-1.2.12
# ./configure
# make
# make install
<!--[if !supportLists]-->ü <!--[endif]-->apache2.2.4
安装步骤:
# gunzip httpd-2.2.6.tar.gz
# tar xvf httpd-2.2.6.tar
# cd httpd-2.2.6
#./configure --prefix=/usr/local/apache2 --enable-dav=shared
--enable-dav-fs=shared --enable-maintainer-mode
=====================
编译 apache 的时候记得加上
--enable-dav=shared --enable-dav-fs=shared --enable-maintainer-mode
否则和svn是整合不了
======================
# make
# make install
4、将SVN与Apache整合,步骤如下:
<!--[if !supportLists]-->ü <!--[endif]-->修改apache 配置文件:
../apache2/conf/httpd.conf
修改成:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
User nobody
Group nobody
Listen 80
ServerName <本机所在IP>:80
<Location /SVN/SXHT>
DAV svn
SVNPath /SVN/SXHT#svn父目录
AuthType Basic#连接类型设置
AuthName "Subversion.zoneyump"#连接框提示
AuthUserFile /SVN/SXHT/conf/svnusers.conf#权限配置文件
Require valid-user#采用何种认证
</Location>
注意:检查../apache2/modules/目录下是否存在mod_dav_svn.so和mod_authz_svn.so文件,如果没有,则需要从/opt/subversion/lib/svn-apache/拷贝过去。
Apache的httpd.conf说明
设置 |
解释 |
<Location /svn> |
意思是Subversion版本库的URL是http://MyServer/svn/ |
DAV svn |
告诉Apache是哪个模块响应那个URL的请求-此刻是Subversion模块。 |
SVNListParentPath on |
对于Subversion1.3或者更高版本,这个指示表示显示所有SVNParentPath下的版本库。 |
SVNParentPath D:\SVN |
告诉Subversion需要查看的版本库位于D:\SVN之下 |
AuthType Basic |
激活基本认证,就是用户名/密码 |
AuthName "Subversion repositories" |
用来说明何时弹出要求用户输入认证信息的认证对话框 |
AuthUserFile passwd |
指定使用的认证密码文件 |
AuthzSVNAccessFile |
位置Subversion版本库的访问控制文件的路径 |
Require valid-user |
指定只有输入了正确的用户/密码的用户可以访问URL |
另见文章:http://www.uml.org.cn/pzgl/2009040310.asp
<!--[if !supportLists]-->ü <!--[endif]-->加入认证信息:
用Apache自带的htpasswd命令创建文件
# mkdir /SVN/SXHT/conf/
# htpasswd -c /SVN/SXHT/conf/svnusers.conf linuxing
New password:
Re-type new password:
Adding password for user linuxing
添加新用户的时候使用htpasswd –m 命令、还可以使用htpasswd –m修改密码或者htpasswd –d删除用户名等,如下所示:
# htpasswd -m /SVN/SXHT/conf/svnusers.conf NewUserName#第二次添加新用户
# htpasswd -m /SVN/SXHT/conf/svnusers.conf OldUserName#修改密码
# htpasswd –d /SVN/SXHT/conf/svnusers.conf OldUserName#删除用户
注:-m 是可选的参数,当用-c创建用户名信息文件后,即可修改或添加用户信息。
参考资料:http://www.uml.org.cn/pzgl/200908078.asp
<!--[if !supportLists]-->ü <!--[endif]-->启动Apache。IE访问http://ip/80/SVN/SXHT即可看见如下界面:
<!--[if gte vml 1]><v:shape id="_x0000_i1030" type="#_x0000_t75" alt="" style='width:244.5pt;height:258.75pt'> <v:imagedata src="file:///C:\Users\StyleAnt\AppData\Local\Temp\msohtmlclip1\01\clip_image011.jpg" o:href="http://www.uml.org.cn/pzgl/images/untitled61.JPG" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
登陆进去,则见以下界面:
<!--[if gte vml 1]><v:shape id="_x0000_i1031" type="#_x0000_t75" style='width:248.25pt;height:135pt'> <v:imagedata src="file:///C:\Users\StyleAnt\AppData\Local\Temp\msohtmlclip1\01\clip_image012.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
5、备注说明:
有可能提交代码的时候会遇见以下问题:
1.svn:Can't create directory'/subversion/main/db/transactions/0-1.txn':Permission denie d
解答:设置svn配置库库文件夹的权限(chmod -R 777 /SVN/SXHT/)
2.Error:服务器发送了意外的返回值(403 Forbidden),在响应"CHECKOUT"的请求Error:"/svn/www/!/SVN/SXHT/1/111/bbb.txt"中
解答:提交人没有权限,可设置提交权限即可。
-- 详细请查看附件