Puppet整合SVN(二):SVN整合Apache1、安装Apache123[root@puppet ~]# yum install -y httpd httpd-devel[root@puppet ~]# service httpd start
[root@puppet ~]# chkconfig httpd on2、配置SVN账号12[root@puppet ~]# /usr/bin/htpasswd -bc /etc/svn_passwd puppet 123456 #首次添加账号
[root@puppet ~]# /usr/bin/htpasswd -bm /etc/svn_passwd test 123456 #再次添加账号3、配置虚拟主机123456789101112
131415[root@puppet ~]# vi /etc/httpd/conf.d/subversion.confLoadModule dav_svn_module /usr/lib64/httpd/modules/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib64/httpd/modules/mod_authz_svn.soListen 8080
DAV svn SVNPath /usr/local/svn/puppet AuthType Basic AuthName “Subversion repository”
AuthUserFile /etc/svn_passwd Require valid-user AuthzSVNAccessFile /etc/svn_access
4、重启服务1[root@puppet ~]# service httpd restart5、开放端口1234[root@puppet ~]# netstat -lant|grep 8080
tcp 0 0 :::8080 :::* LISTEN[root@puppet ~]# iptables -I INPUT -p tcp –dport 8080 -j ACCEPT
[root@puppet ~]# service iptables save6、配置访问权限1234567[root@puppet ~]# vi /etc/svn_access[groups]admins=puppet
[/]@admins=rwtest=r*=7、访问测试IE访问http://10.188.1.73:8080/svn,账号puppet密码123456
12[root@puppet ~]# cd /usr/local/subversion/bin[root@puppet bin]# svn list http://localhost:8080/svn
8、关闭svn进程使用http://访问,就可以关闭SVN进程了,查看进程PID并杀死:123[root@puppet bin]# ps aux|grep svnroot 26379 0.0 0.0 181140 924 ? Ss 11:15 0:00 svnserve -d -r /usr/local/svn/puppet/
[root@puppet bin]# kill -9 26379