Redmine 0.9.3 サーバ環境

2010年04月09日 23時33分 Redmine • Tags:



Redmine 0.9.3をCentOS5上に構築する方法です。

事前環境構築

インストール

[src]# wget http://rubyforge.org/frs/download.php/69449/redmine-0.9.3.tar.gz
[src]# tar xvzf redmine-0.9.3.tar.gz
[src]# mv redmine-0.9.3 /usr/local/
[src]# cd /usr/local/redmine-0.9.3
[redmine-0.9.3]# /usr/local/mysql5/bin/mysqld_safe --user=mysql &
[redmine-0.9.3]# /usr/local/mysql5/bin/mysql -u root -p
mysql> create database redmine default character set utf8;
mysql> GRANT ALL ON redmine.* TO reduser@localhost IDENTIFIED BY 'password';
mysql> flush privileges;
mysql> quit
[redmine-0.9.3]# cp -p config/database.yml.example config/database.yml
[config]# vi config/database.yml
production:
  adapter: mysql
  database: redmine
  host: localhost
  username: reduser
  password: password
  encoding: utf8
[redmine-0.9.3]# rake config/initializers/session_store.rb
[redmine-0.9.3]# gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
[redmine-0.9.3]# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
[redmine-0.9.3]# rake db:migrate RAILS_ENV="production"
[redmine-0.9.3]# rake load_default_data RAILS_ENV="production"
[redmine-0.9.3]# ruby script/server -e production &
[redmine-0.9.3]# yum install lynx
[redmine-0.9.3]# lynx localhost:3000
#                                                                                 Redmine

   #Redmine: Latest news Redmine: Activity

     * Sign in
     * Register

     * Home
[redmine-0.9.3]# lynx localhost:3000
[redmine-0.9.3]# ps -ef | grep script/server
root      3001  2924  3 20:37 pts/0    00:00:06 ruby script/server -e production
[redmine-0.9.3]# kill -9 3001
[redmine-0.9.3]# ps -ef | grep script/server
[2]+  強制終了            ruby script/server -e production

 
Apacheとの連携

[redmine-0.9.3]# gem install passenger
[redmine-0.9.3]# passenger-install-apache2-module
Installation instructions for required software

 * To install Apache 2 development headers:
   Please run yum install httpd-devel as root.

 * To install Apache Portable Runtime (APR) development headers:
   Please run yum install apr-devel as root.

 * To install Apache Portable Runtime Utility (APU) development headers:
   Please download it from http://httpd.apache.org/
   (APR Utility is an integrated part of Apache.)

[redmine-0.9.3]# yum install httpd-devel
[redmine-0.9.3]# passenger-install-apache2-module
--------------------------------------------
The Apache 2 module was successfully installed.

Please edit your Apache configuration file, and add these lines:

   LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
   PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11
   PassengerRuby /usr/local/bin/ruby

--------------------------------------------
Deploying a Ruby on Rails application: an example

Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:

   <VirtualHost *:80<
      ServerName www.yourhost.com
      DocumentRoot /somewhere/public    # <-- be sure to point to 'public'!
      <Directory /somewhere/public>
         AllowOverride all              # <-- relax Apache security settings
         Options -MultiViews            # <-- MultiViews must be turned off
      </Directory>
   </VirtualHost>

[redmine-0.9.3]# vi /etc/httpd/conf/httpd.conf

LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /usr/local/bin/ruby

Listen 3000

<VirtualHost *:3000>
    ServerName redmine.hrtdotnet.org
    DocumentRoot /usr/local/redmine-0.9.3/public
    <Directory "/usr/local/redmine-0.9.3/public">
        AllowOverride all
        Options -MultiViews
    </Directory>
</VirtualHost>

[redmine-0.9.3]# /etc/init.d/httpd restart
httpd を停止中:                                            [  OK  ]
httpd を起動中:                                            [  OK  ]


One Response to “Redmine 0.9.3 サーバ環境”

  1. Harley より:

    It’s hard to find your posts in google. I found it on 21
    spot, you should build quality backlinks , it will help you
    to rank to google top 10. I know how to help you, just type in google – k2 seo
    tips

Leave a Reply

preload preload preload