LinuxRedmine安装_第1页
LinuxRedmine安装_第2页
LinuxRedmine安装_第3页
LinuxRedmine安装_第4页
LinuxRedmine安装_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Redmine安装Redmine安装初建:王凯娜日期:2014-02-27审核:日期:批准:日期:最后修改时间:2014-03-04 13:33版 本 号:V1.0文档编号:单击此处输入文字。质控状态:待审核文档修订历史版本作者修订内容描述修改日期审核人审核日期V1.0王凯娜初稿2014-02-27相关文档文档编号文档名称文档类型或相关性说明ii目录文档修订历史i目录ii1安装环境12前提准备12.1下载安装软件12.2依赖包安装12.3安装Ruby12.4安装RubyGems22.5安装Rails23安装Redmine33.1数据库配置33.2安装依赖包33.3生成会话存储43.4创建数据库

2、结构43.5插入默认数据43.6设置文件权限43.7测试安装43.8邮箱配置53.9集成apache53.10使用过程中出现问题6附录:文档评审记录101 安装环境系统:CentOS release 6.4 数据库:MySQL 5.1.732 前提准备2.1 下载安装软件Ruby : 2.0.0RubyGems : v2.1.11Rails :4.0.3 Redmine:2.4.3 下载以上各个软件(软件均存放在/usr/local路径下)Ruby:/pub/ruby/2.0/ruby-2.0.0-p451.tar.gzRubyGems:htt

3、p://pages/downloadRedmine:/projects/redmine/wiki/Download2.2 依赖包安装/如果系统安装了 ruby 或者rubygems相关的软件,建议先卸载#yum erase ruby rubygems/安装ruby可能用的基础包,安装过程中可能还会有缺少,视具体情况而定#yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel2.3 安装R

4、ubyrootchances-126 # cd /usr/local rootchances-126 local#tar -xzvf ruby-2.0.0-p451.tar.gzrootchances-126 local#cd ruby-2.0.0-p451rootchances-126 ruby-2.0.0-p451#./configurerootchances-126 ruby-2.0.0-p451#makerootchances-126 ruby-2.0.0-p451#make install通过以上步骤就已经安装好了ruby,下边验证ruby安装成功#ruby v 输出如下图说明安装成

5、功2.4 安装RubyGemsrootchances-126 #cd /usr/localrootchances-126 local#tar -zxvf rubygems-2.1.11.tgzrootchances-126 local#cd rubygems-2.1.11rootchances-126 rubygems-2.1.11#ruby setup.rb通过以上步骤就已经安装好了RubyGems,下边验证RubyGems安装成功#gem v 输出如下图说明安装成功2.5 安装Rails/检查更新rootchances-126 #gem updaterootchances-126 #gem

6、 update -systemrootchances-126 #gem install rails -V /-V可以显示出进度运行上边的命令时出现以下错误:ERROR: While executing gem . (Gem:Exception) Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources解决办法:1. 安装zlib进入ruby源码文件夹,安装ruby自身提供的zlib包rootchances-126 #cd /usr/local/ruby-2.0

7、.0-p451/ext/zlibrootchances-126 zlib#ruby ./extconf.rbrootchances-126 zlib#makerootchances-126 zlib#make install2. 安装openssl:进入ruby源码文件夹,安装ruby自身提供的openssl包rootchances-126 zlib#cd /usr/local/ruby-2.0.0-p451/ext/opensslrootchances-126 openssl# ruby extconf.rb -with-openssl-include=/usr/local/ssl/incl

8、ude/ -with-openssl-lib=/usr/local/ssl/librootchances-126 openssl#makerootchances-126 openssl#make install3. 将gem的源更换为淘宝网:rootchances-126 # gem sources -remove /rootchances-126 # gem sources -a /rootchances-126 # gem sources -l改完后再执行安装rails的命令rootchances-126 #g

9、em install rails -V此安装过程会花一定的时间,请耐心等待。按照以上步骤安装后检查安装:rootchances-126 #rails -v Rails 4.0.33 安装Redmine3.1 数据库配置/创建数据库CREATE DATABASE redmine CHARACTER SET utf8;CREATE USER 'redmine''localhost' IDENTIFIED BY 'chances'GRANT ALL PRIVILEGES ON redmine.* TO 'redmine''loc

10、alhost'/编辑database.yml 文件root chances-126 #cd /usr/localroot chances-126 local#tar -zxvf redmine-2.4.3.tar.gzroot chances-126 local#mv redmine-2.4.3 redmineroot chances-126 local#cd redmineroot chances-126 redmine#cd configroot chances-126 config#cp database.yml.example database.ymlroot chances-

11、126 config#vi database.yml/调整生产数据库的数据库和密码:production: adapter: mysql database: redmine host: localhost username: redmine password: my_password3.2 安装依赖包rootchances-126 redmine#gem install bundler/在redmine文件路径下执行,否则会报错Error:Bundler:GemfileNotFoundrootchances-126 redmine#bundle install -without develop

12、ment test 报错:An error occurred while installing rmagick (2.13.2), and Bundler cannot continue.Make sure that gem install rmagick -v '2.13.2' succeeds before bundling.解决:rootchances-126 redmine#bundle install -without development test rmagick/出这个错是因为没有安装ImageMagick,可以跳过不安装,因此执行上边命令3.3 生成会话存储r

13、ootchances-126 redmine#rake generate_secret_token3.4 创建数据库结构rootchances-126 redmine#RAILS_ENV=production rake db:migrate/在 redmine 路径下执行3.5 插入默认数据rootchances-126 redmine#RAILS_ENV=production rake redmine:load_default_data3.6 设置文件权限rootchances-126 redmine#mkdir -p tmp tmp/pdf public/plugin_assetsroot

14、chances-126 redmine#chown -R redmine:redmine files log tmp public/plugin_assetsrootchances-126 redmine#chmod -R 755 files log tmp public/plugin_assets3.7 测试安装通过 WEBrick web server测试安装(一般只用这个测试是否安装成功,这个服务器访问比较慢,使用的话一般和apache或者nginx集成)rootchances-126 redmine#ruby script/rails server webrick -e product

15、ion访问服务器:http:/IP:3000默认登录帐号:admin /cskj)!$ 这样启动后,启动窗口一关闭服务就停止了,所以要使Redmine作为服务启动,需添加-d参数:rootchances-126 redmine#ruby script/rails server webrick -e production d停止服务方法:(ps命令查出此进程的pid号,再杀掉,目前好像只能这样,help里面,还没有停止的参数。)root chances-126 # ps -ef|grep rubyroot chances-126 # kill -9 PID3.8 邮箱配置root ch

16、ances-126 #cd /usr/local/redmine/config/root chances-126 #vi configuration.yml问题:redmine安装完毕后开启邮件通知,发送测试邮件时报错:"hostname was not match with the server certificate"解决方法:修改redmine/config/configuration.yml增加一行 openssl_verify_mode: 'none'重启服务即可3.9 集成apacheRedmine默认使用RoR自带的web服务器WEBrick,

17、默认的端口是3000,速度一般;很多人将Redmine集成到 apache,nginx或 tomcat中,集成到apache通常采用CGI方式来集成,配置起来比较繁杂。Phusion Passenger组件是专门为apache和nginx开发的用来部署Ruby on Rails应用的,配置起来非常的方便,使用下来感觉页面的操作速度比WEBrick要快很多,以下记录了如何安装passenger来集成 Redmine到apache服务器。1、 安装依赖库root chances-126 #yum -y install httpd-devel apr-devel apr-util-devel2、 安

18、装passengerroot chances-126 #gem install passenger -Vroot chances-126 #passenger-install-apache2-module3、 修改apache配置文件passenger成功安装后,它会给出如下的配置提示信息,需要将它们添加到apache的配置文件/etc/httpd/conf/httpd.conf中(不同版本目录名称不一样)LoadModule passenger_module /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.37/buildout/apach

19、e2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.37 PassengerDefaultRuby /usr/local/bin/ruby </IfModule>root chances-126 #vi /etc/httpd/conf/httpd.confLoadModule passenger_module /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4

20、.0.37/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.37 PassengerDefaultRuby /usr/local/bin/ruby </IfModule>在httpd.conf中添加虚拟主机:<virtualhost *:80> ServerName redmine ServerAdmin redmine DocumentRoot /usr/l

21、ocal/redmine/public ErrorLog logs/redmine_error_log  <directory "/usr/local/redmine/public" > Options Indexes ExecCGI FollowSymLinks -MultiViews Order allow,deny Allow from all AllowOverride all </directory></virtualhost>4、 重启apacheroot chances-126 #/etc/init.d/httpd

22、 restart通过0/访问redmine3.10 使用过程中出现问题在用管理员身份进入“管理”->“设置”时页面出现报错:internal error 500查看/usr/local/redmine/log下的production.log日志见如下错误:Processing by SettingsController#index as HTML Current user: admin (id=1) Rendered settings/_general.html.erb (6.7ms) Rendered settings/_display.html.er

23、b (6.8ms) Rendered settings/_authentication.html.erb (5.7ms) Rendered settings/_projects.html.erb (9.5ms) Rendered queries/_columns.html.erb (5.2ms) Rendered settings/_issues.html.erb (11.0ms) Rendered settings/_notifications.html.erb (8.4ms) Rendered common/_tabs.html.erb (53.1ms) Rendered settings

24、/edit.html.erb within layouts/admin (53.5ms)Completed 500 Internal Server Error in 59.0msActionView:Template:Error (incompatible character encodings: UTF-8 and ASCII-8BIT): 22: </fieldset> 23: 24: <fieldset class="box"><legend><%= l(:setting_emails_header) %></le

25、gend> 25: <%= setting_text_area :emails_header, :label => false, :class => 'wiki-edit', :rows => 5 %> 26: </fieldset> 27: 28: <fieldset class="box"><legend><%= l(:setting_emails_footer) %></legend> app/views/settings/_notifications.ht

26、ml.erb:25:in block in _app_views_settings_notifications_html_erb_1935317851798191062_69962562779280' app/views/settings/_notifications.html.erb:2:in _app_views_settings_notifications_html_erb_1935317851798191062_69962562779280' app/views/common/_tabs.html.erb:24:in block in _app_views_common

27、_tabs_html_erb_3966879556762061664_69962561792500' app/views/common/_tabs.html.erb:23:in each' app/views/common/_tabs.html.erb:23:in _app_views_common_tabs_html_erb_3966879556762061664_69962561792500' app/helpers/application_helper.rb:272:in render_tabs' app/views/settings/edit.html.

28、erb:3:in _app_views_settings_edit_html_erb_157532002792942897_69962561656140' app/controllers/settings_controller.rb:28:in index'解决办法:1、初步判断是字符集的问题,于是查看mysql字符集:mysql> show session variables like 'char%'+-+-+| Variable_name | Value |+-+-+| character_set_client | latin1 | character

29、_set_connection | latin1 | character_set_database | latin1 | character_set_filesystem | binary | character_set_results | latin1 | character_set_server | latin1 | character_set_system | latin1 | character_sets_dir | /usr/share/mysql/charsets/ |+-+-+8 rows in set (0.00 sec)mysql> show global variables like 'char%'+-+-+| Variable_name | Value |+-+-+| character_set_client | latin1 | character_set_connection | latin1 | character

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论