redmine3.3.1安装与常用插件安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了redmine3.3.1安装与常用插件安装相关的知识,希望对你有一定的参考价值。
redmine安装
环境:CentOS6.7
软件:
mysql5.X
redmine3.3.1
ruby2.3.1
rubygem2.6.8
nginx1.9.15
安装依赖包:
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel \
libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel \
curl-devel openssl-devel pcre-devel mysql-devel ImageMagick-devel ImageMagick gcc-c++ gcc c
ruby安装:
先检查系统是否有安装到ruby,如果有卸载
rpm -qa |grep ruby
cd /usr/local/src && wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-2.3.1.tar.gz
tar -zxvf ruby-2.3.1.tar.gz
cd ruby-2.3.1
./configure
make && make install
ruby版本检查
ruby -v
安装gem:
cd /usr/local/src && wget https://rubygems.org/rubygems/rubygems-2.6.8.tgz
tar -zxvf rubygems-2.6.8.tgz
cd rubygems-2.6.8
/usr/local/bin/ruby setup.rb
检查gem是否安装成功
gem -v
壮哉某朝局域网:
gem sources --remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
gem sources -l #显示如下
*** CURRENT SOURCES ***
https://ruby.taobao.org/
接下来继续安装需要的包
gem install bundler
gem install rmagick
gem install rails
gem install mysql2
redmine安装:
mkdir -p /data/www
cd /usr/local/src && wget http://www.redmine.org/releases/redmine-3.3.1.tar.gz
tar -zxvf redmine-3.3.1.tar.gz
mv redmine-3.3.1 /data/www/redmine
cd /data/www/redmine
bundler install
安装mysql
useradd -M -s /sbin/nologin mysql
mkdir -p /data/mysql
chown -R mysql /data/mysql
#设置权限
./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
#初始化
echo $?
#查看上一步是否成功,也可以看初始化前面是否出现两个OK
cp support-files/my-default.cnf /etc/my.cnf
#覆盖原来系统安装的mysql日志文件,5.6以上的版本没有my-larget.cnf
cp support-files/mysql.server /etc/init.d/mysqld
#加入系统启动服务列表,然后编辑文件里面的两行,如下:
chmod 755 !$
basedir=/usr/local/mysql
datadir=/data/mysql
加入系统启动列表,启动
chkconfig --add mysqld
chkconfig mysqld on #这步一般忽略,加入后会默认自动
# mysql
> create database redmine character set utf8;
> create user ‘redmine‘@‘localhost‘ identified by ‘redmine‘;
> grant all privileges on redmine.* to ‘redmine‘@‘localhost‘;
> FLUSH PRIVILEGES;
修改数据库配置:
cd /data/www/redmine/config
cp database.yml.example database.yml
vim database.yml
配置如下:
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "redmine"
encoding: utf8
生成配置信息,下面几个操作
生成session的加密token
生成数据表
导入初始化数据
cd /data/www/redmine/config
RAILS_ENV=production bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data
启动redmine
cd /data/www/redmine/
nohup bundle exec rails server webrick -p3000 -b 0.0.0.0 -e production >/dev/null 2>&1 &
一、插件安装:安装插件前记得先停掉redmine服务
redmine_webhook安装:
cd /data/www/redmine/plugins
git clone https://github.com/suer/redmine_webhook.git
rake redmine:plugins:migrate RAILS_ENV=production
++++++++++++++++++++++++++++++++++++++
[[email protected] plugins]# rake redmine:plugins:migrate RAILS_ENV=production
(in /data/www/redmine)
/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466
Migrating redmine_checklists (Redmine Checklists plugin (Light version))...
Migrating redmine_webhook (Redmine Webhook plugin)...
== 1 CreateWebhooks: migrating ================================================
-- create_table(:webhooks)
-> 0.0400s
== 1 CreateWebhooks: migrated (0.0405s) =======================================
+++++++++++++++++++++++++++++++++++++++++
二、安装redmine_lightbox2:
git clone https://github.com/paginagmbh/redmine_lightbox2.git
rake redmine:plugins:migrate RAILS_ENV=production
++++++++++++++++++++++++++++++++++++++++++++
[[email protected] plugins]# rake redmine:plugins:migrate RAILS_ENV=production
(in /data/www/redmine)
/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466
Migrating redmine_checklists (Redmine Checklists plugin (Light version))...
Migrating redmine_lightbox2 (Redmine Lightbox 2)...
Migrating redmine_webhook (Redmine Webhook plugin)...
++++++++++++++++++++++++++++++++++++++++++++
三、安装issue_charts:
git clone https://github.com/masweetman/issue_charts.git
bundle install
rake redmine:plugins:migrate RAILS_ENV=production
++++++++++++++++++++++++++++++++++++++++++++++++
[[email protected] plugins]# rake redmine:plugins:migrate RAILS_ENV=production
(in /data/www/redmine)
/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466
Migrating issue_charts (Issue Charts plugin)...
== 1 CreateCharts: migrating ==================================================
-- create_table(:charts)
-> 0.0573s
== 1 CreateCharts: migrated (0.0574s) =========================================
== 2 AddUserIdToCharts: migrating =============================================
-- add_column(:charts, :user_id, :integer)
-> 0.0833s
== 2 AddUserIdToCharts: migrated (0.0835s) ====================================
== 3 AddPublicToCharts: migrating =============================================
-- add_column(:charts, :public, :boolean, {:default=>false})
-> 0.0839s
== 3 AddPublicToCharts: migrated (0.0850s) ====================================
== 4 AddColumnsToCharts: migrating ============================================
-- add_column(:charts, :range_integer, :integer, {:default=>30})
-> 0.0632s
-- add_column(:charts, :range_type, :string, {:default=>"days"})
-> 0.0563s
== 4 AddColumnsToCharts: migrated (0.1202s) ===================================
== 5 AddTimeToCharts: migrating ===============================================
-- add_column(:charts, :time, :string, {:default=>""})
-> 0.0664s
== 5 AddTimeToCharts: migrated (0.0674s) ======================================
== 6 AddIssueStatusToCharts: migrating ========================================
-- add_column(:charts, :issue_status, :string, {:default=>"o"})
-> 0.0619s
== 6 AddIssueStatusToCharts: migrated (0.0623s) ===============================
== 7 RenameColumns: migrating =================================================
-- rename_column(:charts, :public, :is_public)
-> 0.0306s
== 7 RenameColumns: migrated (0.0308s) ========================================
Migrating redmine_checklists (Redmine Checklists plugin (Light version))...
Migrating redmine_lightbox2 (Redmine Lightbox 2)...
Migrating redmine_webhook (Redmine Webhook plugin)...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
四、安装redmine_advanced_roadmap_v2:
git clone https://github.com/Coren/redmine_advanced_roadmap_v2.git
mv redmine_advanced_roadmap_v2 advanced_roadmap_v2
RAILS_ENV=production bundle exec rake redmine:plugins:migrate
gem install rmagick
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[[email protected] plugins]# RAILS_ENV=production bundle exec rake redmine:plugins:migrate
(in /data/www/redmine)
/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466
Migrating advanced_roadmap_v2 (Advanced roadmap & milestones plugin)...
== 1 CreateMilestones: migrating ==============================================
-- create_table(:milestones, {:force=>true})
-> 0.0550s
-- add_index(:milestones, [:user_id], {:name=>"fk_milestones_user"})
-> 0.0489s
-- add_index(:milestones, [:project_id], {:name=>"fk_milestones_project"})
-> 0.0412s
== 1 CreateMilestones: migrated (0.1459s) =====================================
== 2 CreateMilestoneVersions: migrating =======================================
-- create_table(:milestone_versions, {:force=>true})
-> 0.0332s
-- add_index(:milestone_versions, [:milestone_id], {:name=>"fk_milestone_versions_milestone"})
-> 0.0503s
-- add_index(:milestone_versions, [:version_id], {:name=>"fk_milestone_versions_version"})
-> 0.0405s
== 2 CreateMilestoneVersions: migrated (0.1245s) ==============================
== 3 PresetPermissions: migrating =============================================
== 3 PresetPermissions: migrated (0.0521s) ====================================
Migrating easy_gantt (Easy Gantt plugin)...
Migrating issue_charts (Issue Charts plugin)...
Migrating redmine_checklists (Redmine Checklists plugin (Light version))...
Migrating redmine_lightbox2 (Redmine Lightbox 2)...
Migrating redmine_webhook (Redmine Webhook plugin)...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
卸载:
RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=advanced_roadmap_v2 VERSION=0
五、安装甘特图:
$ bundle install
(or bundle update)
$ bundle exec rake db:migrate RAILS_ENV=production
$ bundle exec rake redmine:plugins:migrate RAILS_ENV=production
- Restart server
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[[email protected] plugins]# bundle exec rake db:migrate RAILS_ENV=production
(in /data/www/redmine)
/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466
== 20150705172511 CreateEasySettings: migrating ===============================
-- table_exists?(:easy_settings)
-> 0.0152s
-- create_table(:easy_settings)
-> 0.1918s
-- index_exists?(:easy_settings, [:name, :project_id], {:unique=>true})
-> 0.0276s
-- add_index(:easy_settings, [:name, :project_id], {:unique=>true})
-> 0.0465s
== 20150705172511 CreateEasySettings: migrated (0.2844s) ======================
== 20160519161300 CreateEntityAssignments: migrating ==========================
-- table_exists?(:easy_entity_assignments)
-> 0.0043s
-- create_table(:easy_entity_assignments)
-> 0.0333s
-- add_index(:easy_entity_assignments, [:entity_from_type, :entity_from_id, :entity_to_type, :entity_to_id], {:name=>"entity_assignment_idx", :unique=>true})
-> 0.0431s
-- add_index(:easy_entity_assignments, :entity_from_id, {:name=>"entity_assignment_idx_from"})
-> 0.0416s
-- add_index(:easy_entity_assignments, :entity_to_id, {:name=>"entity_assignment_idx_to"})
-> 0.0441s
== 20160519161300 CreateEntityAssignments: migrated (0.1682s) =================
[[email protected] plugins]# !ec
echo $?
0
[[email protected] plugins]# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
(in /data/www/redmine)
/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466
Migrating easy_gantt (Easy Gantt plugin)...
Migrating issue_charts (Issue Charts plugin)...
Migrating redmine_checklists (Redmine Checklists plugin (Light version))...
Migrating redmine_lightbox2 (Redmine Lightbox 2)...
Migrating redmine_webhook (Redmine Webhook plugin)...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
插件卸载:
bundle exec rake redmine:plugins:migrate NAME=插件名称 VERSION=0 RAILS_ENV=production
六、安装projects_show:
git clone https://github.com/speedy32129/projects_show.git
完整完成直接重启即可。
七、安装redmine_issues_tree:
git clone https://github.com/Loriowar/redmine_issues_tree.git
克隆完成直接bundle install/bundle update即可
插件地址:
https://github.com/suer/redmine_webhook
https://github.com/paginagmbh/redmine_lightbox2
https://github.com/Loriowar/redmine_issues_tree
https://www.redminecrm.com/
https://github.com/speedy32129/projects_show
https://github.com/masweetman/issue_charts
https://github.com/Coren/redmine_advanced_roadmap_v2
本文出自 “kw_lee” 博客,请务必保留此出处http://11398377.blog.51cto.com/11388377/1875686
以上是关于redmine3.3.1安装与常用插件安装的主要内容,如果未能解决你的问题,请参考以下文章
Visual Studio Code作为Angular开发工具常用插件安装json-server安装与使用angular/cli安装失败问题