redmine安装遇到问题列表为:
1、redmine版本过低导致部分功能报错
2、ruby源总是提示连接失败
3、mysql2组件安装失败
4、redmine web无法连接
问题描述以及处理过程为:
1、redmine版本过低导致部分功能报错
redmine版本是要依赖ruby以及rails的环境,安装过低的版本会导致部分功能报错。
比如在ruby2.2和rails4.2环境下,redmine版本为2.3.stable将出现报错功能。
处理办法为:提高redmine的版本
http://www.redmine.org/projects/redmine/wiki/Download
2、ruby源总是提示连接失败
ruby源无法连接,提示失败导致安装失败。
处理办法为:变更ruby源为淘宝ruby源。
gem sources -l # 查看当前源
gem sources -a http://ruby.taobao.org # 添加上淘宝ruby源
gem sources -r https://rubygems.org/ # 移除掉官方的ruby源
gem install rails # 变更完源后,尝试安装rails环境
另外在redmine主目录也要变更下GenFile配置
cd /usr/local/redmine-3.0.0
vim Gemfile # 编辑文件第一行,将源改为淘宝ruby源
source 'https://ruby.taobao.org'
3、mysql2组件安装失败
在gem instlal mysql2提示安装失败,缺少mysql.h相关文件。
完整报错信息为:
/usr/local/rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150312-38008-rlgqip.rb extconf.rb checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes checking for rb_thread_blocking_region()... no checking for rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes checking for rb_intern3()... yes ----- Using mysql_config at /usr/bin/mysql_config ----- checking for mysql.h... no checking for mysql/mysql.h... no ----- mysql.h is missing. please check your installation of mysql and try again. ----- *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/rvm/rubies/ruby-2.2.1/bin/$(RUBY_BASE_NAME) --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysql-config --without-mysql-config extconf failed, exit code 1 |
处理办法为:mysql-devel版本过低导致的,命令为:
su root
yum install mysql-devel
4、redmine web无法连接
redmine服务启动成功后,浏览器访问http://192.168.10.107:3000
无法访问到内容,在本地telnet 192.168.10.107 3000连接不上。
处理办法为:
192.168.10.107是在一个局域网内部的IP,redmine启动默认绑定的locahost端口为3000
a、检查防火墙设置,开放3000端口。
b、localhost多绑定一个hosts,编辑/etc/hosts即可。
redmine 41271 1 0 20:24 ? 00:00:00 ruby ./rails server -e production -d
netstat -alnp|grep 41271 # 查看pid监听端口情况
绑定监听情况列表为:
tcp 0 0 192.168.10.107:3000 0.0.0.0:* LISTEN 41271/ruby
tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 41271/ruby
tcp 0 0 ::1:3000 :::* LISTEN 41271/ruby
unix 3 [ ] STREAM CONNECTED 131877 41271/ruby
检查完毕后,再次访问即可看到正常的redmine web内容了。