ubuntu16.4下安装redmine
一、下载redmine源码、解压
二、安装mysql
sudo apt-get install mysql-server
sudo apt isntall mysql-client
sudo apt install libmysqlclient-dev
三、配置数据库
CREATE DATABASE redmine CHARACTER SET utf8mb4;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
四、编辑文件
拷贝 config/database.yml.example 到 config/database.yml ,编辑内容如下:
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: my_password
主要是修改用户名和密码为刚才配置的。
五、安装
gem install bundler
在此之前要安装ruby。
bundle install --without development test
执行这条命令时候报错:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.7.2/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20180509-10638-1bfwoor.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/nokogiri-1.7.2 for
inspection.
Results logged to
/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.7.2/gem_make.out
An error occurred while installing nokogiri (1.7.2), and Bund