<p style="-webkit-print-color-adjust: exact; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px; margin-top: 0px !important;"><span style="font-size: 1.5em;">Redmine日常使用</span></p> <h3 style="-webkit-print-color-adjust: exact; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, sans-serif;">1、主题更换</h3> <blockquote style="-webkit-print-color-adjust: exact; margin: 15px 0px; border-left-color: #dddddd; padding: 0px 15px; color: #777777; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> <p style="-webkit-print-color-adjust: exact; margin: 0px;">我能说默认主题弱爆了,果断对我等折腾的人一定要换,官网上直接给出了安装方法,链接如下 <a style="-webkit-print-color-adjust: exact; color: #4183c4;" href="http://www.redmine.org/projects/redmine/wiki/Themes">关于Redmine主题更换页</a><br style="-webkit-print-color-adjust: exact;" /><a style="-webkit-print-color-adjust: exact; color: #4183c4;" href="http://www.redmine.org/projects/redmine/wiki/Theme_List">官网的可选主题列表</a><br style="-webkit-print-color-adjust: exact;" /><a style="-webkit-print-color-adjust: exact; color: #4183c4;" href="http://www.redmine.org/projects/redmine/wiki/HowTo_create_a_custom_Redmine_theme">官网自定义主题页</a></p> </blockquote> <p style="-webkit-print-color-adjust: exact; margin: 15px 0px; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">从主题上找一个自己喜欢的,我自己找了一个redmine-theme-basecamp-with-icon的主题,按照提示安装如下</p> <pre style="-webkit-print-color-adjust: exact; margin: 15px 0px; background-color: #f8f8f8; border: 1px solid #cccccc; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><code style="-webkit-print-color-adjust: exact; margin: 0px; padding: 0px; border: none; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"># git clone https://github.com/lqez/redmine-theme-basecamp-with-icon.git /var/redmine/public/themes/basecamp-with-icon <br />\\后面的路径就是Redmine安装包存放的位置的public/theme目录下 <br /><br />#(可选)这个主题的提示需要打一个补丁,其余主题视相关提示 <br /><br /># sh /var/redmine/public/themes/basecamp-with-icon/patch.sh # Administration > Settings > Display,<br />应该就可以看到新安装的主题了,当然了,如果没有,记得重启Redmine就好 </code></pre> <h3 style="-webkit-print-color-adjust: exact; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, sans-serif;">2、安装/卸载插件</h3> <blockquote style="-webkit-print-color-adjust: exact; margin: 15px 0px; border-left-color: #dddddd; padding: 0px 15px; color: #777777; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> <p style="-webkit-print-color-adjust: exact; margin: 0px;">redmine强劲之处在于插件,通过插件增加更多的功能,所以插件已经成为Redmine必不可少的组件了</p> </blockquote> <p style="-webkit-print-color-adjust: exact; margin: 15px 0px; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">推荐插件: <br />projects_tree_view //插件,将项目按照父子关系,整理程属性结构 <br />redmine_attach_screenshot //上传截图插件 <br />redmine_ckeditor //redmine中的ckeditor插件,高级功能插件 <br />redmine_ezlibrarian //redmine中的图书、设备管理插件 <br />redmine_importer //redmine用户以及bug导入插件 <br />redmine_code_review //redmine的用户代码审查插件 <br />timesheet_plugin //工时单插件,可以方便查看各个人的各个项目的工时情况 <br />google_anayltics_plugin //支持第三方统计的插件,可用google或者其他插件 <br />redmine_last_messages //显示论坛中最新发言或者回复的文件清单 <br />ezfaq_plugin //支持faq功能 <br />advanced_roadmap //redmine高级路线图插件,可以方便的知道那个版本的实现时间的 <br style="-webkit-print-color-adjust: exact;" />Due Date Reminder plugin <br />Redmine Banner plugin <br />Redmine Free Mind plugin <br />Redcarpet Markdown Wiki formatter <br />Redmine Wiki Extensions plugin <br />Redmine Wiki Notes plugin</p> <p style="-webkit-print-color-adjust: exact; margin: 15px 0px; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">这里以code_review作为示例进行安装</p> <pre style="-webkit-print-color-adjust: exact; margin: 15px 0px; background-color: #f8f8f8; border: 1px solid #cccccc; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><code style="-webkit-print-color-adjust: exact; margin: 0px; padding: 0px; border: none; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">1. 插件地址https://bitbucket.org/haru_iida/redmine_code_review/overview <br />cd /var/redmine/plugins/ <br />hg clone https://bitbucket.org/haru_iida/redmine_code_review/overview <br /><br />2. If the plugin requires a migration, run the following command to upgrade your database (make a db backup before) <br />根据插件自带的readme,得知该插件需要迁移到库中 <br />rake redmine:plugins:migrate RAILS_ENV=production <br /><br />3. 重启redmine 因为之前做过redmine整合nginx,所以直接重启nginx即可,还有一种重启redmine的方法,后面提到 <br /><br />4. 这时候再看到Administration > Settings > plugins中就可以看到新安装插件的信息了 <br /><br />5. 卸载插件 <br /># rake redmine:plugins:migrate NAME=plugin_name VERSION=0 RAILS_ENV=production 再从插件目录中删除插件即可,重启redmine </code></pre> <h3 style="-webkit-print-color-adjust: exact; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, sans-serif;">3、发送email</h3> <blockquote style="-webkit-print-color-adjust: exact; margin: 15px 0px; border-left-color: #dddddd; padding: 0px 15px; color: #777777; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> <p style="-webkit-print-color-adjust: exact; margin: 0px;">默认的Redmine上通知联系人都是通过email的,所以这时候就需要稍微调整下发送email来完成最基本的通知功能了<br style="-webkit-print-color-adjust: exact;" /><a style="-webkit-print-color-adjust: exact; color: #4183c4;" href="http://www.redmine.org/projects/redmine/wiki/EmailConfiguration">官方邮件设置页</a></p> </blockquote> <pre style="-webkit-print-color-adjust: exact; margin: 15px 0px; background-color: #f8f8f8; border: 1px solid #cccccc; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><code style="-webkit-print-color-adjust: exact; margin: 0px; padding: 0px; border: none; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">1、需SMTP登陆验证的电子邮件配置,在configuration.yml增加 <br /># cp config/configuration.yml.example config/configuration.yml <br />production: <br /> delivery_method: :smtp <br /> smtp_settings:<br /> address: smtp.example.net <br /> port: 25 <br /> domain: example.net <br /> authentication: :login <br /> user_name: redmine@example.net <br /> password: redmine <br /><br />development: <br /> delivery_method: :smtp <br /> smtp_settings: <br /> address: 127.0.0.1 <br /> port: 25 <br /> domain: example.net <br /> authentication: :login <br /> user_name: redmine@example.net <br /> password: redmine <br /><br />2、如果你想使用TLS-requiring SMTP servers,必须设置TLS-related settings <br />production: <br /> delivery_method: :smtp <br /> smtp_settings: tls: true <br /> enable_starttls_auto: true <br /> address: "smtp.gmail.com" <br /> port: '587' <br /> domain: "smtp.gmail.com" <br /> authentication: :plain <br /> user_name: "your_email@gmail.com" <br /> password: "your_password" <br /><br />3、不需要登陆验证的设置 <br />production: <br /> delivery_method: :smtp <br /> smtp_settings: <br /> address: smtp.knology.net <br /> port: 25 <br /> domain: cybersprocket.com <br /> authentication: :none </code></pre> <h3 style="-webkit-print-color-adjust: exact; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, sans-serif;">4、附件存储位置</h3> <pre style="-webkit-print-color-adjust: exact; margin: 15px 0px; background-color: #f8f8f8; border: 1px solid #cccccc; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><code style="-webkit-print-color-adjust: exact; margin: 0px; padding: 0px; border: none; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">#编辑${redmine_install_path}/config/configuration.yml文件,找到如下字段 <br /># Absolute path to the directory where attachments are stored. <br /># The default is the 'files' directory in your Redmine instance. <br /># Your Redmine instance needs to have write permission on this <br /># directory. <br /># Examples: <br /># attachments_storage_path: /var/redmine/files //默认的存放位置 <br /># attachments_storage_path: D:/redmine/files //win下的路径 <br />attachments_storage_path: </code></pre> <h3 style="-webkit-print-color-adjust: exact; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, sans-serif;">5、日志功能</h3> <pre style="-webkit-print-color-adjust: exact; margin: 15px 0px; background-color: #f8f8f8; border: 1px solid #cccccc; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><code style="-webkit-print-color-adjust: exact; margin: 0px; padding: 0px; border: none; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">cp config/additional_environment.rb.example config/additional_environment.rb <br /><br />#增加如下几行 <br />#Logger.new(PATH,NUM_FILES_TO_ROTATE,FILE_SIZE) <br />config.logger = Logger.new(config.log_path, 2, 1000000) <br />config.logger.level = Logger::INFO </code></pre> <h3 style="-webkit-print-color-adjust: exact; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, sans-serif;">6、备份</h3> <pre style="-webkit-print-color-adjust: exact; margin: 15px 0px; background-color: #f8f8f8; border: 1px solid #cccccc; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><code style="-webkit-print-color-adjust: exact; margin: 0px; padding: 0px; border: none; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">#备份最小的情况应该包括库的备份和附件的备份等,当然如果还要考虑插件,主题等需要备份的就更多了 <br /># Database /usr/bin/mysqldump -u <username> -p<password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz <br /># Attachments rsync -a /path/to/redmine/files /path/to/backup/files <br />#其余的备份视自己随意了 </code></pre> <h3 style="-webkit-print-color-adjust: exact; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, sans-serif;">7、关于redmine的重启</h3> <blockquote style="-webkit-print-color-adjust: exact; margin: 15px 0px; border-left-color: #dddddd; padding: 0px 15px; color: #777777; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> <p style="-webkit-print-color-adjust: exact; margin: 0px;">前面不少文章都提到了重启redmine,所以这边单独拿出来</p> </blockquote> <p style="-webkit-print-color-adjust: exact; margin: 15px 0px; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">通过passenger的用户手册中了解到重启redmine的方式有两种,地址<a style="-webkit-print-color-adjust: exact; color: #4183c4;" href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_redeploying_restarting_the_ruby_on_rails_application">redmine重启</a></p> <pre style="-webkit-print-color-adjust: exact; margin-top: 15px; margin-right: 0px; margin-left: 0px; background-color: #f8f8f8; border: 1px solid #cccccc; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; margin-bottom: 0px !important;"><code style="-webkit-print-color-adjust: exact; margin: 0px; padding: 0px; border: none; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">1. 重启nginx <br />2. 在$(redmine_content_path)/tmp/下以root身份创建一个restart.txt文件,Phusion Passenger会在请求重启应用</code></pre>
来源:oschina
链接:https://my.oschina.net/u/929745/blog/262799