Redmine1.1.2 with Ruby Enterprise 1.8.7 installed Ubuntu 10.0.4


Redmine1.1.2 with Ruby Enterprise 1.8.7 installed Ubuntu 10.0.4

初始化工作
Ubuntu 10.0.4服務器版
apt-get update,
apt-get install ssh
apt-get install mysql-server
apt-get install mysql-client

1、安裝ruby Enterprise

wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.03.tar.gz
tar -xvzf ruby-enterprise-1.8.7-2011.03.tar.gz
cd ruby-enterprise-1.8.7-2011.03.tar.gz
./installer

會提示你缺如下需要安裝的東東
apt-get install build-essential
apt-get install zlib1g-dev
apt-get install libssl-dev
apt-get install libreadline5-dev
安裝完後再./installer

提示mysql安裝不上,我們回頭再gem

設置環境變量 vi /etc/profile
PATH=$PATH:/opt/ruby-enterprise-1.8.7-2011.03/bin

再運行/etc/source profile

2、系統中已經存在rubygems爲1.52,應該降到1.35:
查找gem包的安裝目錄which gem
刪除rm -rf /bin/gem

下載安裝gem1.35
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar xzvf rubygems-1.3.5.tgz
cd rubygems-1.3.5
ruby setup.rb
gem -v

3、 安裝redmine1.1.2要求的rails
gem install rails -v=2.3.5
gem install mysql
gem install ruby-openid
gem install i18n -v=0.4.2
gem install rake -v=0.8.7
卸載掉不需要的版本
gem uninstall rails -v=3.0.7
gem uninstall rack -v=1.3.0
gem uninstall rack -v=1.2.3
gem uninstall rake -v=0.9.1

安裝apache的fosion apache模塊

/opt/ruby-enterprise-1.8.7-2011.03/bin/passenger-install-apache2-module

根據提示安裝如下組件

apt-get install libcurl4-openssl-dev

apt-get install apache2-prefork-dev

apt-get install libapr1-dev

apt-get install libaprutil1-dev

根據安裝完fosion apache模塊後的提示內容(可能不同),在apache.conf最後一行加入
LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.7
PassengerRuby /opt/ruby-enterprise-1.8.7-2011.03/bin/ruby
PassengerDefaultUser www-data
4、安裝mysql服務器版及客戶端
mysql -uroot -p yourpwd
create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'yourpwd';
grant all privileges on redmine.* to 'redmine'@'localhost';
exit

5、 下載redmine1.1.2源文件,
cd /opt

wget http://rubyforge.org/frs/download.php/74419/redmine-1.1.2.tar.gz
tar -xvzf redmine-1.1.2.tar.gz
cd redmine-1.1.2
cp config/database.yml.example config/database.yml
修改config/database.yml配置production及development的數據庫參數

6、配置email參數

cp config/email.yml.example config/email.yml
nano config/email.yml

production:
delivery_method: :smtp
smtp_settings:
address: smtp.yourdomain
port: 587
tls: true
domain: or your domain
authentication: :plain
user_name: your domain
password: secretPassword

7、在redmine的目錄下配置運行參數
rake generate_session_store
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data

chown -R www-data:www-data files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets

8、配置apache在/etc/apache2/sites-available/default文件裏增加2項
RailsEnv production
RailsBaseURI /redmine

增加虛擬目錄 ln -s /redmine-1.1.2/public /var/www/redmine
重啓/etc/init.d/apache2 restart


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章