Soluții

How to Install Redmine Project Management Software on Debian 11

Redmine is a free and open-source project management software and issue-tracking tool. It is written using the Ruby on Rails framework and can be integrated with various version control systems. It includes a repository browser and a diff viewer. It can be used to manage projects’ features per project wikis and forums, time tracking, and role-based access control.

Before we start your system must have these packages:

$ sudo apt install wget curl nano software-properties-common dirmngr apt-transport-https gnupg2 ca-certificates lsb-release unzip debian-archive-keyring -y
And ake sure everything is updated.
$ sudo apt update && sudo apt upgrade
Step 1 – Configure Firewall

The first step before installing any packages is to configure the firewall to allow HTTP and HTTPS connections. Check the status of the firewall.

$ sudo ufw status

You should see something like the following.

Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)

Allow HTTP and HTTPs ports. Also, open port 3000 for Redmine.

$ sudo ufw allow http
$ sudo ufw allow https
$ sudo ufw allow 3000

Check the status again to confirm.

$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere                  
80/tcp                     ALLOW       Anywhere                  
443                        ALLOW       Anywhere                  
3000                       ALLOW       Anywhere                  
OpenSSH (v6)               ALLOW       Anywhere (v6)             
80/tcp (v6)                ALLOW       Anywhere (v6)             
443 (v6)                   ALLOW       Anywhere (v6)             
3000 (v6)                  ALLOW       Anywhere (v6)

Step 2 – Install Apache Server

We will use the Apache webserver to deploy Redmine. Install Apache using the following command.

$ sudo apt install apache2

Check the status of the Apache service.

Step 3 – Install and Configure MySQL Server

We will use the MySQL database to store the data. Debian doesn’t have MySQL anymore in its repositories. So we will be using the official MySQL repository for installation.

Import MySQL GPG key.

$ curl https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --dearmor | sudo tee /usr/share/keyrings/mysql.gpg >/dev/null

Create a MySQL repository file.

$ echo "deb [signed-by=/usr/share/keyrings/mysql.gpg arch=amd64] http://repo.mysql.com/apt/debian/ `lsb_release -cs` mysql-8.0" | sudo tee /etc/apt/sources.list.d/mysql.list

Update the system repository list.

$ sudo apt update

Install MySQL.

$ sudo apt install mysql-server

You will be prompted to set a root password. Choose a strong password. Next, you will be prompted to choose between the newer MySQL caching_sha2_password encryption or the older mysql_native_password encryption. Choose the newer one because Redmine supports it. Select OK to proceed and complete the installation.

Secure MySQL installation.

$ sudo mysql_secure_installation

First, you will be asked for the root password. Enter the password you chose during the installation. Next, you will be asked if you want to set up the Validate Password Plugin, which you can use to test the strength of your MySQL password. Choose Y to proceed. You will be asked to choose the password validation level in the next step. Choose 2 which is the strongest level and will require your password to be at least eight characters long and include a mix of uppercase, lowercase, numeric and special characters.

Securing the MySQL server deployment.

Enter password for user root:

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No: Y

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary          file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2

You will be shown the strength of your root password and will be asked if you want to change it. Enter N if you don’t want to change and proceed further. If you wish to change it, you can do it now by entering Y and choosing a password satisfying the requirements above.

Using existing password for root.

Estimated strength of the password: 100 
Change the password for root ? ((Press y|Y for Yes, any other key for No) : N

 ... skipping.

Press Y and then ENTER key for all the following prompts to remove anonymous users and the test database, disable root logins and load the newly set rules.

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y Success. Normally, root should only be allowed to connect from ‘localhost’. This ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y Success. By default, MySQL comes with a database named ‘test’ that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y – Dropping test database… Success. – Removing privileges on test database… Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y Success.

Enter the MySQL shell. Enter your root password to continue.

$ mysql -u root -p

Create redmine user. Make sure the password meets the requirements set before.

mysql> CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'Your_password2';

Create redmine database.

mysql> CREATE DATABASE redmine CHARACTER SET utf8mb4;

Grant the user privileges to the redmine database.

mysql> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

Exit the Shell.

mysql> exit
Step 4 – Install Ruby and other requisites

Redmine’s latest version is compatible with Ruby 3.1. Debian ships with Ruby 2.7 so we will need to install the latest version using Ruby Version Manager (RVM).

Install RVM’s GPG key.

$ gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

Install RVM.

$ \curl -sSL https://get.rvm.io | bash -s stable

Source the RVM scripts.

$ source ~/.rvm/scripts/rvm

Install Ruby. You can check the latest version from the Ruby website.

Install all the remaining packages required by Redmine.

$ sudo apt install libxml2-dev libxslt1-dev zlib1g-dev imagemagick libmagickwand-dev libmysqlclient-dev apache2-dev build-essential libcurl4-openssl-dev

Visit the Redmine downloads page and check the latest stable version available. At the time of writing this tutorial, the latest available version is 5.0.5.

Use wget to download Redmine.

$ wget https://www.redmine.org/releases/redmine-5.0.5.tar.gz

You might get the following error while downloading the archive because one of the root certificates on the website has expired.

WARNING: The certificate of ‘www.redmine.org’ is not trusted.
WARNING: The certificate of ‘www.redmine.org’ doesn't have a known issuer.
WARNING: The certificate of ‘www.redmine.org’ has expired.

If you get this error, run the following command instead to download.

$ wget https://www.redmine.org/releases/redmine-5.0.5.tar.gz --no-check-certificate

Extract and move the files to the /var/www/redmine directory.

$ tar xfz redmine-5.0.5.tar.gz
$ sudo mv redmine-5.0.5 /var/www/redmine

Shift to the /var/www/redmine directory.

$ cd /var/www/redmine

You will get the following output and a warning about the Ruby version. You can safely ignore that.

RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /var/www/redmine/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.

Unknown ruby interpreter version (do not know how to handle): >=2.5.0,<3.2.0.

Create Redmine configuration files by using the supplied example files.

$ cp config/configuration.yml.example config/configuration.yml
$ cp config/database.yml.example config/database.yml
$ cp public/dispatch.fcgi.example public/dispatch.fcgi

Open the database.yml file for editing.

$ nano config/database.yml

Find and configure your database settings under the following section.

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "Your_password2"
  # Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
  encoding: utf8mb4

Save the file by pressing Ctrl + X and entering Y when prompted.

Install bundler for managing ruby gem dependencies.

$ gem install bundler

Set the environment for installing gem dependencies.

$ bundle config set --local without 'development test'

Install the gem dependencies.

$ bundle install

If you face any issues with gem versions, use the following command to restore.

$ gem pristine --all

Add webrick dependency.

$ bundle add webrick

Generate a random secret key to prevent tampering with the cookies for storing session data.

$ bundle exec rake generate_secret_token

Create the database structure.

$ RAILS_ENV=production bundle exec rake db:migrate

Insert the data into the MySQL database.

$ RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data

Create necessary directories and set file permissions.

$ mkdir -p tmp/pdf
$ mkdir -p public/plugin_assets
$ chown -R $USER:$USER files log tmp public/plugin_assets
$ chmod -R 755 /var/www/redmine/

Run the following command to start a Rails server instance.

$ bundle exec rails server -u webrick -e production

Open the URL http://<yourserverIP>:3000/login to obtain the Redmine Login screen.

Enter the default credentials (admin/admin) to log in. You will be asked to change the password. Next, you will be redirected to the My Account page. Redmine has been installed successfully.

[mai mult...]

The System Could not Find the Environment Option: error

Ce înseamnă eroarea: The System Could not Find the Environment Option

Indică de obicei că o comandă sau un program încearcă să facă referire la o variabilă de mediu care nu există sau nu poate fi găsită. Acest mesaj de eroare poate avea diverse cauze, inclusiv:

  • Erori tipografice – greșelile de ortografie  sau scrierea greșită a variabilelor de mediu într-o comandă sau script poate cauza această eroare.
  • Variabile de mediu lipsă  – Acest mesaj de eroare poate apărea dacă variabila de mediu la care se face referire nu este definită.
  • Fișiere de sistem corupte  – Fișierele de sistem asociate cu variabilele de mediu pot fi deteriorate sau corupte, provocând apariția acestui mesaj de eroare.
  • Erori de registry  – Erorile din registrul de sistem pot duce la ștergerea sau configurarea greșită a variabilelor de mediu, ceea ce duce la acest mesaj de eroare.
  • Infecții cu programe malware sau viruși  – Programele malware sau virușii pot deteriora fișierele de sistem și pot provoca acest mesaj de eroare.
  • Configurații incorecte ale sistemului  – Dacă sistemul nu este configurat corect sau are un conflict între diferite setări ale sistemului, poate apărea acest mesaj de eroare.

Este important să rețineți că acest mesaj de eroare poate apărea în diverse contexte, inclusiv atunci când rulați programe sau scripturi, instalați software sau modificați setările sistemului. Cauza specifică a erorii va depinde de contextul în care apare.

Cum pot remedia sistemul nu a putut găsi eroarea de mediu?

1. Scanați computerul pentru viruși

  1. Introduceți  Windows Security  în  bara de căutare și faceți click pe rezultatul de căutare relevant.
  2. Acum, faceți click pe  Virus & threat protection
  3. Faceți click pe  Scan Options
  4. Acum, selectați  Full Scan și faceți click pe  butonul Scan Now din partea de jos.
2. Instalați Visual C++ Redistributables
  1. Apăsați WindowsR, tastați appwiz.cpl și apăsați Enter
  2. Faceți clic pe versiunea dvs. Visual C++ Redistributables și selectați Uninstall
  3. descărcați un nou Visual C++ Redistributable și instalați-l.

Multe aplicații necesită Visual C++ Redistributable pentru a rula corect, iar dacă această componentă lipsește, este posibil să întâmpinați mesajul Sistemul nu a putut găsi opțiunea de mediu care a fost introdusă.

[mai mult...]

Gpedit.msc nu a fost găsit pe Windows 10

1. Verificați versiunea de Windows
  1. Apăsați tastele WinR pentru a deschide meniul Run
  2. Tastați winver și apăsați Enter
  3. Se va deschide o nouă casetă About Windows și veți vedea detaliile acolo.Rețineți că, dacă rulați versiunea Windows 10 Home, Editorul de politici de grup nu apare în acesta. Acesta este motivul pentru care v-am sfătuit să verificați versiunea sistemului de operare Windows pe care o executați, deoarece aceasta va elimina orice confuzie cu privire la motivul pentru care obțineți eroarea Windows nu poate găsi gpedit.msc.
2. Remediați fișierele de sistem corupte
  1. Deschideți meniul Start apăsând Wintasta
  2. Deschideți command prompt ca administrator
  3. Tastați comanda de mai jos și apăsați Enter

sfc /scannow

4.Așteptați ca instrumentul să repare fișierele de sistem corupte

      5. Reporniți computerul.

Remedierea fișierelor corupte a ajutat mai mulți utilizatori să rezolve eroarea Windows nu poate găsi gpedit.msc pe computerele lor Windows 10.

3. Copiați fișierele gpedit
  1. Apăsați WinEpentru a deschide File Explorer
  2. Navigați la această cale C:\Windows\SysWOW64
  3. Găsiți GroupPolicy , GroupPolicyUsers și, respectiv, gpedit.msc
  4. Copy aceste foldere
  5. Accesați C:\Windows\System32
  6. Paste articolele aici.
[mai mult...]

Backup Windows a eșuat codul de eroare 0x8078011e

1. Dezinstalați software-ul antivirus 

  1. Apăsați tasta Windows + X și alegeți Aplicații și funcții
  2. Găsiți software-ul antivirus și faceți clic pe Uninstall
  3. Urmați instrucțiunile de pe ecran pentru a-l elimina

2. Eliminați software-ul Armory Crate

  1. Vizitați pagina de descărcare Armory Crate. Apoi, selectați versiunea dvs. de Windows
  2. Găsiți Instrumentul de dezinstalare Armory Crate și faceți click pe butonul Download
  3. Așteptați descărcarea software-ului
  4. După ce este descărcat, porniți-l și urmați instrucțiunile de pe ecran pentru a finaliza procesul de dezinstalare.

3. Efectuați o pornire curată

  1. Apăsați CtrlShiftEsc pentru a deschide Managerul de activități
  2. Navigați la fila Startup și disable toate aplicațiile. Puteți face acest lucru făcând click dreapta pe aplicație și alegând Disable din meniu
  3. După ce ați terminat, apăsați tasta Windows + R și introduceți msconfig. Faceți click pe OK
  4. Accesați fila Services. Bifați Hide all microsoft services. Acum faceți click pe Disable all
  5. Faceți click pe Apply și OK. Când vi se oferă să reporniți computerul, alegeți opțiunea de repornire.

După repornirea computerului, încercați să efectuați din nou copierea de rezervă. Dacă funcționează, activați din nou serviciile și aplicațiile urmând aceiași pași.

[mai mult...]