맥북에 레드마인을 설치하는 방법을 정리하였습니다. 데이터베이스는 Sqlite3를 사용하는 것으로 가정하고 방법을 나열하였습니다. 홈브루를 사용하여 먼저 루비를 설치하고, sqlite를 설치한 후 레드마인인 다운로드하여 설치합니다. How to install Redmine with SQLite3 on a Mac with an M3 chip
1. Install Homebrew (if not installed)
Homebrew is a package manager for macOS that simplifies the installation of software.
Open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. Install Ruby
Redmine requires Ruby. You can use rbenv
to manage Ruby versions easily.
Install rbenv
and ruby-build
using Homebrew:
brew install rbenv ruby-build
Initialize rbenv
in your shell:
rbenv init
Install a compatible version of Ruby (Redmine 5.x requires Ruby 2.7+):
rbenv install 3.0.0
rbenv global 3.0.0
Verify the Ruby installation:
ruby -v
3. Install SQLite3
SQLite3 is usually pre-installed on macOS, but if not, you can install it via Homebrew:
brew install sqlite3
4. Install Bundler
Bundler is a dependency manager for Ruby projects.
Install it with:
gem install bundler
5. Download and Configure Redmine
Download Redmine from the official website or using git:
git clone https://github.com/redmine/redmine.git
cd redmine
Check out a stable branch, e.g., 5.0-stable
:
git checkout 5.0-stable
6. Configure Redmine to Use SQLite3
Copy the example configuration file:
cp config/database.yml.example config/database.yml
Edit the config/database.yml
file to use SQLite3:
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
7. Install Dependencies
Install the required gems using Bundler:
bundle install --without development test
8. Generate Secret Token
Redmine requires a secret token for session management. Generate it using:
bundle exec rake generate_secret_token
9. Set Up the Database
Create the database structure:
RAILS_ENV=production bundle exec rake db:migrate
10. Start the Redmine Server
You can now start Redmine using the built-in WEBrick server:
bundle exec rails server -e production
By default, the server will run on http://localhost:3000
.
11. Access Redmine
Open a web browser and go to http://localhost:3000
. You should see the Redmine welcome page.
12. Optional: Running Redmine as a Service
For production environments, consider running Redmine with a more robust web server like Puma or Passenger and setting up a reverse proxy with Nginx or Apache.
Troubleshooting
- If you run into issues with permissions, ensure that the Redmine directory and its contents are accessible by the user running the server.
- If there are issues with gems, running
bundle install
again or clearing the gem cache might help.
This guide assumes a fresh setup; adjust steps if you're integrating into an existing environment.