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: ...
随机推荐
- Linux开启root用户
1.进入系统的时候Ctrl + Alt + F1,切换到命令窗口,登录现有用户: 2.执行sudo passwd root + root的密码: 3.按照要求输入密码: ==> root用户密码 ...
- 配置Tomcat启用Https安全协议的访问
1.首先使用keytool工具生成证书文件名为cnkey,然后拷贝此证书即文件到tomcat安装目录conf下(放到哪里都行,主要在下面配置中指明路径就好了.这里我就放这了conf) 2.配置serv ...
- 【Redis】持久化
Redis提供了为持久化提供了两种方法:第一种是快照:他可以将存在某一时刻的所有数据都写入硬盘里面.第二种是只追加文件(AOF):它会在执行命令时,将被执行的写命令复制到硬盘里面. Redis支持持久 ...
- 2019.04.09 电商24 订单模快 ORM
前面三个模块已近结束,现在看是订单模块的.想一下淘宝上的订单,在购物车中选中,提交,跳转到订单界面. 获取传过来的信息,那也要建立一个订单表,当我支付的时候,也要获取一些数据,将这些数据放到这个表中 ...
- 2019.03.18 连接my sql
11.登陆功能(链接MySQL) python manage.py starapp movie 新建一个应用模块之后要记得到setting添加这个应用模块 在python2中你还有去导入一个MySQL ...
- [LeetCode] 643. Maximum Average Subarray I_Easy tag: Dynamic Programming(Sliding windows)
Given an array consisting of n integers, find the contiguous subarray of given length k that has the ...
- U盘复制文件到最后5秒会卡住怎么办解决
现在的U盘容量已经非常大了,一般都有16G以上,为了能放单文件大于4G的数据大多数时候我们都是把U盘格式化为ntfs格式的,所以会出现不管是大文件还是小文件,当你往U盘里复制文件或者使用发送到U盘功能 ...
- 时间序列模式(ARIMA)---Python实现
时间序列分析的主要目的是根据已有的历史数据对未来进行预测.如餐饮销售预测可以看做是基于时间序列的短期数据预测, 预测的对象时具体菜品的销售量. 1.时间序列算法: 常见的时间序列模型; 2.时序模 ...
- vim 常用
Format JSON :%!python -m json.tool 1. define custom function and use it define function in .vimrc fu ...
- 为Flex Builder设置测试服务器
当用Flex Builder测试一个Flex应用时,它默认情况下会调用系统自带浏览器直接从bin-debug文件夹打开相应的html文件.浏览器中URL地址形式如file:///C:/AllESRI/ ...