Home
home
🏡 홈
home

Ubuntu Redmine5 Install

분류
개발지식
태그
Server
Web
Linux
작성자
작성일
2025/04/07 00:03
우분투 22.04에서는 공식 저장소에서 Redmine 패키지를 제공하지 않기 때문에 수동으로 설치해야 합니다.

Redmine + Apache + MariaDB 수동 설치 방법

아래 방법으로 진행하면 문제 없이 Redmine을 사용할 수 있습니다.

1. 필수 패키지 설치

sudo apt update && sudo apt upgrade -y
Bash
복사
sudo apt install -y git curl dirmngr ca-certificates apt-transport-https software-properties-common imagemagick libmagickwand-dev libmariadb-dev mariadb-server mariadb-client \ apache2 apache2-dev libapache2-mod-passenger \ ruby ruby-dev bundler build-essential
Bash
복사

2. MariaDB 설정

sudo mysql_secure_installation
Bash
복사
데이터베이스 생성 및 사용자 추가:
sudo mysql -u root -p
Bash
복사
USE mysql; CREATE DATABASE redmine CHARACTER SET utf8mb4; CREATE USER 'redmine'@'localhost' IDENTIFIED BY '비밀번호'; GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost'; FLUSH PRIVILEGES; EXIT;
SQL
복사

3. Redmine 설치

Redmine을 /home/jun/project/project.beomjunpark.com/에 설치할 겁니다.
cd /home/jun/project git clone https://github.com/redmine/redmine.git project.beomjunpark.com cd project.beomjunpark.com git checkout 5.1-stable
Bash
복사

4. Redmine 설정

데이터베이스 설정 (database.yml 수정)

cp config/database.yml.example config/database.yml vi config/database.yml
Bash
복사
아래 내용 수정:
production: adapter: mysql2 database: redmine host: localhost username: redmine password: "비밀번호" encoding: utf8mb4
YAML
복사

5. Ruby 종속성 설치

bundle install --without development test
Bash
복사
에러 발생 시
sudo gem install bundler bundle install --without development test bundle exec rake generate_secret_token
Bash
복사

6. 데이터베이스 마이그레이션

RAILS_ENV=production bundle exec rake db:migrate RAILS_ENV=production bundle exec rake redmine:load_default_data RAILS_ENV=production bundle exec rake assets:precompile
Bash
복사

7. Passenger(Apache) 설정

Apache 설정 파일 추가

sudo vi /etc/apache2/sites-available/project.beomjunpark.com.conf
Bash
복사
내용 추가:
<VirtualHost *:80> ServerName project.beomjunpark.com ServerAdmin qjawns0629@gmail.com DocumentRoot /home/jun/project/project.beomjunpark.com/public RailsEnv production <Directory "/home/jun/project/project.beomjunpark.com/public"> Require all granted Options -MultiViews PassengerEnabled on </Directory> ErrorLog "/var/log/apache2/project.beomjunpark.com-error.log" CustomLog "/var/log/apache2/project.beomjunpark.com-access.log" common </VirtualHost>
Shell
복사

8. Apache 설정 적용

sudo a2enmod passenger sudo a2ensite project.beomjunpark.com sudo apachectl configte sudo systemctl restart apache2
Bash
복사