目次
【はじめに】
- for CentOS5.2
【情報】
- Redmine
- 紹介
- CentOS に Ruby on Rails
- CentOS にプロジェクト管理ソフトの redMine をインストール
- その他
【インストール】
CentOS 5.2
- GUIなしインストール
- リモート端末の漢字コード:UTF-8
Ruby
yum -y install ruby rdoc ruby-devel Installing: ruby-libs ######################### [1/5] Installing: ruby ######################### [2/5] Installing: ruby-irb ######################### [3/5] Installing: ruby-devel ######################### [4/5] Installing: ruby-rdoc ######################### [5/5] ruby -v ruby 1.8.5 (2006-08-25) [i386-linux]
RubyGems
cd /usr/local/src wget http://rubyforge.org/frs/download.php/35283/rubygems-1.1.1.tgz tar xvzf rubygems-1.1.1.tgz cd rubygems-1.1.1 ruby setup.rb gem -v 1.1.1
Ruby on Rails
gem install rails Bulk updating Gem source index for: http://gems.rubyforge.org/ Bulk updating Gem source index for: http://gems.rubyforge.org/ Successfully installed rake-0.8.1 Successfully installed activesupport-2.1.0 Successfully installed activerecord-2.1.0 Successfully installed actionpack-2.1.0 Successfully installed actionmailer-2.1.0 Successfully installed activeresource-2.1.0 Successfully installed rails-2.1.0 7 gems installed Installing ri documentation for rake-0.8.1... Installing ri documentation for activesupport-2.1.0... Installing ri documentation for activerecord-2.1.0... Installing ri documentation for actionpack-2.1.0... Installing ri documentation for actionmailer-2.1.0... Installing ri documentation for activeresource-2.1.0... Installing RDoc documentation for rake-0.8.1... Installing RDoc documentation for activesupport-2.1.0... Installing RDoc documentation for activerecord-2.1.0... Installing RDoc documentation for actionpack-2.1.0... Installing RDoc documentation for actionmailer-2.1.0... Installing RDoc documentation for activeresource-2.1.0...
MySQL
- http://centossrv.com/mysql.shtml
- http://db.setunai.net/2008/01/10/centos45%E3%81%ABmysql5%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B/
- Install
yum --enablerepo=centosplus install mysql-server-5* yum list mysql* Loading "installonlyn" plugin Setting up repositories Reading repository metadata in from local files Installed Packages mysql.i386 5.0.22-2.2.el5_1.1 installed mysql-server.i386 5.0.22-2.2.el5_1.1 installed Available Packages MySQL-python.i386 1.2.1-1 base mysql-bench.i386 5.0.22-2.2.el5_1.1 updates mysql-connector-odbc.i386 3.51.12-2.2 base mysql-devel.i386 5.0.22-2.2.el5_1.1 updates mysql-test.i386 5.0.22-2.2.el5_1.1 updates
- Config
vi /etc/my.cnf [mysqld] ・ ・ ・ default-character-set = utf8 skip-character-set-client-handshake
- 起動/停止
/etc/rc.d/init.d/mysqld start /etc/rc.d/init.d/mysqld stop
- 自動起動
chkconfig mysqld on
- 起動設定確認
chkconfig --list mysqld
- ログイン
mysql -u root
- 登録済ユーザ、パスワード確認
select user,host,password from mysql.user; +------+-----------------------+----------+ | user | host | password | +------+-----------------------+----------+ | root | localhost | | | root | hippo.about-rd.co.jp | | | root | 127.0.0.1 | | | | localhost | | | | hippo.about-rd.co.jp | | +------+-----------------------+----------+
- パスワード設定
- ホスト名がlocalhostのrootユーザにパスワード設定
- パスワード設定
set password for root@localhost=password('ikeken');
- ホスト名が自ホストのrootユーザにパスワード設定
set password for root@'hippo.about-rd.co.jp'=password('ikeken');
- ユーザー追加例
GRANT ALL PRIVILEGES ON *.* TO root@211.9.59.3 IDENTIFIED BY 'ikeken' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'ikeken' WITH GRANT OPTION;
- 接続確認
mysql -u root -p grep `hostname` /etc/hosts mysql -u root -h 'hippo.about-rd.co.jp' -p
- 匿名ユーザ削除
delete from mysql.user where user=''; select user,host,password from mysql.user;
- testデータベース削除
mysql -u root -p show databases; drop database test;
- データベース作成
mysql -u root -p create database redmine DEFAULT CHARACTER SET utf8; show databases;
Redmine
cd /usr/local/src wget http://files.rubyforge.vm.bytemark.co.uk/redmine/redmine-0.8.1.tar.gz tar zxvf redmine-0.8.1.tar.gz cd redmine-0.8.1/config cp database.yml.example database.yml
mysqladmin -p variables | grep socket
vi database.yml production: adapter: mysql database: redmine host: localhost username: root password: kenkenproject★ socket: /var/lib/mysql/mysql.sock encoding: utf8
cd /usr/local/src/redmine-0.8.1 rake db:migrate RAILS_ENV="production" rake load_default_data RAILS_ENV="production" ja
vi config/environment.rb # ENV['RAILS_ENV'] ||= 'production' ↓ ENV['RAILS_ENV'] ||= 'production'
cp config/email.yml.example config/email.yml vi config/email.yml # Outgoing email settings production: delivery_method: :smtp smtp_settings: address: localhost port: 25 domain: about-rd.co.jp # authentication: :login # user_name: redmine@example.net # password: redmine development: delivery_method: :smtp smtp_settings: address: 127.0.0.1 port: 25 domain: example.net authentication: :login user_name: redmine@example.net password: redmine
- 権限
chmod +x script/server
- port
system-config-securitylevel 3000
- 起動/停止
./script/server -e production & [Ctrl] + [c]
admin admin ※初期
ikeken
日本語対応
vi /usr/local/src/redmine-0.8.1/lang/ja.yml general_csv_encoding: SJIS general_pdf_encoding: UTF-8 ↓ general_csv_encoding: SJIS general_pdf_encoding: SJIS
リポジトリ情報の定期取得 [#g28bdc8a]
vi /etc/crontab */10 * * * * root cd /usr/local/src/redmine-0.8.1 && ruby script/runner "Repository.fetch_changesets" -e production 管理 - 設定 - リポジトリ - コミットを自動取得する をOFFにする。
【初期設定】
- My account
- modified
- 設定
- ホーム - 管理 - 設定 - 全般

- ホーム - 管理 - 設定 - 認証

- ホーム - 管理 - 設定 - メール通知

【使い方】
- Redmineを使ったプロジェクト管理(その1)
- Redmineを使ったプロジェクト管理(その2)
【その他】
以上
-
-