redmine 2.2.2+git ubuntu下安裝
下載redmine:
svn co http://svn.redmine.org/redmine/branches/2.2-stable redmine-2.2
安裝前提軟件:
sudo apt-get install libpq-dev
sudo apt-get install imagemagick
sudo apt-get install libmagickwand-dev
sudo apt-get install gcc g++ build-essential libssl-dev libreadline-dev zlib1g-dev linux-headers-generic libyaml-dev
sudo apt-get install libsqlite3-dev
export RUBYOPT="-KU -E utf-8:utf-8"
安裝:
安裝ruby:
sudo apt-get install curl
sudo apt-get install git-core
sudo apt-get install libssl-dev(否則gem不能使用)
sudo apt-get install libxslt-dev libxml2-dev (不裝bundle install會出錯)
sudo apt-get install libmysql-ruby libmysqlclient-dev(用於mysql)
sudo apt-get install libsqlite3-dev(用於sqlite)
sudo apt-get install zlib1g-dev(否則不能創建工程)
sudo apt-get install nodejs(一定要不然會報ExecJS::RuntimeError in Welcome#index錯誤)
sudo apt-get install g++ (安裝thin,eventmachine之類的時候會用到)
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
source /home/larry/.rvm/scripts/rvm
ruby:
rvm install ruby 1.9.2 or rvm install jruby-1.7.0.preview1
rvm --default use 1.9.2 or rvm --default use jruby
ruby -v
rails:
gem -v
gem update --system
gem update
安裝bunder
gem install bundler
bundle install --without development test
配置mysql
create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine.* to 'redmine'@'localhost';
grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password';
復制 config/database.yml.example to config/database.yml
production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: my_password
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
mkdir tmp tmp/pdf public/plugin_assets
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
ruby script/rails server webrick -e production
查看
http://localhost:3000/.
git使用
“配置”頁面,點擊“版本庫”標簽,SCM的下拉菜單中選擇Git,Path to repository輸入框中輸入Git庫的*本地絕對路徑*。然後點擊保存即可