文档章节

Centos7-Redmine-Nginx-Passenger安装

jenopob
 jenopob
发布于 2017/10/22 22:10
字数 584
阅读 180
收藏 0

Step 1 - Redmine application

wget http://www.redmine.org/releases/redmine-3.4.3.tar.gz
cp redmine-3.4.3.tar.gz /var/www
cd /var/www
tar -zxf redmine-3.4.3.tar.gz 
mv redmine-3.4.3 redmine
cd redmine/

Step 2 - Create an empty database and accompanying user

yum -y install mariadb-server mariadb
systemctl enable mariadb.service
mysql_secure_installation
mysql -u root -p
CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

Step 3 - Database connection configuration

cp config/database.yml.example config/database.yml
vim config/database.yml

production: adapter: mysql2 database: redmine host: localhost username: redmine password: my_password encoding: utf8

Step 4 - Dependencies installation

yum install gem rubygems
yum install libxml2-devel zlib-devel ruby-devel mariadb-devel ImageMagick-devel libcurl-devel
gem sources --remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
gem install bundler
bundle install --without development test

Step 5 - Session store secret generation

bundle exec rake generate_secret_token

Step 6 - Database schema objects creation

RAILS_ENV=production bundle exec rake db:migrate

Step 7 - Database default data set

RAILS_ENV=production bundle exec rake redmine:load_default_data
zh

Step 8 - File system permissions

E.g., assuming you run the application with a redmine user account:

mkdir -p tmp tmp/pdf public/plugin_assets
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets

Step 9 - Test the installation

bundle exec rails server webrick -e production http://localhost:3000/

Step 10 - Logging into the application¶

login: admin password: admin

Step 11 - Web Server

gem install passenger
passenger-install-nginx-module

Nginx with Passenger support was successfully installed. The Nginx configuration file (/opt/nginx/conf/nginx.conf) must contain the correct configuration options in order for Phusion Passenger to function correctly.

This installer has already modified the configuration file for you! The following configuration snippet was inserted:

http {
...
passenger_root /usr/local/share/gems/gems/passenger-5.0.21;
passenger_ruby /usr/bin/ruby;
...
}

After you start Nginx, you are ready to deploy any number of Ruby on Rails applications on Nginx.

Step 12 - 在centos7版本下增加nginx service

vim /usr/lib/systemd/system/nginx.service
[Unit]
Description=The nginx HTTP and reverse proxy server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/opt/nginx/logs/nginx.pid
# Nginx will fail to start if /run/nginx.pid already exists but has the wrong
# SELinux context. This might happen when running `nginx -t` from the cmdline.
# https://bugzilla.redhat.com/show_bug.cgi?id=1268621
ExecStartPre=/usr/bin/rm -f /opt/nginx/logs/nginx.pid
ExecStartPre=/opt/nginx/sbin/nginx -t
ExecStart=/opt/nginx/sbin/nginx
ExecStop=/opt/nginx/sbin/nginx -s stop
ExecReload=/opt/nginx/sbin/nginx -s reload
KillMode=process
KillSignal=SIGQUIT
TimeoutStopSec=5
PrivateTmp=true

[Install]
WantedBy=multi-user.target
#systemctl enable nginx.service

Step 13 - Configure nginx run redmine

vim /opt/nginx/conf/nginx.conf

增加一行在后面,如: passenger_root /usr/local/share/gems/gems/passenger-5.0.21; passenger_ruby /usr/bin/ruby; passenger_app_env production; 注释并修改如下:

# location / {
# root html;
# index index.html index.htm;
# }
root /var/www/redmine/public;
passenger_enabled on;

重启服务:

systemctl restart nginx.service

Step 14 - Configure redmine mail发送通知

cd /var/www/redmine/config
cp configuration.yml.example configuration.yml 
vim configuration.yml

修改如下:

default:
# Outgoing emails configuration
# See the examples below and the Rails guide for more configuration options:
# http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
email_delivery:
delivery_method: :smtp
smtp_settings:
address: MY_SMTP_DOMAIN
port: 25
domain: MY_DOMAIN
authentication: :login
user_name:MY_MAIL_USER
password: MY_MAIL_PASS

重启服务:

systemctl restart nginx.service

© 著作权归作者所有

jenopob
粉丝 1
博文 14
码字总数 13597
作品 0
无锡
CTO(技术副总裁)
私信 提问
centos7安装redmine3,并升级redmine1.8到3

redmine是一款项目管理开源工具,可以自定义开发流程,比较方便,redmine升级比较麻烦,我安装了两三天才搞定,特地分享一下 1.安装mysql 2.安装依赖包 3.安装ruby2.4 4.安装Redmine3 5.修改...

proinsightio
2018/01/04
0
0
项目管理软件Redmine+Ruby+Passenger+Nginx的安装

Redmine是一个开源的、基于Web的项目管理和缺陷跟踪工具。它用日历和甘特图辅助项目及进度可视化显示,同时它又支持多项目管理。这里博主想用它来记录个人工作中碰到的问题和解决步骤。好记性...

章郎虫
2014/03/28
775
0
centos 6.5下安装mysql+nginx+redmine 3.1.0 笔记

系统:centos 6.5 x64 redmine 版本:3.1.0 ruby 版本: 2.2.3 rails 版本 : 4.2 过程 1、安装RVM 安装公钥 [root@localhost ~]# curl -sSL https://rvm.io/mpapis.asc | gpg --import gpg......

在湖闻樟
2015/09/19
1K
1
LNMP整合安装Redmine2.3实录

自上一次在LNMP环境下安装过Redmine之后发表了《LNMP下安装Redmine2.3手记》,Inhu决定再一次尝试。因为上一次Inhu是通过折中的办法,也就是利用bitnami+lnmp这种做法实现的。现在我再一次决...

胡晋
2013/06/28
1K
5
how to install redmine2.4.1 on centos6.3

redmine是什么? 这是基于Ruby+Rails框架开发的一套跨平台项目管理系统, 支持多种数据库(百度) 安装开发包 yum install gcc gcc-c++ make automake autoconf curl-devel openssl-devel zl...

gaolongquan
2013/12/06
762
1

没有更多内容

加载失败,请刷新页面

加载更多

springboot初探---spring-boot-starter-web究竟干了啥

上一篇已经简单介绍了启动类的部分,这一篇主要讨论一下springboot引入的哪些依赖 我们都知道想用springboot做一个web应用,首先要做的是引入相关依赖,两步操作: 1、添加spring-boot-start...

计算机狼
33分钟前
5
0
基于Rocket.chat搭建内网聊天系统(使用docker,本机不需要安装meteor)

您可能不希望使用标准的Docker命令,而是希望对部署进行更多的自动化管理。这就是使用Docker-compose可能会派上用场的地方。 确保您已安装Docker和Docker-compose并且可以正常运行。 docker...

吴伟祥
35分钟前
6
0
conda 更新源

更新conda 源为阿里源 conda config --add channels http://mirrors.aliyun.com/pypi/simple conda config --set show_channel_urls yes 阿里云: http://mirrors.aliyun.com/pypi/simple/ 豆......

Mr_Tea伯奕
36分钟前
4
0
java 泛型使用

每次写泛型方法都翻下百度,还是自己记录下把。 1、定义一个泛型方法,使用传入参数类型来传递泛型。这种用法在封装json序列化工具类应该会用到。 List<xxx> aa = getList(xxx.class);pr...

朝如青丝暮成雪
39分钟前
6
0
深入了解Java模板引擎Freemarker

前言 常用的Java模板引擎包括:JSP、Freemarker、Thymeleaf、Velocity,从Github上查阅到这几款主流的模板引擎的性能的对比,总体上看,JSP、Freemarker、Thymeleaf、Velocity在性能上差别不...

code-ortaerc
41分钟前
8
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部