在nginx上運行redmine配置

來源:互聯網
上載者:User

 

1.mysql配置

<pre>

create database redmine character set utf8;

create user 'redmine'@'localhost' identified by 'my_password';//可做

grant all privileges on redmine.* to 'redmine'@'localhost';//可做

</pre>

 

 

2.安裝RubyGems

<pre>

# cd /usr/ports/devel/ruby-gems

# make install clean

</pre>

 

 

3.安裝ruby-iconv

<pre>

# cd /usr/ports/converters/ruby-iconv

# make install clean

</pre>

 

 

4.安裝 rails2.3.5 、rack1.0.1、 thin1.2.7 、mysql

<pre>

# rehash

# gem install rails -v=2.3.5 (可能需要點時間)

# gem install rack -v=1.0.1

# gem install mysql

# gem install thin(x)

</pre>

 

 

5.安裝 rubygem-passenger,在編譯選擇nginx

<pre>

# cd /usr/ports/www/rubygem-passenger/

# make config //選擇nginx

# make install clean

# passenger-install-nginx-module //選擇第二個時,提供源碼 在/usr/ports/distfiles/裡有nginx壓縮檔,可解壓提供

</pre>

 

 

6.下載redmine http://www.redmine.org/wiki/redmine/Download解壓放在/opt/nginx/html/redmine

配置

<pre>

# cp config/database.yml.example config/database.yml

# cp config/email.yml.example config/email.yml

# cp public/dispatch.fcgi.example public/dispatch.fcgi

# chmod 777 tmp

# chmod 777 public/stylesheets

# vim config/database.yml

production:

 adapter: mysql

 database: redmine

 host: localhost

 username: redmine

 password: redmine

 encoding: utf8

# vim config/email.yml

production:

 delivery_method: :smtp

 smtp_settings:

#tls: true

address: mail.xxoo.com

port: 25

domain: mail.xxoo.com

authentication: :login

user_name: "xxoo@xxoo.com"

password: "xxoo"

</pre>

 

 

7.nginx配置(vim /opt/nginx/conf/nginx.conf)

<pre>

    #rails server

    server {

        listen 80; 

        server_name www.redmine.cn; 

        root /opt/nginx/html/redmine/public; 

        passenger_enabled on; 

    }

</pre>

 

 

8.編譯產生

<pre>

# set RAILS_ENV=production (x)

# cd /opt/nginx/html/redmine

# rake config/initializers/session_store.rb  

# rake db:migrate RAILS_ENV=production

# rake redmine:load_default_data RAILS_ENV=production 

# ruby script/server webrick -e production(x開啟3000連接埠開啟)

</pre>

 

==============================================

點綴娛樂 點綴娛樂 點綴娛樂 點綴娛樂 點綴娛樂 點綴娛樂 點綴娛樂 點綴娛樂 

==============================================

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.