Redmine Setup on Linux, #레드마인 설치와 셋업
[Official]
- Redmine Download Link
- Redmine How-To-Install Link
Step 1: Update Your System
First, ensure that your system is up-to-date by running:
sudo apt update
sudo apt upgrade
Step 2: Install Dependencies
Redmine requires several packages to run, including Ruby, Rails, and a database server. Install the required packages using:
sudo apt install build-essential libssl-dev libreadline-dev zlib1g-dev
sudo apt install curl git-core libmysqlclient-dev imagemagick libmagickwand-dev
sudo apt install apache2 libapache2-mod-passenger
Step 3: Install Ruby
You can use a version manager like RVM (Ruby Version Manager) to install Ruby:
\curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 3.0.0
rvm use 3.0.0 --default
Step 4: Install Rails
Install Rails using the gem command:
gem install rails -v 6.1.3
Step 5: Install the Database Server
Redmine supports MySQL, PostgreSQL, and SQLite. Here, we'll use MySQL:
sudo apt install mysql-server mysql-client
Step 6: Configure MySQL
Log in to the MySQL server and create a database and user for Redmine:
sudo mysql -u root -p
Inside the MySQL prompt, run:
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 7: Download Redmine
Download the latest stable version of Redmine:
cd /opt
sudo git clone https://github.com/redmine/redmine.git
cd redmine
sudo git checkout 4.2-stable
Step 8: Configure Redmine
Copy the example configuration files:
cp config/configuration.yml.example config/configuration.yml
cp config/database.yml.example config/database.yml
Edit the config/database.yml
file to match your MySQL settings:
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "your_password"
encoding: utf8mb4
Step 9: Install Gems
Install the required gems using Bundler:
gem install bundler
bundle install --without development test
Step 10: Generate Secret Token
Generate the secret token for your installation:
bundle exec rake generate_secret_token
Step 11: Migrate the Database
Run the database migrations to set up the database schema:
RAILS_ENV=production bundle exec rake db:migrate
Step 12: Precompile Assets
Precompile the assets for production:
RAILS_ENV=production bundle exec rake assets:precompile
Step 13: Set Up Permissions
Ensure the Redmine directories have the correct permissions:
sudo chown -R www-data:www-data files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
Step 14: Configure Apache
Create a new Apache configuration file for Redmine:
sudo nano /etc/apache2/sites-available/redmine.conf
Add the following content:
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName example.com
DocumentRoot /opt/redmine/public
<Directory /opt/redmine/public>
Require all granted
Options -MultiViews
</Directory>
ErrorLog ${APACHE_LOG_DIR}/redmine_error.log
CustomLog ${APACHE_LOG_DIR}/redmine_access.log combined
</VirtualHost>
sudo a2ensite redmine
sudo a2enmod passenger
sudo systemctl restart apache2
Step 15: Access Redmine
Open your web browser and navigate to http://your_server_ip/
.
You should see the Redmine login page. The default login credentials are:
- Username:
admin
- Password:
admin
Final Step: Secure Your Installation
For a production environment, consider using HTTPS and further securing your installation.
https://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_50x_on_Ubuntu_2004_with_Apache2