CentOS 6.4 x64 安装 配置 Redmine 2.4.1
Redmine 安装配置
1. 安装Redmine 所需的依赖
首先安装 yaml
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar zxvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure
make && make install
2. 安装RVM
curl -L https://get.rvm.io | bash -s stable
---------------------------------------------------------------------
报错 gpg: 无法检查签名:没有公钥
执行:
curl -sSL https://rvm.io/mpapis.asc | gpg --import
执行完毕,再执行一次上面的
---------------------------------------------------------------------
载入RVM环境并获取需要的支持安装包
source /etc/profile.d/rvm.sh
rvm requirements
3. 利用rvm安装 Ruby 1.9.3 并设为默认
rvm install 1.9.3
rvm use 1.9.3 --default
4. 安装Redmine 下载最新版本的 redmine
wget http://www.redmine.org/releases/redmine-2.4.1.tar.gz
tar zxvf redmine-2.4.1.tar.gz
mkdir /opt/htdocs
mv redmine-2.4.1 /opt/htdocs/redmine
5. 安装 Bundler 可利用ruby 的 gem 来安装
gem install bundler
6. 安装gem 依赖包
cd /opt/htdocs/redmine
bundle install --without development test rmagick
---------------------------------------------------------------------------
出现如下错误:
An error occurred while installing json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.
执行:
gem install json -v '1.8.2'
出现如下错误
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
安装: yum -y install ruby-devel
---------------------------------------------------------------------------
7. 安装mysql2 的依赖包
gem install mysql2 -v '0.3.11' -- --with-mysql-config=/opt/local/mysql/bin/mysql_config
8. 创建redmine 所需的数据库
create database redmine character set utf8;
grant all privileges on redmine.* to 'redmine'@'localhost' identified by '123456';
9. 配置Redmine 数据库连接
cd /opt/htdocs/redmine/config
cp database.yml.example database.yml
vi database.yml
========================================================================
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "123456"
encoding: utf8
development:
adapter: mysql2
database: redmine_development
host: localhost
username: redmine
password: "123456"
encoding: utf8
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
database: redmine_test
host: localhost
username: redmine
password: "123456"
encoding: utf8
==========================================================================
10. 创建sessin存储脚本
rake generate_secret_token
------------------------------------------------------------------------------------------
出现报错
Could not find gem 'rails (= 3.2.15) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
------------------------------------------------------------------------------------------
首先执行 bundle update
-------------------------------------------------------------------------------------------------------------------------------------------
再次报错
Gem::RemoteFetcher::FetchError: Errno::ETIMEDOUT: Connection timed out - connect(2) (https://rubygems.org/gems/tilt-1.4.1.gem)
An error occurred while installing tilt (1.4.1), and Bundler cannot continue.
Make sure that `gem install tilt -v '1.4.1'` succeeds before bundling.
-------------------------------------------------------------------------------------------------------------------------------------------
单独执行 gem install tilt -v '1.4.1'
再次执行 bundle update 直到完成
Your bundle is updated!
11. 创建数据库结构:
RAILS_ENV=production rake db:migrate
12. 插入默认的配置数据:
RAILS_ENV=production rake redmine:load_default_data
13. 启动Redmine
ruby /opt/htdocs/redmine/script/rails server webrick -e production >/dev/null 2>> redmine.log &
最新文章
- 分享一个UI与业务逻辑分层的框架(三)
- bzoj1011 [HNOI2008]遥远的行星
- configuring tortoise git and vs code.
- 用vi修改文件,保存文件时,提示“readonly option is set”的解决方法
- Python 对新浪微博的博文元素 (Word, Screen Name)的频率分析
- 用js操作表格
- 移动端Reactive Native轮播组件
- Awake和Start
- 关于unsigned int和int的加法
- C#之out与ref的共性与区别以及用法
- Python变量和数据类型
- Statemen接口对象
- Azure Event Hub 技术研究系列2-发送事件到Event Hub
- Exchange Online Mailbox Restoration
- 【NOIP2014模拟赛No.1】我要的幸福
- Linux下计算进程的CPU占用和内存占用的编程方法[转]
- day20-正则表达式练习
- 【Servlet】监听器入门
- tensorflow 卷积/反卷积-池化/反池化操作详解
- C#/Net代码精简优化技巧