安装SVN:

1、配置防火墙,添加端口 vi /etc/sysconfig/iptables

添加: -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT

2、安装Apache

yum install httpd apr apr-util httpd-devel #安装Apache

yum install mod_dav_svn mod_auth_mysql #安装基于Apache的http模式访问的支持模块

chkconfig httpd on #设置开机启动

service httpd start #启动

Apache httpd -version #查看Apache版本信息

cd /etc/httpd/modules/ #查看是否有mod_dav_svn.so和mod_authz_svn.so模块,如果有,说明mod_dav_svn安装成功!

3、安装SVN

yum install subversion #使用yum命令在线安装

svnserve --version #查看svn版本信息

4、配置SVN

4.1、配置版本库 svnadmin create /www/work/order/svn/orderReceive   #创建svn版本库orderreceive

svnadmin create /www/work/order/svn/ordercenter    #创建svn版本库ordercenter

4.2、配置文件

cp /www/work/order/svn/orderReceive/conf/passwd /www/work/order/svn/conf/passwd

cp /www/work/order/svn/orderReceive/conf/authz /www/work/order/svn/conf/authz

cp /www/work/order/svn/orderReceive/conf/passwd /www/work/order/svn/conf/svnserve.conf

vi passwd:

licc3=2C******

vi authz:

admin = licc3

orderReceive = licc3

vi svnserve.conf

anon-access=none

auth-access=write

password-db=/www/work/order/svn/orderReceive/conf/passwd

authz-db=/www/work/order/svn/orderReceive/conf/authz realm=orderReceive

4.3、启动SVN

svnserve -d -r /www/work/order/svn --config-file /www/work/order/svn/conf/svnserve.conf --listen-port 3690

ps -ef|grep svn|grep -v grep #查看进程

netstat -ln |grep 3690 #检查端口

killall svnserve #关闭svn

5、配置svn支持http访问

5.1、创建认证 htpasswd -cm /www/work/order/svn/conf/http_passwd licc3 htpasswd -m /www/work/order/svn/conf/http_passwd licc3

密码:2CL*****

5.2、设置Apache配置文件 vi /etc/httpd/conf.d/subversion.conf

<Location /svn>

DAV svn

#SVNPath /home/svn

SVNParentPath /www/work/order/svn

# # Limit write permission to list of valid users.

# <LimitExcept GET PROPFIND OPTIONS REPORT>

# # Require SSL connection for password protection.

# # SSLRequireSSL

#

AuthType Basic

AuthName "Authorization SVN"

AuthzSVNAccessFile /www/work/order/svn/conf/authz

AuthUserFile /www/work/order/svn/conf/http_passwd

Require valid-user

# </LimitExcept>

</Location>

5.3、设置目录权限 chown deploy:deploy /www/work/order/ -R

5.4、重启 service httpd restart

jenkins设置: 1、搬用云上的jenkins /tomcat/bin/下的setclasspath.sh文件修改,java的路径。

添加用户: 设置--》安全设置:启用安全,允许用户注册 2、安装插件:

posted on 2017-10-18 18:09  muziangel  阅读(960)  评论(0)    收藏  举报