码迷,mamicode.com
首页 > 其他好文 > 详细

关于trac+svn的配置(邮件及权限)及使用说明

时间:2016-09-09 01:15:43      阅读:870      评论:0      收藏:0      [点我收藏+]

标签:配置文件   用户名   防火墙   密码   tarc   svn   

首先需要搭建trac+svn的环境,那么我这里介绍的是在centos 6.5上的使用介绍。(一键安装包)

我是在没有图形界面的系统上安装的,有一点就是想没想过,没有图形界面没有命令怎么重启服务呢,这一只也是我困扰的问题,如果是图形界面的怎么重启呢,现在告诉大家。如果是默认安装的话,路径是/opt/trac-1.0.1-3下有个manager-linux-x64.run这样的文件,直接./manager-linux-x64.run即可,在下图里有个Manager Server里重启即可。至于没有图形界面的本人还没解决,不过好在一般修改配置文件刷新页面也能过来。

技术分享

首先搭建完成后不要急于去浏览是否安装完成,首先检查防火墙是否关闭,其次在访问,如果还是不行,关闭selinux在访问就好了吧,如下图,按照提示点击进去,技术分享技术分享那么期待已久的画面已经出现在面前了,,那么正常的页面如下图所示。技术分享

那么现在就要登陆了,一想,用户名和密码哪里去了,,,还记不记得安装过程中有个让填写用户名密码的过程,好吧,就是那个。

如下是添加svn用户的过程。

其次在/opt/trac-1.0.1-3/apps/trac/trac_repositories/repository/conf这个路径下有个passwd文件

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
# harry = harryssecret
# sally = sallyssecret
admin =123.com  #直接在这里添加用户名密码就可以啦,方便吧。那么在此路径下还有个文件authz文件需要稍作修改,不然会出错的哦!

# [repository:/baz/fuz]
# @harry_and_sally = rw
* = r #把这里的注释去掉就可以了,,,嘿嘿!

好,废话不多说,现在登录看看。哇,真能登录啊,好神奇有木有。


技术分享

那么具体里面的介绍请参考这篇博文http://blog.sina.com.cn/s/blog_131acc34b0102v3ab.html

 

接下来,就讲讲项目中到底怎么使用呢。

当然就是要更改配置文件trac.ini了,在我的配置里,普通开发人员是只有接受任务,提交任务之说(这里添加了新建任务,由于公司人数需要,可以直接在管理页面去掉相应权限即可)。而管理人员就是起到测试,新建任务、关闭任务等等权限了,下面我把详细的配置粘到这里大家可以参考下

 

# -*- coding: utf-8 -*-

[account-manager]
account_changes_notify_addresses =
password_file = /opt/trac-1.0.1-3/apps/trac/users/htpasswd
password_format = htpasswd
password_store = HtPasswdStore
user_lock_max_time = 0

[attachment]
max_size = 262144
max_zip_size = 2097152
render_unsafe_content = false

[browser]
color_scale = True
downloadable_paths = /trunk, /branches/*, /tags/*
hide_properties = svk:merge
intermediate_color =
intermediate_point =
newest_color = (255, 136, 136)
oldest_color = (136, 136, 255)
oneliner_properties = trac:summary
render_unsafe_content = false
wiki_properties = trac:description

[changeset]
max_diff_bytes = 10000000
max_diff_files = 0
wiki_format_messages = true

[components]
acct_mgr.* = enabled
tracopt.versioncontrol.svn.svn_fs.subversionconnector = enabled

[header_logo]
alt =
height = -1
link =
src = site/ld.png        #这是logo的位置是在把图片放              
width = -1              到/opt/trac-1.0.1-3/apps/trac/trac_projects/project/htdocs即可

[inherit]
htdocs_dir =
plugins_dir =
templates_dir =

[logging]
log_file = trac.log
log_level = DEBUG
log_type = none

[milestone]
stats_provider = DefaultTicketGroupStatsProvider

[mimeviewer]
max_preview_size = 262144
mime_map = text/x-dylan:dylan, text/x-idl:ice, text/x-ada:ads:adb
mime_map_patterns = text/plain:README|INSTALL|COPYING.*
pygments_default_style = trac
pygments_modes =
tab_width = 8
treat_as_binary = application/octet-stream, application/pdf, application/postscript, application/msword,application/rtf,

[notification]
admit_domains =
always_notify_owner = false
always_notify_reporter = false
always_notify_updater = true
ambiguous_char_width = single
batch_subject_template = $prefix Batch modify: $tickets_descr
email_sender = SmtpEmailSender
ignore_domains =
mime_encoding = base64          #此项改为base64。
sendmail_path = sendmail
smtp_always_bcc =
smtp_always_cc =
smtp_default_domain =
smtp_enabled = true               #很重要要打开
smtp_from =test@126.com
smtp_from_author = false
smtp_from_name =
smtp_password =password(test@126.com的密码)
smtp_port = 25
smtp_replyto = trac@localhost
smtp_server = smtp.126.com       #很重要
smtp_subject_prefix = __default__
smtp_user =user
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = false

[project]
admin =
admin_trac_url = .
descr = My example project
footer = Visit the Trac open source project at
http:/trac.edgewall.org/http://trac.edgewall.org/">http://trac.edgewall.org/>
icon = common/trac.ico
name = project
url =

[query]
default_anonymous_query = status!=closed&cc~=$USER
default_query = status!=closed&owner=$USER
items_per_page = 100
ticketlink_query = ?status=!closed

[report]
items_per_page = 100
items_per_page_rss = 0

[revisionlog]
default_log_limit = 100
graph_colors = [‘#cc0‘, ‘#0c0‘, ‘#0cc‘, ‘#00c‘, ‘#c0c‘, ‘#c00‘]

[roadmap]
stats_provider = DefaultTicketGroupStatsProvider

[search]
min_query_length = 3

[ticket]
default_cc =
default_component =
default_description =
default_keywords =
default_milestone =
default_owner = < default >
default_priority = 一般问题
default_resolution = fixed
default_severity =
default_summary =
default_type = defect
default_version =
max_comment_size = 262144
max_description_size = 262144
preserve_newlines = default
restrict_owner = false
workflow = ConfigurableTicketWorkflow

[ticket-workflow]                          #此项是关键,也是分配开发人员和管理员的权限区别所在。
accept = new,reopened,assigned -> accepted  详细配置如下:注解:开发人员有new-accept-resolved三个
accept.operations = set_owner_to_self      状态的权限,而开发人员有new-accept-resolved-closed-
accept.permissions = TICKET_MODIFY         reopen-zccept整个权限,具体的配置注解,这里不做过多解

                                         释。
leave = * -> *
leave.default = 1
leave.operations = leave_status

reassign = new,assigned -> new
reassign.operations = TICKET_MODIFY
reassign.operations = set_owner
reassign.permissions = TICKET_CREATE

reopen = resolved,verified,closed -> reopened
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE

resolve = new,assigned,accepted -> resolved
resolve.operations = TICKET_MODIFY
resolve.operations = set_resolution

 

reopen = closed -> reopened
reopen.permissions = TICKET_CREATE
reopen.operations = TICKET_MODIFY


close = resolved -> closed
close.permissions = TICKET_CREATE
close.operations = TICKET_MODIFY

[timeline]
abbreviated_messages = True
changeset_collapse_events = false
changeset_long_messages = false
changeset_show_files = 0
default_daysback = 30
max_daysback = 90
newticket_formatter = oneliner
ticket_show_details = false

[trac]
auth_cookie_lifetime = 0
auth_cookie_path =
authz_file =
authz_module_name =
auto_preview_timeout = 2.0
auto_reload = False
backup_dir = db
base_url =
check_auth_ip = false
database = sqlite:db/trac.db
debug_sql = False
default_charset = utf-8
default_date_format =
default_dateinfo_format = relative
default_handler = WikiModule

close = verified -> closed
close.permissions = TICKET_MODIFY

[timeline]
abbreviated_messages = True
changeset_collapse_events = false
changeset_long_messages = false
changeset_show_files = 0
default_daysback = 30
max_daysback = 90
newticket_formatter = oneliner
ticket_show_details = false

[trac]
auth_cookie_lifetime = 0
auth_cookie_path =
authz_file =
authz_module_name =
auto_preview_timeout = 2.0
auto_reload = False
backup_dir = db
base_url =
check_auth_ip = false
database = sqlite:db/trac.db
debug_sql = False
default_charset = utf-8
default_date_format =
default_dateinfo_format = relative
default_handler = WikiModule
default_language = zh_CN
default_timezone =
genshi_cache_size = 128
htdocs_location =
ignore_auth_case = false
jquery_location =
jquery_ui_location =
jquery_ui_theme_location =
mainnav = wiki, timeline, roadmap, browser, tickets, newticket, search
metanav = login, logout, prefs, help, about
mysqldump_path = mysqldump
never_obfuscate_mailto = false
permission_policies = DefaultPermissionPolicy, LegacyAttachmentPolicy
permission_store = DefaultPermissionStore
pg_dump_path = pg_dump
repository_dir = /opt/trac-1.0.1-3/apps/trac/trac_repositories/repository
repository_sync_per_request = (default)
repository_type = svn
resizable_textareas = true
secure_cookies = False
show_email_addresses = false
show_ip_addresses = false
timeout = 20
use_base_url_for_redirect = False
use_xsendfile = false

[versioncontrol]
allowed_repository_dir_prefixes =

[wiki]
ignore_missing_pages = false
max_size = 262144
render_unsafe_content = false
safe_schemes = cvs, file, ftp, git, irc, http, https, news, sftp, smb, ssh, svn, svn+ssh
split_page_names = false

其中也包含了发送邮件的配置,,嘿嘿!!!

下面是权限思想

技术分享

 

那么下面是一些具体的图片技术分享


技术分享

技术分享

 

创建多个工程:

创建工程trac-admin /opt/trac/trac_project/myproject(工程路径) initenv
创建用户trac-admin  /opt/trac/trac_project/myproject permission add admin TRAC_ADMIN

前提找到trac-admin这个执行脚本,这里不做过多解释,根据实际去找


注:转载请注明出处。

详情请询问QQ:1183810577


















本文出自 “许你七十年” 博客,请务必保留此出处http://chavaz.blog.51cto.com/6876806/1850789

关于trac+svn的配置(邮件及权限)及使用说明

标签:配置文件   用户名   防火墙   密码   tarc   svn   

原文地址:http://chavaz.blog.51cto.com/6876806/1850789

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!