yum install libyaml
### Ruby-1.9.3 ###
cd /root/pkg
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p320.tar.gz
tar xvzf ruby-1.9.3-p320.tar.gz
cd ruby-1.9.3-p320
./configure --prefix=/home/apps/ruby
make && make install
ln -s /home/apps/ruby/bin/* /usr/local/bin
ruby --version
### Rubygems-1.8.24 ###
cd /root/pkg
wget http://rubyforge.org/frs/download.php/76073/rubygems-1.8.24.tgz
tar xvzf rubygems-1.8.24.tgz
cd rubygems-1.8.24
ruby setup.rb
ln -s -f /home/apps/ruby/bin/* /usr/local/bin
### Passenger (requires gcc) ###
gem install passenger
passenger-install-apache2-moduleI
### Modify httpd.conf ###
cp /home/apps/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/ext/apache2/mod_passenger.so /home/apps/apache/modules/
vi /home/apps/apache/conf/httpd.conf
라인 추가
LoadModule passenger_module modules/mod_passenger.so
Include conf/extra/httpd-passenger.conf
### httpd-passenger.conf 파일 생성 ###
vi /home/apps/apache/conf/extra/httpd-passenger.conf
라인 추가
PassengerRoot /home/apps/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.19
PassengerRuby /home/apps/ruby/bin/ruby
### Vhost 생성 ###
vi /home/apps/apache/conf/vhost/redmine
## default setting ##
<VirtualHost *>
ServerName jyyeom-01.cafe24test.com
ServerAlias 192.168.49.234
DocumentRoot "/home/redmine/www/public/"
ErrorLog "|/usr/sbin/cronolog /home/apps/apache/logs/vhost/redmine-err.%y%m%d"
CustomLog "|/usr/sbin/cronolog /home/apps/apache/logs/vhost/redmine-acc.%y%m%d" combined
<Directory "/home/redmine/www/public/">
AllowOverride all
Options Indexes ExecCGI FollowSymLinks -MultiViews
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
/etc/init.d/httpd.conf graceful
### Install Bundler ###
gem install bundler
ln -s -f /home/apps/ruby/bin/* /usr/local/bin
gem install passenger
### redmine 설치 ###
cd /root/pkg
wget http://rubyforge.org/frs/download.php/76722/redmine-2.2.2.tar.gz
tar xfz redmine-2.2.2.tar.gz -C /home/redmine/
cd /home/redmine/
mv redmine-2.2.2/ www
chown -R nobody.nobody www
DB 생성
mv config/database.yml.example config/database.yml
수정 for DB 정보
vi Gemfile
source 'http://rubygems.org'
gem 'rails', '3.2.11'
gem "jquery-rails", "~> 2.0.2"
gem "i18n", "~> 0.6.0"
gem "coderay", "~> 1.0.6"
gem "fastercsv", "~> 1.5.0"
gem "builder", "3.0.0"
gem "mysql", "~> 2.8.1"
gem "ruby-openid", "~> 2.1.4"
gem "rack-openid"
gem "net-ldap", "~> 0.3.1"
### 테이블 생성 및 초기 데이터 입력 ###
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
### 서버 가동 ###
ruby script/rails server webrick -e production
댓글 없음:
댓글 쓰기