Skip to content

Instantly share code, notes, and snippets.

@ykubota
Created June 18, 2013 07:12
Show Gist options
  • Save ykubota/5803260 to your computer and use it in GitHub Desktop.
Save ykubota/5803260 to your computer and use it in GitHub Desktop.
Setup MySQL@Fedora18 for redmine
#sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel
sudo yum install -y mysql mysql-server
sudo vim /etc/my.cnf
---
# nihongo mojibake taisaku
character-set-server = utf8
---
# Fedora 1-15, CentOS 4-6
/etc/rc.d/init.d/mysqld start
# OS起動時にMySQLを起動する
chkconfig mysqld on
# Fedora 16-
systemctl start mysqld.service
# OS起動時にMySQLを起動する
systemctl enable mysqld.service
# create user & databases for redmine
mysql -u root
create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine.* to 'redmine'@'localhost';
# config
cp config/database.yml.example config/database.yml
vim config/database.yml
-----
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "redmine"
-----
# install mysql2 for adapter
sudo yum install -y mysql-devel
gem install mysql2 -v '0.3.11'
# setup for redmine
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
ruby script/rails server webrick -e production
# If error about "Ruby Gem LoadError mysql2/mysql2 required" occured, see belows
# http://stackoverflow.com/questions/6737535/rake-dbmigrate-giving-error-for-mysql2
# http://railsforum.com/viewtopic.php?id=50501
@seealso
http://redmine.jp/guide/RedmineInstall/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment