|
|
@ -1,77 +1,47 @@
|
|
|
|
1. create database rk_svnadmin
|
|
|
|
# 1、SVN统一管理平台
|
|
|
|
2. mvn eclipse:eclipse -Dwtpversion=1.0
|
|
|
|
现状:
|
|
|
|
|
|
|
|
主要用于统一管理SVN,以及SVN中的项目、用户、权限等。已经存在的类似工具,参考Svn Admin。
|
|
|
|
服务器启动完手动执行alter
|
|
|
|
目前已经实现用户权限配置、项目添加管理等功能。正在实现用户组管理、邮件提醒功能。
|
|
|
|
|
|
|
|
正在不断完善。。。
|
|
|
|
```
|
|
|
|
目标:
|
|
|
|
alter table pj_gr add constraint FK_Relationship_2 foreign key (pj) references pj (pj) on delete restrict on update restrict;
|
|
|
|
实现在通过 web浏览器管理Svn的项目,管理项目的用户,管理项目的权限。使得管理配置Svn更简便,再也不需要每次都到服务器修改配置文件。
|
|
|
|
alter table pj_gr_auth add constraint FK_Reference_6 foreign key (pj, gr) references pj_gr (pj, gr) on delete restrict on update restrict;
|
|
|
|
# 2、环境搭建
|
|
|
|
alter table pj_gr_usr add constraint FK_Reference_10 foreign key (pj, gr) references pj_gr (pj, gr) on delete restrict on update restrict;
|
|
|
|
## 1、所需要的基础开发软件工具
|
|
|
|
alter table pj_gr_usr add constraint FK_Reference_9 foreign key (usr) references usr (usr) on delete restrict on update restrict;
|
|
|
|
* svn服务端[需要管理这个东西]
|
|
|
|
alter table pj_usr add constraint FK_Reference_5 foreign key (pj) references pj (pj) on delete restrict on update restrict;
|
|
|
|
* Java[基于这个语言开发的]
|
|
|
|
alter table pj_usr add constraint FK_Reference_7 foreign key (usr) references usr (usr) on delete restrict on update restrict;
|
|
|
|
* Tomcat[Web容器,你懂得]
|
|
|
|
alter table pj_usr_auth add constraint FK_Reference_11 foreign key (pj) references pj (pj) on delete restrict on update restrict;
|
|
|
|
* Eclipse[集成开发工具,这个可以是别的]
|
|
|
|
alter table pj_usr_auth add constraint FK_Reference_8 foreign key (usr) references usr (usr) on delete restrict on update restrict;
|
|
|
|
* maven[项目依赖管理工具]
|
|
|
|
```
|
|
|
|
* ehcache[缓存工具]
|
|
|
|
|
|
|
|
* freemarker[静态页生成工具]
|
|
|
|
Centos安装apache+svn结合的SVN服务器
|
|
|
|
* quartz Scheduler[定时任务工具]
|
|
|
|
|
|
|
|
* shiro[权限管理工具]
|
|
|
|
#1、yum安装下列的一些包:
|
|
|
|
* nutz[mvc框架,主要就是用来展示这货的。hi 羊驼炒鸭梨 ,你要给力奥!]
|
|
|
|
|
|
|
|
* mysql[数据库,这个可以是其他的任何关系型数据库,只要JDBC可以连接基本没有压力]
|
|
|
|
yum install apr apr-util httpd httpd-devel subversion mod_dav_svn mod_auth_mysql
|
|
|
|
* 恩,基本就是上面这些东西啦。
|
|
|
|
|
|
|
|
|
|
|
|
#2、建立svn的目录
|
|
|
|
## 2、开始环境搭建
|
|
|
|
|
|
|
|
首先,要使用git将github上面的这个项目更新到本地。这个步骤,可以是使用git直接更新也可以使用eclipse中的egit直接在开发环境中更新到本地[mvn eclipse:eclipse -Dwtpversion=1.0]。
|
|
|
|
mkdir -p /code/svndata
|
|
|
|
编译代码,下载相关的依赖jar包。憋紧张,这个过程是集成开发工具配合maven完成的。你只需要静静的看着。
|
|
|
|
|
|
|
|
然后,创建数据库[create database rk_svnadmin],然后,将config.properties文件中的数据库地址、用户名和密码修改完成。之后,启动项目。
|
|
|
|
#3、创建一个库就叫SVN:
|
|
|
|
静静的等待吧,骚年!
|
|
|
|
|
|
|
|
Tomcat启动完成之后,在浏览器中输入http://localhost:8080/rk_svnadmin/user/login
|
|
|
|
svnadmin create /code/svndata/svn
|
|
|
|
ok.看到登录页面了吧?接下来输入用户名:admin 密码:123 点击登录,被问我怎么知道的,在代码中有,不信自己去看。
|
|
|
|
|
|
|
|
环境搭建完毕,接下来,骚年,尽情的释放你的洪荒之力吧!!
|
|
|
|
|
|
|
|
对了,数据库还没完,添上关联关系
|
|
|
|
正常安全以上软件后,会在/etc/httpd/modules目录下生成mod_dav_svn.so、mod_authz_svn.so两个模块
|
|
|
|
完手动执行alter
|
|
|
|
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
|
|
|
|
|
|
|
|
|
|
|
|
……
|
|
|
|
#4、配置apache的httpd.conf
|
|
|
|
alter table pj_gr add constraint FK_Relationship_2 foreign key (pj) references pj (pj) on delete restrict on update restrict;
|
|
|
|
vim /etc/httpd/conf/httpd.conf
|
|
|
|
alter table pj_gr_auth add constraint FK_Reference_6 foreign key (pj, gr) references pj_gr (pj, gr) on delete >restrict on update restrict;
|
|
|
|
|
|
|
|
alter table pj_gr_usr add constraint FK_Reference_10 foreign key (pj, gr) references pj_gr (pj, gr) on delete >restrict on update restrict;
|
|
|
|
添加
|
|
|
|
alter table pj_gr_usr add constraint FK_Reference_9 foreign key (usr) references usr (usr) on delete restrict on update restrict;
|
|
|
|
|
|
|
|
alter table pj_usr add constraint FK_Reference_5 foreign key (pj) references pj (pj) on delete restrict on >update restrict;
|
|
|
|
LoadModule dav_svn_module modules/mod_dav_svn.so
|
|
|
|
alter table pj_usr add constraint FK_Reference_7 foreign key (usr) references usr (usr) on delete restrict on update restrict;
|
|
|
|
|
|
|
|
alter table pj_usr_auth add constraint FK_Reference_11 foreign key (pj) references pj (pj) on delete restrict on update restrict;
|
|
|
|
LoadModule authz_svn_module modules/mod_authz_svn.so
|
|
|
|
alter table pj_usr_auth add constraint FK_Reference_8 foreign key (usr) references usr (usr) on delete restrict on update restrict;
|
|
|
|
|
|
|
|
……
|
|
|
|
|
|
|
|
|
|
|
|
chown -R apache:apache /code/svndata/svn/
|
|
|
|
## 3、附录
|
|
|
|
|
|
|
|
Centos安装apache+svn结合的SVN服务器请参考[Centos安装apache+svn结合的SVN服务器](fl.md)
|
|
|
|
chmod -R 755 /code/svndata/svn/
|
|
|
|
管理系统配置请参考[管理系统配置请参考](https://github.com/yuexiaoyun/svnadmin/blob/master/doc/SvnAdmin_Manual_zh_CN.pdf)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#5、要关闭selinux的保护设置为禁用:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vi /etc/selinux/config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
修改SELINUX=disabled
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
保存
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
不重启Linux服务器关闭SeLinux的方法
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setenforce 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#6、关闭防火墙:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/etc/init.d/iptables stop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#7、测试:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http://服务器IP/svn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
输入用户名和密码可以登录表示成功!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#启动httpd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
service httpd start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
管理系统配置请参考[管理系统配置请参考](https://github.com/yuexiaoyun/svnadmin/blob/master/doc/SvnAdmin_Manual_zh_CN.pdf)
|
|
|
|
|
|
|
|