redmine3.2 的部署
安装libyaml
[root@ ~]#wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz -O /dist/dist/yaml-0.1.4.tar.gz
[root@ ~]#cd /dist/src/
[root@ ~]#tar zxf /dist/dist/yaml-0.1.4.tar.gz
[root@ ~]#cd yaml-0.1.4
[root@ yaml-0.1.4]#./configure
[root@ yaml-0.1.4]#make
[root@ yaml-0.1.4]#make install
安装 rvm
[root@ ~]#curl -#LO https://rvm.io/mpapis.asc
[root@ ~]#gpg --import mpapis.asc
[root@ ~]#curl -L get.rvm.io | bash -s stable
[root@ ~]#source /etc/profile.d/rvm.sh
rvm使用的简要说明
列出已知的 Ruby 版本
rvm list known
安装一个 Ruby 版本
rvm install 2.2.0 --disable-binary
这里安装了最新的 2.2.0, rvm list known 列表里面的都可以拿来安装。
切换 Ruby 版本
rvm use 2.2.0
设置为默认版本,这样一来以后新打开的控制台默认的 Ruby 就是这个版本
rvm use 2.2.0 --default
查询已经安装的ruby
rvm list
卸载一个已安装版本
rvm remove 1.8.7
在 rvm 控制下ruby版本的情况下,由 rubygem 安装的各种软件(例如:rails),统一在 /usr/local/rvm/gems/ruby-${version}/gems/目录下,由 rvm 命令统一调度。
gem 命令在 rvm install ${ruby version} 安装ruby时,就已经安装了:/usr/local/rvm/rubies/ruby-${version}/bin/gem
至于2.4.x版本的ruby,请先忽略它。
rvm 安装ruby2.2
ruby 错误
ossl_pkey_ec.c:816: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function)
ossl_pkey_ec.c:816: error: (Each undeclared identifier is reported only once
ossl_pkey_ec.c:816: error: for each function it appears in.)
make[2]: *** [ossl_pkey_ec.o] Error 1
make[2]: Leaving directory `/dist/src/ruby-1.9.3-p448/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: Leaving directory `/dist/src/ruby-1.9.3-p448'
make: *** [build-ext] Error 2
centos新版本默认openssl的配置变更取消了对EC_xx的支持,取消编译安装ruby,使用rvm
[root@ ~]#rvm install 2.2.0 --disable-binary # 安装2.2.0 版本的ruby
[root@ ~]#rvm use 2.2.0
Using /usr/local/rvm/gems/ruby-2.2.0
[root@ ~]#rvm list
rvm rubies
* ruby-1.9.3-p448 [ x86_64 ]
=> ruby-2.2.0 [ x86_64 ]
# => - current
# =* - current && default
# * - default
[root@ ~]#ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
[root@ ~]#rvm use 2.2.0 --default
Gems 源
taobao Gems 源已停止维护,现由 ruby-china 提供镜像服务
[root@ ~]# gem sources -a http://gems.ruby-china.org
http://gems.ruby-china.org added to sources
[root@ rubygems-2.1.7]# gem sources -l
*** CURRENT SOURCES ***
http://gems.ruby-china.org
安装 rails 4.2
[root@ ~]# gem install rails -v=4.2
[root@ ~]# rails -v
Rails 4.2.0
[root@ ~]#
安装mysql模块
[root@ ~]# gem install mysql2
安装bundle
[root@ ~]# gem install bundler
安装Passenger
准备nginx编译环境
[root@ ~]#yum install gcc openssl-devel pcre-devel zlib-devel
[root@ ~]#wget http://pkgs.fedoraproject.org/repo/pkgs/gperftools/gperftools-2.0.tar.gz/13f6e8961bc6a26749783137995786b6/gperftools-2.0.tar.gz -O /dist/dist/gperftools-2.0.tar.gz
[root@ ~]# cd /dist/src/
[root@ src]# tar xf /dist/dist/gperftools-2.0.tar.gz
[root@ src]# cd gperftools-2.0/
[root@ gperftools-2.0]# ./configure
[root@ gperftools-2.0]# make
[root@ gperftools-2.0]# make install
[root@ gperftools-2.0]# echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
[root@ gperftools-2.0]# /sbin/ldconfig
安装passenger+编译nginx
[root@ ~]# gem install passenger
[root@ ~]# passenger-install-nginx-module
### 一些输出信息,提示如何安装 ###
Press Enter to continue, or Ctrl-C to abort.
# 回车继续
Which languages are you interested in?
# 要求选择语言
Use <space> to select.
If the menu doesn't display correctly, press '!'
‣ ⬡ Ruby
⬢ Python
⬢ Node.js
⬡ Meteor
Do you want this installer to download, compile and install Nginx for you?
# 选择安装方式
1. Yes: download, compile and install Nginx for me. (recommended) The easiest way to get started.
A stock Nginx 1.10.2 with Passenger support, but with no other additional third party modules, will be installed for you to a directory of your choice.
2. No: I want to customize my Nginx installation. (for advanced users) Choose this if you want to
compile Nginx with more third party modules besides Passenger, or if you need to pass additional
options to Nginx's 'configure' script. This installer will 1) ask you for the location of the Nginx source code, 2) run the 'configure' script according to your instructions, and 3) run 'make install'.
Whichever you choose, if you already have an existing Nginx configuration file,then it will be preserved.
Enter your choice (1 or 2) or press Ctrl-C to abort: 2
--------------------------------------------
Where is your Nginx source code located?
Please specify the directory: /dist/src/nginx-1.10.2
# 源码包路径
--------------------------------------------
Where do you want to install Nginx to?
Please specify a prefix directory [/opt/nginx]: /usr/local/nginx
# 安装路径
Extra Nginx configure options
Extra arguments to pass to configure script: --user=www --group=www --with-http_flv_module --with-google_perftools_module
# 编译选项
Nginx with Passenger support was successfully installed.
# 完成
编辑nginx的配置文件
http {
...
passenger_root /usr/local/rvm/gems/ruby-2.2.0/gems/passenger-5.1.2;
passenger_ruby /usr/local/rvm/gems/ruby-2.2.0/wrappers/ruby;
passenger_user www;
passenger_group www;
...
}
安装配置 redmine 3.2
安装 redmine
[root@ web]# cd /data/web/
[root@ web]# svn co https://svn.redmine.org/redmine/branches/3.2-stable redmine-3.2
[root@ web]# cd redmine-3.2/
[root@ redmine-3.2]# bundle install --without development test postgresql sqlite rmagick
配置数据库
mysql> create database redmine character set utf8;
mysql> create user 'redmineuser'@'localhost' identified by 'na4#Z**c';
mysql> grant all privileges on `redmine_%`.* to 'redmineuser'@'localhost' ;
mysql> flush privileges;
[root@ redmine-3.2]#vi config/database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: redmineuser
password: "na4#Z**"
encoding: utf8
生成数据库和admin用户
# 生成秘钥
[root@ redmine-3.2]# rake generate_secret_token
# 初始化数据库
[root@ redmine-3.2]# RAILS_ENV="production" rake db:migrate
# 导入默认数据
[root@ redmine-3.2]# RAILS_ENV=production REDMINE_LANG=zh bundle exec rake redmine:load_default_data
配置nginx站点
[root@ redmine-3.2]# vim /data/conf/nginx/vhost/redmine.conf
server {
listen 80;
server_name redmine.test.com;
root /data/web/redmine-3.2/public;
passenger_enabled on;
access_log /data/logs/redmine.test.com.log main;
}
安装 knowledgebase插件
[root@ ~]# wget https://github.com/alexbevi/redmine_knowledgebase/archive/v3.2.0.tar.gz
[root@ ~]# mv v3.2.0 v3.2.0.tar.gz
[root@ ~]# tar xf v3.2.0.tar.gz
[root@ ~]# cp redmine_knowledgebase-3.2.0/ /data/web/redmine-3.2/plugins/redmine_knowledgebase -r
[root@ ~]# cd data/web/redmine-3.2
[root@ redmine-3.2]# bundle install --without development test postgresql sqlite rmagick
[root@ redmine-3.2]# RAILS_ENV="production" rake redmine:plugins:migrate NAME=redmine_knowledgebase
后台修改admin密码
默认管理员:admin ,密码:admin
[root@ ~]# cd /data/web/redmine-3.2/bin
[root@ bin]# ./rails console production
Loading production environment (Rails 4.2.7.1)
2.2.0 :001 > admin_user = User.find_by_login('admin')
=> #<User id: 1, login: "admin", hashed_password: "6ded810822e4e5ac56b1106dff4ce8ad582865f1", firstname: "Redmine", lastname: "Admin", admin: true, status: 1, last_login_on: nil, language: "", auth_source_id: nil, created_on: "2017-07-24 08:00:57", updated_on: "2017-07-24 08:00:57", type: "User", identity_url: nil, mail_notification: "all", salt: "478ff0cc9c4e8cc967239b5523121fcd", must_change_passwd: false, passwd_changed_on: nil>
2.2.0 :002 > admin_user.password = 'XXXX'
=> "wsjin2039"
2.2.0 :003 > admin_user.save
=> true
2.2.0 :006 > quit
FAQ
问题1:
[root@ ~]# passenger-status
/usr/local/rvm/gems/ruby-2.2.0/gems/bundler-1.14.5/lib/bundler/rubygems_ext.rb:45:in
`full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError)
解决方式:
//升级gem
[root@ ~]# gem update --system
问题2:
/usr/local/rvm/gems/ruby-2.2.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: duplicated key at line 466 ignored: "inodot"
解决方式:
将/usr/local/rvm/gems/ruby-2.2.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb
中的inodot重复变量注释掉一个
redmine3.2 的部署的更多相关文章
- [Redmine] Centos5上安装Redmine3.0+nginx+thin部署
项目管理的需要所以安装Redmine,其实wiki放在上面也不错的. 首先是安装,ruby应用第一次装,把坑记住. nginx, mysql是已经安装好的,只需要配置, 结合nginx的部署方式很多, ...
- centos6.5部署redmine3.2
ruby 2.1 + rails 4.2+ mysql 5.6 +centos6.5 + rvm 1.29 1.基本的软件环境 yum -y install libyaml-devel zlib-de ...
- redmine和svn server的部署
作为一个程序猿,想要很好的管理自己项目和代码,我们需要一些工具做辅助. 项目管理工具redmine和代码版本管理工具 SVN(Subversion). 我们选择在虚拟机里面安装windows部署这两套 ...
- centos6.5搭建redmine3.4
缺陷管理,对问题的持续跟踪!redmine很棒的基于ruby开发 Redmine部署架构 mysql+nginx+ruby+redmine 3.4.x 部署环境 centos 6.5 x64redm ...
- Ubuntu+Ruby+MySQL+Nginx+Redmine部署记录
(2019年2月19日注:这篇文章原先发在自己github那边的博客,时间是2016年7月26日) 周五的时候老大布置了一个任务下来,要部署一个Redmine用于研发部,同时升级工作室的Redmine ...
- [原]CentOS7.2部署node-mapnik
转载请注明表作者think8848及出处(http://think8848.cnblogs.com) node-mapnik依赖项中要求g++ >= 5, toolchain (>= GL ...
- 使用Visual Studio 2015 开发ASP.NET MVC 5 项目部署到Mono/Jexus
最新的Mono 4.4已经支持运行asp.net mvc5项目,有的同学听了这句话就兴高采烈的拿起Visual Studio 2015创建了一个mvc 5的项目,然后部署到Mono上,浏览下发现一堆错 ...
- 通过Jexus 部署 dotnetcore版本MusicStore 示例程序
ASPNET Music Store application 是一个展示最新的.NET 平台(包括.NET Core/Mono等)上使用MVC 和Entity Framework的示例程序,本文将展示 ...
- 结合Jexus + Kestrel 部署 asp.net core 生产环境
ASP.NET Core 是微软的全新的框架.这一框架的目标 ︰ 跨平台 针对云应用优化 解除 System.Web 的依赖. 获得下面三个方面的优势,你可以把它认为是一个C# 版本的NodeJS: ...
随机推荐
- (转)EOSIO开发(一)使用Docker构建本地环境
前言 一直想学习EOS开发,但是不知道怎么入门.最近从GitHub上下载了源码,发现官方已经提供了完整的EOSIO开发入门教程,既然如此赶紧开始行动.今天是系列文章的第一篇,介绍如何使用Docker搭 ...
- python 获取SLB信息 更换证书
首先安装阿里云SDK pip install aliyun-python-sdk-core pip install aliyun-python-sdk-slb 可以配合jenkins传递参数 #获取s ...
- token的使用流程
- [LeetCode] 620. Not Boring Movies_Easy tag: SQL
X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a ...
- tensorflow mac安装方法
480 pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl 481 ...
- python math random
很有用个的工具 值得好好看看,这是作者(python发明者)对于工作中使用到的大多数场景的提炼 //test.py 1 import math 2 3 print abs(-10) 4 print m ...
- iOS UI基础-12.0 Storyboard
storyboard创建控制器 1.先加载storyboard文件(Test是storyboard的文件名) UIStoryboard *storyboard = [UIStoryboard stor ...
- echarts实现全国地图
1.首先我没有按需引入echarts,我是全局引入的,所以说在node_modules中有 这个china,你只需要在你的页面引入即可 但是按需引入echarts 的 项目中node_modules中 ...
- 解决React Native使用Fetch API请求网络报Network request failed
问题来源: 1 . 在测试fetch数据请求时,Xcode9.0以上的无法请求https, 需要在Xcode中加载项目后修改Info.plist的相关配置,具体如下参考 问题及解决方法一模一样,不再重 ...
- c# 调试模式下Swaggerf附加接口参数
c# 调试模式下Swaggerf附加接口参数,如:每个接口Header中附加参数appId 1.新增过滤器: public class GlobalHttpHeaderFilter : IOperat ...