0226.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Installing RedMine Project Management Software on Linux</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Home Lab,Home Lab Ideas,Install Guide,Debian,Web Based,Web Based Tools,Linux,MariaDB,MySQL,Self-Hosted,Browser Based,Homelab,Ubuntu,Project Management,Project Management Software,Web Based Project Management,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Installing RedMine Project Management Software on Linux">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="10/28/2023 01:46:22 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Installing RedMine Project Management Software on Linux</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <ol>
  26. <li>Log into the Debian device</li>
  27. <li>Run the following commands in a terminal:
  28. <div class="codeBlock"># update repositories<br />
  29. sudo apt update<br />
  30. # install available software updates<br />
  31. sudo apt upgrade<br />
  32. # install Apache2, Ruby, MySQL/MariaDB and redmine dependencies<br />
  33. sudo apt install ruby-dev apache2 libapache2-mod-passenger mariadb-server build-essential libxslt1-dev libmariadb-dev libxml2-dev zlib1g-dev imagemagick libmagickwand-dev curl<br />
  34. # configure the MySQL database<br />
  35. sudo su<br />
  36. mysql_secure_installation</div>
  37. </li>
  38. <li>Press Enter to login as root</li>
  39. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  40. <li>Type Y and press Enter to remove anonymous users</li>
  41. <li>Type Y and press Enter to disallow root login remotely</li>
  42. <li>Type Y and press Enter to remove the test database</li>
  43. <li>Type Y and press Enter to reload privilege tables</li>
  44. <li>Run the following command to login into MySQL:
  45. <div class="codeBlock">mysql -u root -p</div>
  46. </li>
  47. <li>Authenticate with the root password set earlier</li>
  48. <li>Run the following commands to create the Redmine database and database user
  49. <div class="codeBlock">CREATE DATABASE redmine CHARACTER SET utf8mb4;<br />
  50. GRANT ALL ON redmine.* to &#39;redmine&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;R3dM1n3!!&#39;;<br />
  51. FLUSH PRIVILEGES;<br />
  52. EXIT;<br />
  53. exit</div>
  54. </li>
  55. <li>Continue with the following commands to download and extract Redmine
  56. <div class="codeBlock"># create redmine user<br />
  57. sudo useradd -r -m -d /opt/redmine -s /usr/bin/bash redmine<br />
  58. # add redmine user to www-data group<br />
  59. sudo usermod -aG redmine www-data<br />
  60. # download latest redmine version<br />
  61. sudo wget -O redmine.tar.gz https://www.redmine.org/releases/redmine-4.1.2.tar.gz<br />
  62. # extract redmine.tar.gz<br />
  63. sudo -u redmine tar xzf redmine.tar.gz -C /opt/redmine/ --strip-components=1<br />
  64. # authenticate as the redmine user<br />
  65. sudo su - redmine<br />
  66. # create copies of example configuration files<br />
  67. cp /opt/redmine/config/configuration.yml{.example,}<br />
  68. cp /opt/redmine/public/dispatch.fcgi{.example,}<br />
  69. cp /opt/redmine/config/database.yml{.example,}<br />
  70. # edit database.yml<br />
  71. nano /opt/redmine/config/database.yml</div>
  72. </li>
  73. <li>Update the following values in database.yml
  74. <p>production:<br />
  75. adapter: mysql2<br />
  76. database: redmine<br />
  77. host: localhost<br />
  78. username: redmine<br />
  79. password: &quot;R3dM1n3!!&quot;</p>
  80. </li>
  81. <li>Press CTRL+O, Enter, CTRL+X to write the changes to database.yml</li>
  82. <li>Continue with the following commands
  83. <div class="codeBlock"># exit redmine login<br />
  84. exit<br />
  85. # cd to /opt/redmine<br />
  86. cd /opt/redmine<br />
  87. # install bundler<br />
  88. sudo gem install bundler<br />
  89. # authenticate as the redmine user<br />
  90. sudo su - redmine<br />
  91. # install dependencies<br />
  92. bundle install --without development test --path vendor/bundle<br />
  93. # generate store secret<br />
  94. bundle exec rake generate_secret_token<br />
  95. # create database objects<br />
  96. RAILS_ENV=production bundle exec rake db:migrate<br />
  97. # insert database data<br />
  98. RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data<br />
  99. # reset permissions<br />
  100. chmod -R 755 /opt/redmine<br />
  101. # exit redmine login<br />
  102. exit<br />
  103. # cd to /opt/redmine<br />
  104. cd /opt/redmine<br />
  105. # start the redmine server<br />
  106. sudo bundle exec rails server webrick -e production<br />
  107. # create redmine apache2 conf<br />
  108. sudo nano /etc/apache2/sites-available/redmine.conf</div>
  109. </li>
  110. <li>Paste the following configuration into redmine.conf
  111. <p>Listen 3000<br />
  112. &lt;VirtualHost *:3000&gt;<br />
  113. ServerName redmine.kifarunix-demo.com<br />
  114. RailsEnv production<br />
  115. DocumentRoot /opt/redmine/public</p>
  116. <p>&lt;Directory &quot;/opt/redmine/public&quot;&gt;<br />
  117. Allow from all<br />
  118. Require all granted<br />
  119. &lt;/Directory&gt;</p>
  120. <p>ErrorLog ${APACHE_LOG_DIR}/redmine_error.log<br />
  121. CustomLog ${APACHE_LOG_DIR}/redmine_access.log combined<br />
  122. &lt;/VirtualHost&gt;</p>
  123. </li>
  124. <li>Press CTRL+O, Enter, CTRL+X to write the changes to redmine.conf</li>
  125. <li>Continue with the following commands to enable the site and restart Apache:
  126. <div class="codeBlock"># enable the required Apache modules<br />
  127. sudo a2enmod passenger<br />
  128. # enable redmine site<br />
  129. sudo a2ensite redmine<br />
  130. # restart apache2 service for the changes to take effect<br />
  131. sudo systemctl restart apache2</div>
  132. </li>
  133. <li>Open a web browser and navigate to http://DNSorIP:3000</li>
  134. <li>Log in with the username admin and password admin</li>
  135. <li>Enter the password admin and set and confirm a new password for the admin user</li>
  136. <li>Welcome to Redmine</li>
  137. </ol>
  138. <p>Source: <a href="https://www.redmine.org/projects/redmine/wiki/RedmineInstall" target="_blank">https://www.redmine.org/projects/redmine/wiki/RedmineInstall</a></p> </div>
  139. </div>
  140. </body>
  141. </html>