环境:CentOS 6.6
Ruby Version 1.9.3p448
rails Version 4.2.5
Mysql Version 5.5
前提:完成Ruby on Rails搭建
安装:
[root@CentOS ~]# yum -y install mysql-devel [root@CentOS ~]# netstat -tunlp|grep 3306 tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1446/mysqld [root@CentOS ~]#
安装Redmine所需要的环境:
[root@CentOS ~]# yum -y install php php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap php php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap readline-devel libffi-devel [root@CentOS software]# tar -zxvf redmine-3.0.5.tar.gz -C /usr/local/ [root@CentOS software]# cd /usr/local/redmine-3.0.5/ [root@Centos software]# chown redmine:redmine /usr/local/redmine-3.0.5/ -R [root@CentOS ~]# cd /usr/local/redmine-3.0.5/config
[root@CentOS config]# cp database.yml.example database.yml [root@CentOS config]# head -n 11 database.yml|tail -n 7 production: adapter: mysql2 database: redmine host: 172.24.17.120 username: redmineuser password: "redminepass" encoding: utf8 [root@CentOS config]# cp configuration.yml.example configuration.yml [root@CentOS config]# head -n 24 configuration.yml|tail production: email_delivery: delivery_method: :async_smtp async_smtp_settings: address: 172.24.17.120 port: 25 domain: 172.24.17.120 authentication: :login user_name: redmine@mail.com password: redminepass [root@CentOS config]# cd .. [root@CentOS redmine-3.0.5]# head -1 Gemfile source 'https://ruby.taobao.org/' [root@CentOS redmine-3.0.5]#
[root@CentOS redmine-3.0.5]# yum -y install ImageMagick* rubygems* ruby-RMagick* [root@CentOS redmine-3.0.5]# gem install rmagick [root@CentOS redmine-3.0.5]# bundle install -V
[root@CentOS redmine-3.0.5]# bundle exec rake generate_secret_token [root@CentOS redmine-3.0.5]# RAILS_ENV=production bundle exec rake db:migrate [root@CentOS redmine-3.0.5]# RAILS_ENV=production bundle exec rake redmine:load_default_data Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, es-PA, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] zh ==================================== Default configuration data loaded. [root@CentOS redmine-3.0.5]# [root@CentOS redmine-3.0.5]# cd public/ [root@CentOS public]# cd .. [root@CentOS redmine-3.0.5]# chown -R redmine:redmine * [root@CentOS redmine-3.0.5]# chmod -R 755 files log tmp public/plugin_asset [root@CentOS redmine-3.0.5]# bundle exec rails server -b 172.24.17.120 webrick -e production -d => Booting WEBrick => Rails 4.2.3 application starting in production on http://172.24.17.120:3000 => Run `rails server -h` for more startup options [root@CentOS redmine-3.0.5]# netstat -tunlp|grep 3000 tcp 0 0 172.24.17.120:3000 0.0.0.0:* LISTEN 3935/ruby [root@CentOS redmine-3.0.5]# [root@CentOS software]# tar -zxvf nginx-1.7.11.tar.gz [root@CentOS software]# useradd -s /sbin/nologin nginx [root@CentOS software]# gem install passenger -V [root@CentOS software]# passenger-install-nginx-module [root@CentOS ~]# chown nginx:nginx /usr/local/nginx/ -R [root@CentOS ~]# head -1 /usr/local/nginx/conf/nginx.conf user nginx nginx; [root@CentOS ~]# [root@CentOS ~]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf [root@CentOS ~]# /etc/init.d/redmined start => Booting WEBrick => Rails 4.2.3 application starting in production on http://172.24.17.120:3000 => Run `rails server -h` for more startup options Starting redmine... [ OK ] [root@CentOS ~]# [root@CentOS ~]# netstat -tunlp|grep 3000 tcp 0 0 172.24.17.120:3000 0.0.0.0:* LISTEN 25679/ruby [root@CentOS ~]#
[root@CentOS ~]# chkconfig --add redmined [root@CentOS ~]# chkconfig redmined on
转载于:https://blog.51cto.com/yfshare/1719060