安装mysql sudo apt-get install mysql-server #### 配置mysql CREATE DATABASE redmine CHARACTER SET utf8; CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost'; 下载Redmine 2.4.2代码 wget http://www.redmine.org/releases/redmine-2.4.2.tar.gz tar zxvf redmine-2.4.2.tar.gz 安装ruby1.9.3 sudo apt-get install ruby1.9.3 配置数据库 cd config cp database.yml.example database.yml 编辑database.yml production: adapter: mysql2 database: redmine host: localhost username: redmine password: "your_pwd" encoding: utf8 redmine-2.4.2目录下执行命令安装gem的依赖项 gem install bundler 安装redmine依赖项 sudo apt-get install mysql-client sudo apt-get install libmysqlclient-dev sudo gem install mysql2 -v '0.3.16' sudo apt-get install libmagickcore-dev libmagickwand-dev bundle install --without development test 后安装 rake generate_secret_token RAILS_ENV=production rake db:migrate RAILS_ENV=production rake redmine:load_default_data mkdir -p tmp tmp/pdf public/plugin_assets chown -R 777 files log tmp public/plugin_assets chmod -R 755 files log tmp public/plugin_assets 启动 sudo ruby script/rails server webrick -e production > /dev/null 2>&1 & 后记 在安装redmine依赖项时候,我才知道为什么需要有docker这种东西 内网mysql root的密码是droidhang