设为首页 收藏本站

运维网

查看: 47|回复: 0

[经验分享] redmine的安装

[复制链接]
累计签到:38 天
连续签到:1 天
发表于 2018-10-24 13:32:27 | 显示全部楼层 |阅读模式
____________________________________________________________________________________________________________________________

install RVM and RUBY      |  OK
____________________________________________________________________________________________________________________________


gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

source /root/.bashrc
source /root/.bash_profile

mkdir -p /root/.rvm/user


echo "ruby_url=https://cache.ruby-china.org/pub/ruby" > /root/.rvm/user/db


curl -L raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable --ruby --rails

_______________________________________________________________________________________


curl -L https://raw.githubusercontent.co ... ripts/rvm-installer | bash -s




rvm list known

rvm install 1.9.3

rvm remove 1.9.3

rvm list

rvm use 1.9.3



rvm gemset create rails20

rvm gemset list

rvm use 1.9.3@rails20

rvm gemset list



______________________________________________________________


OK



gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

source /root/.bashrc
source /root/.bash_profile


mkdir -p /root/.rvm/user
echo "ruby_url=https://cache.ruby-china.org/pub/ruby" > /root/.rvm/user/db



curl -sSL https://get.rvm.io | bash -s stable --ruby --rails

\curl -sSL https://get.rvm.io | bash -s stable




source /etc/profile.d/rvm.sh

ruby -v
        ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

rails -v
        Rails 4.2.0


rvm gemset list

        gemsets for ruby-2.2.0 (found in /usr/local/rvm/gems/ruby-2.2.0)
        => (default)
                global








#show redmine
http://www.redmine.org/projects/redmine/wiki/RedmineInstall



ruby -v
rvm remove 1.9.3

rvm list known
rvm install 2.1
gem install bundler
rvm use 2.1.1 --default
rvm gemset create rails4.2
gem install rails --version=4.2
rvm use 2.1.1@rails4.2
_________________________________________________________________________________________




ruby_redmine


URL

http://www.iyunv.com/thread-43667-1-1.html
http://ruby-china.org/wiki/rvm-guide

#show redmine
http://www.redmine.org/projects/redmine/wiki/RedmineInstall
_______________________________________________________________________________________

yum install zlib-devel gcc gcc-c++ make autoconf curl-devel ImageMagick-devel -y
_______________________________________________________________________________________





rvm install -> show ruby version -> ruby install -> rails install -> redmine install
                      |
                            |
                      ↓
http://www.redmine.org/projects/redmine/wiki/RedmineInstal


_______________________________________________________________________________________



#first you should install mysql



_______________________________________________________________________________________


_______________________________________________________________________________________
#1 config redmine /config/$.yml

tar -zxf redmine-3.3.0.tar.gz -C /opt

cd /opt/redmine-3.3.0/config


cp -a database.yml.example database.yml

vi /opt/redmine-3.3.0/config/database.yml

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "redmine"
  encoding: utf8
  socket: /usr/local/mysql/mysqld.sock(mysqld.sock的绝对路径)




cp -a configuration.yml.example configuration.yml


_______________________________________________________________________________________
#2 redmine install

#install environment package

cd /opt/redmine-3.3.0/

rvm use 2.1

bundle install --without development test

useradd -M -g redmine -s /sbin/nologin redmine

chown -R redmine.redmine /opt/redmine-3.3.0


_______________________________________________________________________________________
#3 config mysql data and user

#Mysql database seting

#login mysql,create redmine data and user

mysql -uroot -p
  
mysql> create database redmine character set utf8 collate utf8_bin;
mysql> create user 'redmine'@'localhost' identified by 'redmine';
mysql> grant all privileges on *.* to 'redmine'@'localhost';
mysql> flush privileges;


_______________________________________________________________________________________
#4 redmine install

#if you restore redmine.first you must restoe old mysql data."mysql -uroot -p redmine < redmine.bak.sql"

cd /opt/redmine-3.3.0

rake generate_secret_token
vim /usr/local/rvm/gems/ruby-2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb
:465

RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data

>zh

mkdir -p tmp tmp/pdf public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets


_______________________________________________________________________________________





_______________________________________________________________________________________
#>updata or bakcup redmine

#1backup your mysql database (you must be use "mysql -uroot -p redmine < redmine.sql" ).and check mysql user privileges.command test connect mysql user.
#2backup /opt/redmine-3.3.0/files to new /opt/redmine-3.3.0/files


cd /opt/redmine-3.3.0
vim /usr/local/rvm/gems/ruby-2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb
:465


bundle exec rake generate_secret_token
bundle exec rake db:migrate RAILS_ENV=production
_______________________________________________________________________________________







_______________________________________________________________________________________
#back your plugins
#backup /opt/redmine-3.3.0/plugins to new /opt/redmine-3.3.0/plugins


bundle exec rake redmine:plugins:migrate RAILS_ENV=production
bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production

_______________________________________________________________________________________





_______________________________________________________________________________________
#if error please runing gem install rmagick

gem install rmagick
_______________________________________________________________________________________






_______________________________________________________________________________________
#run service

cd /opt/redmine-3.3.0/

ruby bin/rails server webrick -e production -b 0.0.0.0 -p 3000 &
_______________________________________________________________________________________

other
_______________________________________________________________________________________
#ruby bin/rails server webrick -e production
#ruby script/rails server webrick -e production -p 3000 -d
#nohup ruby bin/rails server webrick -e production >>/opt/redmine/running_redmine.log 2>&1 &
_______________________________________________________________________________________





_______________________________________________________________________________________
#redmine user and password login
admin
admin

http://IP:3000
_______________________________________________________________________________________


_______________________________________________________________________________________





#sendmail seting

vi /opt/redmine-3.3.0.20/config/configuration.yml

default:
email_delivery:


      delivery_method: :smtp
      smtp_settings:
        address: "smtp.mxhichina.com"
        port: 25
        authentication: :plain
        domain: 'mail.e-eduspace.com'
        user_name: 'redmine@e-eduspace.com'
        password: 'Yjkj123456'




________________________________________________________________________________________



#redmine source install to /opt/redmine-3.3.0

#install......

#first "ruby bin/rails server webrick -e production -b 0.0.0.0 -p 3000 &" is OK,

kill -9 PID


_____________________________________________________________________________________

tar -zxf nginx-1.8.0.tar.gz -C /root

_____________________________________________________________________________________

cd /opt/redmine-3.3.0/public

cp -a dispatch.fcgi.example dispatch.fcgi

cp -a htaccess.fcgi.example .htaccess

_____________________________________________________________________________________

gem install passenger

cd /root

passenger-install-nginx-module

        >Enter
        >Enter
        >2
        choose source package path for /root/nginx-1.8.0
        >/usr/local/nginx
        >Enter
        >yes
_____________________________________________________________________________________

nginx:

vi /usr/local/nginx/conf/nginx.conf

        http{
        ##
        ###
        ####
        #####
        include /usr/local/nginx/conf/conf.d/*.conf;
        }


vim /usr/local/nginx/conf/conf.d/redmine.conf


server {

        listen 80;
        server_name localhost;
        access_log /usr/local/nginx/logs/accese.log combined;
        index index.html index.htm index.jsp index.php;
        root /opt/redmine-3.3.3/public;
        passenger_enabled on;
}








运维网声明 1、欢迎大家加入本站运维交流群:群①:263444886群②:197202523群③:485755530群④:201730672群⑤:202807635运维网交流群⑥:281548029
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、其他单位或个人使用、转载或引用本文时必须注明原文的出处
4、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
5、运维网 - 服务您的运维操作管理专家!
6、联系人Email:admin@yunvn.com 网址:www.iyunv.com

点击关注更多内容
您需要登录后才可以回帖 登录 | 立即注册  

本版积分规则  允许回帖邮件提醒楼主

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服 E-mail:kefu@yunvn.com

本站由青云提供云计算服务

运维网--中国最专业的运维工程师交流社区

京ICP备14039699号-1 Copyright © 2012-2018

使用手机软件扫描微信二维码

关注我们可获取更多热点资讯

Good good study day day up !


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


独家合作伙伴: 青云cloud

快速回复 返回顶部 返回列表