Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Install and Configure Redmine on Linux

Redmine is an open-source project management and issue-tracking tool that is widely used in software development and IT environments. It is highly customizable and supports multiple projects, wikis, forums, time tracking, and more. Redmine is particularly beneficial for teams using Agile methodologies, as it integrates well with version control systems like Git and Subversion.

In this article, we will explore how to install and configure Redmine on a Linux server. The steps provided are tailored for a Debian-based distribution (like Ubuntu), but can be adapted for other distributions with minor adjustments.

Examples:

  1. Install Dependencies

    First, update your package list and install the necessary dependencies:

    sudo apt update
    sudo apt install -y build-essential libmysqlclient-dev libmagickwand-dev imagemagick libssl-dev libreadline-dev zlib1g-dev
  2. Install Ruby

    Redmine is a Ruby on Rails application, so you need to install Ruby. You can use RVM (Ruby Version Manager) to manage Ruby versions:

    sudo apt install -y curl gpg
    curl -sSL https://get.rvm.io | bash -s stable
    source ~/.rvm/scripts/rvm
    rvm install 2.7.2
    rvm use 2.7.2 --default
  3. Install Rails

    Install Rails using the gem package manager:

    gem install rails -v 6.0.3.4
  4. Install and Configure MySQL

    Redmine uses a database to store its data. Install MySQL server and create a database for Redmine:

    sudo apt install -y mysql-server
    sudo mysql_secure_installation
    sudo mysql -u root -p

    Inside the MySQL shell, create a database and user for Redmine:

    CREATE DATABASE redmine CHARACTER SET utf8mb4;
    CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'your_password';
    GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
    FLUSH PRIVILEGES;
    EXIT;
  5. Download and Configure Redmine

    Download the latest stable version of Redmine:

    cd /opt
    sudo wget http://www.redmine.org/releases/redmine-4.1.1.tar.gz
    sudo tar -xzf redmine-4.1.1.tar.gz
    sudo mv redmine-4.1.1 redmine
    cd redmine

    Copy the example configuration files:

    sudo cp config/database.yml.example config/database.yml
    sudo cp config/configuration.yml.example config/configuration.yml

    Edit the config/database.yml file to include your MySQL database details:

    production:
     adapter: mysql2
     database: redmine
     host: localhost
     username: redmine
     password: "your_password"
     encoding: utf8mb4
  6. Install Bundler and Required Gems

    Install Bundler and the required gems:

    gem install bundler
    bundle install --without development test
  7. Generate Secret Token and Migrate Database

    Generate a secret token for session management and migrate the database:

    bundle exec rake generate_secret_token
    RAILS_ENV=production bundle exec rake db:migrate
    RAILS_ENV=production bundle exec rake redmine:load_default_data
  8. Set Up File Permissions

    Ensure that the Redmine directory has the correct permissions:

    sudo chown -R www-data:www-data /opt/redmine
    sudo chmod -R 755 /opt/redmine
  9. Configure Apache with Passenger

    Install Passenger and configure Apache to serve the Redmine application:

    sudo apt install -y libapache2-mod-passenger
    sudo a2enmod passenger

    Create a new virtual host configuration for Redmine:

    sudo nano /etc/apache2/sites-available/redmine.conf

    Add the following content:

    <VirtualHost *:80>
     ServerName your_domain_or_IP
     DocumentRoot /opt/redmine/public
     <Directory /opt/redmine/public>
       Require all granted
       Options -MultiViews
     </Directory>
    </VirtualHost>

    Enable the site and restart Apache:

    sudo a2ensite redmine.conf
    sudo systemctl restart apache2
  10. Access Redmine

    Open your web browser and navigate to http://your_domain_or_IP. You should see the Redmine login page. The default login credentials are:

    • Username: admin
    • Password: admin

    Make sure to change the default password after logging in.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.