{"id":2272,"date":"2012-11-08T21:01:21","date_gmt":"2012-11-08T13:01:21","guid":{"rendered":"https:\/\/kyle.ai\/blog\/?p=2272"},"modified":"2012-11-09T10:03:17","modified_gmt":"2012-11-09T02:03:17","slug":"%e9%a1%b9%e7%9b%ae%e7%ae%a1%e7%90%86%e8%bd%af%e4%bb%b6redmine%e5%ae%89%e8%a3%85%e4%b8%8e%e8%af%95%e7%94%a8","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/2272.html","title":{"rendered":"\u9879\u76ee\u7ba1\u7406\u8f6f\u4ef6redmine\u5b89\u88c5\u4e0e\u8bd5\u7528"},"content":{"rendered":"<p><span style=\"font-size: small;\">Redmine\u662f\u7528Ruby\u5f00\u53d1\u7684\u57fa\u4e8eweb\u7684\u9879\u76ee\u7ba1\u7406\u8f6f\u4ef6\uff0c\u662f\u7528ROR\u6846\u67b6\u5f00\u53d1\u7684\u4e00\u5957\u8de8\u5e73\u53f0\u9879\u76ee\u7ba1\u7406\u7cfb\u7edf\uff0c\u636e\u8bf4\u662f\u6e90\u4e8eBasecamp\u7684ror\u7248\u800c\u6765\uff0c\u652f\u6301\u591a\u79cd\u6570\u636e\u5e93\uff0c\u6709\u4e0d\u5c11\u81ea\u5df1\u72ec\u7279\u7684\u529f\u80fd\uff0c\u4f8b\u5982\u63d0\u4f9bwiki\u3001\u65b0\u95fb\u53f0\u7b49\uff0c\u8fd8\u53ef\u4ee5\u96c6\u6210\u5176\u4ed6\u7248\u672c\u7ba1\u7406\u7cfb\u7edf\u548cBUG\u8ddf\u8e2a\u7cfb\u7edf\uff0c\u4f8b\u5982SVN\u3001CVS\u3001TD\u7b49\u7b49\u3002\u8fd9\u79cd Web \u5f62\u5f0f\u7684\u9879\u76ee\u7ba1\u7406\u7cfb\u7edf\u901a\u8fc7\u201c\u9879\u76ee\uff08Project\uff09\u201d\u7684\u5f62\u5f0f\u628a\u6210\u5458\u3001\u4efb\u52a1\uff08\u95ee\u9898\uff09\u3001\u6587\u6863\u3001\u8ba8\u8bba\u4ee5\u53ca\u5404\u79cd\u5f62\u5f0f\u7684\u8d44\u6e90\u7ec4\u7ec7\u5728\u4e00\u8d77\uff0c\u5927\u5bb6\u53c2\u4e0e\u66f4\u65b0\u4efb\u52a1\u3001\u6587\u6863\u7b49\u5185\u5bb9\u6765\u63a8\u52a8\u9879\u76ee\u7684\u8fdb\u5ea6\uff0c\u540c\u65f6\u7cfb\u7edf\u5229\u7528\u65f6\u95f4\u7ebf\u7d22\u548c\u5404\u79cd\u52a8\u6001\u7684\u62a5\u8868\u5f62\u5f0f\u6765\u81ea\u52a8\u7ed9\u6210\u5458\u6c47\u62a5\u9879\u76ee\u8fdb\u5ea6\u3002<\/span><\/p>\n<p><span style=\"font-size: small;\">\u529f\u80fd<\/span><\/p>\n<p><span style=\"font-size: small;\">\u3000\u3000\u25cf \u591a\u9879\u76ee\u548c\u5b50\u9879\u76ee\u652f\u6301<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u91cc\u7a0b\u7891\u7248\u672c\u8ddf\u8e2a<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u53ef\u914d\u7f6e\u7684\u7528\u6237\u89d2\u8272\u63a7\u5236<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u53ef\u914d\u7f6e\u7684\u95ee\u9898\u8ffd\u8e2a\u7cfb\u7edf<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u81ea\u52a8\u65e5\u5386\u548c\u7518\u7279\u56fe\u7ed8\u5236<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u652f\u6301 Blog \u5f62\u5f0f\u7684\u65b0\u95fb\u53d1\u5e03\u3001Wiki \u5f62\u5f0f\u7684\u6587\u6863\u64b0\u5199\u548c\u6587\u4ef6\u7ba1\u7406<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf RSS \u8f93\u51fa\u548c\u90ae\u4ef6\u901a\u77e5<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u6bcf\u4e2a\u9879\u76ee\u53ef\u4ee5\u914d\u7f6e\u72ec\u7acb\u7684 Wiki \u548c\u8bba\u575b\u6a21\u5757<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u7b80\u5355\u7684\u4efb\u52a1\u65f6\u95f4\u8ddf\u8e2a\u673a\u5236<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u7528\u6237\u3001\u9879\u76ee\u3001\u95ee\u9898\u652f\u6301\u81ea\u5b9a\u4e49\u5c5e\u6027<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u652f\u6301\u591a\u79cd\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u7684\u7ed1\u5b9a\uff08SVN\u3001CVS\u3001Git\u3001Mercurial \u548c Darcs\uff09<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u652f\u6301\u591a LDAP \u7528\u6237\u8ba4\u8bc1<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u652f\u6301\u7528\u6237\u81ea\u6ce8\u518c\u548c\u7528\u6237\u6fc0\u6d3b<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u591a\u8bed\u8a00\u652f\u6301\uff08\u5df2\u7ecf\u5185\u7f6e\u4e86zh\u7b80\u4f53\u4e2d\u6587\uff09<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u591a\u6570\u636e\u5e93\u652f\u6301\uff08MySQL\u3001SQLite\u3001PostgreSQL\uff09<\/span><br \/>\n<span style=\"font-size: small;\"> \u3000\u3000\u25cf \u5916\u89c2\u6a21\u7248\u5316\u5b9a\u5236\uff08\u53ef\u4ee5\u4f7f\u7528 Basecamp \u3001Ruby\u5b89\u88c5\uff09<\/span><\/p>\n<p><span style=\"font-size: small;\">\u5b89\u88c5\u4e3b\u8981\u6839\u636e\u5b98\u65b9\u7684\u5e2e\u52a9\u6587\u6863\u4e00\u6b65\u4e00\u6b65\u6765\u7684\uff0chttp:\/\/www.redmine.org\/projects\/redmine\/wiki\/RedmineInstall\u3002<\/span><\/p>\n<p><span style=\"font-size: small;\">\u5728ubuntu\u4e0b\u5b89\u88c5redmine\uff1a<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo apt-get install ruby   #\u5b89\u88c5ruby\r\nsudo apt-get install rubygems  #\u5b89\u88c5gem\u547d\u4ee4\u5305\r\ncd ~\/www\/\r\nwget http:\/\/rubyforge.org\/frs\/download.php\/76495\/redmine-2.1.2.tar.gz\r\ntar -zvxf redmine-2.1.2.tar.gz\r\ncd redmine-2.1.2\/\r\nsudo gem install bundler  #\u5b89\u88c5bunder\r\nbundle install --without development test postgresql sqlite #\u5b89\u88c5redmine\u6240\u9700\u8981\u7684\u4f9d\u8d56\u5305\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u7ecf\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\u540e\uff0credmine\u5df2\u7ecf\u5b89\u88c5\u597d\u5230 ~\/www\/redmine-2.1.2\/ \u4e86\uff0c\u4e0b\u9762\u6765\u914d\u7f6emysql\u6570\u636e\u5e93\uff0c\u5229\u7528\u4e0b\u9762sql\u8bed\u53e5\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\uff1a<\/span><\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\ncreate database redmine character set utf8;\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u7136\u540e\u521b\u5efa\u4e00\u4efdredmine\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5c06\u6570\u636e\u5e93\u4fe1\u606f\u586b\u597d \uff1a<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd ~\/www\/redmine-2.1.2\/config\r\ncp database.yml.example database.yml\r\nvim database.yml\r\n#\u7f16\u8f91\u6570\u636e\u5e93\u8fde\u63a5\u914d\u7f6e...\r\nrake generate_secret_token  #\u521b\u5efa Session \u5b58\u50a8\u5bc6\u94a5\r\nRAILS_ENV=production rake db:migrate #\u521b\u5efa\u6570\u636e\u5e93\u7ed3\u6784\r\nRAILS_ENV=production rake redmine:load_default_data #\u751f\u6210\u4e00\u4e9b\u5fc5\u8981\u7684\u9ed8\u8ba4\u6570\u636e\r\nchmod -R +w files\/ log\/ tmp\/ #\u5bf9\u6587\u4ef6\u5939\u8d4b\u53ef\u5199\u6743\u9650\r\n<\/pre>\n<p><span style=\"font-size: small;\">OK\uff0c\u73b0\u5728\u5df2\u7ecf\u5168\u90e8\u5b89\u88c5\u597d\u4e86\uff0c\u901a\u77e5\u4ee5\u4e0b\u547d\u4ee4\u6765\u8fd0\u884credmine\uff1a<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nruby script\/rails server webrick -e production\r\n=&gt; Booting WEBrick\r\n=&gt; Rails 3.2.8 application starting in production on http:\/\/0.0.0.0:3000\r\n=&gt; Call with -d to detach\r\n=&gt; Ctrl-C to shutdown server\r\n&#x5B;2012-11-08 20:54:29] INFO  WEBrick 1.3.1\r\n&#x5B;2012-11-08 20:54:29] INFO  ruby 1.8.7 (2011-06-30) &#x5B;x86_64-linux]\r\n&#x5B;2012-11-08 20:54:34] INFO  WEBrick::HTTPServer#start: pid=9990 port=3000\r\n\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u6211\u4eec\u901a\u8fc7\u8bbf\u95ee http:\/\/0.0.0.0:3000\/ \u5c31\u53ef\u4ee5\u4f7f\u7528\u4e86\u3002<\/span><\/p>\n<p><span style=\"font-size: small;\">\u9884\u89c8\u56fe1\u3001<\/span><\/p>\n<p><a href=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-2273\" title=\"1\" src=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/11.png\" alt=\"\" width=\"819\" height=\"395\" srcset=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/11.png 1365w, https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/11-300x144.png 300w, https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/11-1024x493.png 1024w, https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/11-250x120.png 250w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/a><\/p>\n<p><span style=\"font-size: small;\">\u9884\u89c8\u56fe2\u3001<\/span><\/p>\n<p><a href=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2274\" title=\"2\" src=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/21-1024x492.png\" alt=\"\" width=\"819\" height=\"395\" srcset=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/21-1024x492.png 1024w, https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/21-300x144.png 300w, https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/21-250x120.png 250w, https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2012\/11\/21.png 1365w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/a><\/p>\n<p><span style=\"font-size: small;\">\u5b89\u88c5\u4e3b\u9898\u65b9\u6cd5\u3002\u5728 public\/themes \u6587\u4ef6\u5939\u4e0b\u9762\u521b\u5efa\u4e00\u4e2a\u4e3b\u9898\u540d\u5b57\u7684\u6587\u4ef6\u5939\uff0c\u5982 basecamp \uff0c\u518d\u5c06basecamp \u4e3b\u9898\u7684css\u6587\u4ef6\u653e\u5230 stylesheets \u6587\u4ef6\u5939\u4e2d\uff0c\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a<\/span><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nthemes\r\n\u251c\u2500\u2500 basecamp\r\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 stylesheets\r\n\u2502\u00a0\u00a0     \u2514\u2500\u2500 application.css\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u7136\u540e\u53bb\u7ba1\u7406\u4e2d\u5fc3 &#8220;Administration -&gt; Settings&#8221; -&gt; &#8220;Display&#8221; \u9009\u62e9\u4f60\u5b89\u88c5\u7684\u4e3b\u9898\u5c31\u884c\u4e86\u3002<\/span><\/p>\n<p><span style=\"font-size: small; color: #ff0000;\">\u914d\u7f6eapache\u90e8\u7f72redmine\u3002<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd ~\/www\/redmine-2.1.2\/\r\nsudo gem install passenger\r\nsudo passenger-install-apache2-module\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u7136\u540e\u6dfb\u52a0\u5982\u4e0b\u914d\u7f6e\u5230apache\u914d\u7f6e\u6587\u4ef6\uff08passenger-install-apache2-module\u540e\u4f1a\u6709\u63d0\u793a\uff09\uff1a<\/span><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nLoadModule passenger_module \/var\/lib\/gems\/1.8\/gems\/passenger-3.0.18\/ext\/apache2\/mod_passenger.so\r\nPassengerRoot \/var\/lib\/gems\/1.8\/gems\/passenger-3.0.18\r\nPassengerRuby \/usr\/bin\/ruby1.8\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u4fee\u6539\u6587\u4ef6\u540d\uff1a<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd ~\/www\/redmine-2.1.2\/public\r\nmv dispatch.cgi.example dispatch.cgi\r\nmv dispatch.fcgi.example dispatch.fcgi\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u5728apache\u4e2d\u65b0\u5efa\u4e00\u4e2a\u865a\u62df\u4e3b\u673a:<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd \/etc\/apache2\/sites-available\r\nvim redmine\r\n#\u5e76\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a\r\n#RailsBaseURI \/redmine-2.1.2\/public\r\n\r\na2ensite redmine #\u542f\u7528redmine\u7ad9\u70b9\r\n\/etc\/init.d\/apache2 restart\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u4e4b\u540e\u8bbf\u95ee 127.0.0.1\/redmine-2.1.2\/public \u5c31\u5e94\u8be5\u53ef\u4ee5\u4e86\u3002<\/span><\/p>\n<p><span style=\"font-size: small;\">\u5982\u679c\u4f60\u6253\u5f00\u540e\u9047\u5230\u4e86\u8fd9\u6837\u7684\u95ee\u9898\uff1a<\/span><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nRedmine requires Bundler 1.0.21 (you're using 1.0.15). Please install a newer version with `gem install bundler`.\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u5378\u6389\u3000ruby-bundler\u3000\u7528\u6211\u4eec\u901a\u8fc7gem\u547d\u4ee4\u5b89\u88c5\u7684bundler\uff0c\u800c\u4e0d\u662f ruby-bundler\u3002<\/span><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo apt-get remove ruby-bundler\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Redmine\u662f\u7528Ruby\u5f00\u53d1\u7684\u57fa\u4e8eweb\u7684\u9879\u76ee\u7ba1\u7406\u8f6f\u4ef6\uff0c\u662f\u7528ROR\u6846\u67b6\u5f00\u53d1\u7684\u4e00\u5957\u8de8\u5e73\u53f0\u9879\u76ee\u7ba1\u7406\u7cfb\u7edf\uff0c\u636e\u8bf4\u662f\u6e90 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2272","post","type-post","status-publish","format-standard","hentry","category-diary"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=2272"}],"version-history":[{"count":7,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2272\/revisions"}],"predecessor-version":[{"id":2281,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2272\/revisions\/2281"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=2272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=2272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=2272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}