源碼安裝redmine

http://www.redmine.org/projects/redmine/wiki/redmineinstallmysql

建立redmine數據庫

mysql -u root -p

輸入mysql密碼後,依次執行web

CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

修改database.yml

cp config/database.yml.example config/database.yml
production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: root
  password: my_password

安裝依賴項

須要安裝mysql2,rails3的驅動全用的mysql2.sql

sudo apt-get install libmysqlclient-dev
gem install mysql2

若是須要數據庫

sudo apt-get install imagemagick libmagickwand-dev
gem install rmagick

而後是bundlerbash

gem install bundler
bundle install --without development test

 Session store secret generation

bundle exec rake generate_secret_token

redmine 1.4命令不一樣,詳見上面的連接ide

Database schema objects creation

RAILS_ENV=production bundle exec rake db:migrate

這個過程有點慢(建立表)測試

Database default data set

RAILS_ENV=production bundle exec rake redmine:load_default_data

會提示選擇語言,簡體中文爲zhspa

測試

bundle exec rails server webrick -e production

打開http://localhost:3000/.net

此時沒法經過IP地址訪問,詳見Rails啓動後,沒法經過IP訪問code

將命令換成以下命令便可。

bundle exec rails server webrick -e production -p 端口 -b IP
相關文章
相關標籤/搜索