Archivematica 1.10.2 is a legacy release, and these documents are no longer being maintained.

Installer Archivematica sur CentOS/Red Hat

Archivematica versions 1.5.1 and higher support installation on CentOS/Red Hat.

Sur cette page

Instructions d’installation

  1. Prérequis

    Mettre votre système à jour

    sudo yum -y update
    

    If your environment uses SELinux, at a minimum you will need to run the following commands. Additional configuration may be required for your local setup.

    # Allow Nginx to use ports 81 and 8001
    sudo semanage port -m -t http_port_t -p tcp 81
    sudo semanage port -a -t http_port_t -p tcp 8001
    # Allow Nginx to connect the MySQL server and Gunicorn backends
    sudo setsebool -P httpd_can_network_connect_db=1
    sudo setsebool -P httpd_can_network_connect=1
    # Allow Nginx to change system limits
    sudo setsebool -P httpd_setrlimit 1
    
  2. Certains dépôts doivent être installés afin de pouvoir effectuer l’installation.

    • Dépôts supplémentaires pour enterprise linux :
    sudo yum install -y epel-release
    
    • Elasticsearch (optionnel) :

    Note

    Skip this step if you are planning to run Archivematica without Elasticsearch.

    sudo -u root rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
    sudo -u root bash -c 'cat << EOF > /etc/yum.repos.d/elasticsearch.repo
    [elasticsearch-6.x]
    name=Elasticsearch repository for 6.x packages
    baseurl=https://artifacts.elastic.co/packages/6.x/yum
    gpgcheck=1
    gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
    enabled=1
    autorefresh=1
    type=rpm-md
    EOF'
    
    • Archivematica - use these commands to install the repositories:
    sudo -u root bash -c 'cat << EOF > /etc/yum.repos.d/archivematica.repo
    [archivematica]
    name=archivematica
    baseurl=https://packages.archivematica.org/1.10.x/centos
    gpgcheck=1
    gpgkey=https://packages.archivematica.org/1.10.x/key.asc
    enabled=1
    EOF'
    
    sudo -u root bash -c 'cat << EOF > /etc/yum.repos.d/archivematica-extras.repo
    [archivematica-extras]
    name=archivematica-extras
    baseurl=https://packages.archivematica.org/1.10.x/centos-extras
    gpgcheck=1
    gpgkey=https://packages.archivematica.org/1.10.x/key.asc
    enabled=1
    EOF'
    
  3. Des services communs tels qu’Elasticsearch, MariaDB et Gearmand devraient être installés et activés avant d’installer Archivematica.

    Note

    Do not enable Elasticsearch if you are running Archivematica in indexless mode.

    sudo -u root yum install -y java-1.8.0-openjdk-headless elasticsearch mariadb-server gearmand
    sudo -u root systemctl enable elasticsearch
    sudo -u root systemctl start elasticsearch
    sudo -u root systemctl enable mariadb
    sudo -u root systemctl start mariadb
    sudo -u root systemctl enable gearmand
    sudo -u root systemctl start gearmand
    
  4. Installation du Service de stockage Archivematica

    • Premièrement, installer les dépôts :

      sudo -u root yum install -y python-pip archivematica-storage-service
      
    • Deuxièmement, il faut charger la base de données SQLite et collecter certains fichiers statiques qu’utilise django. Ces tâches doivent être accomplies comme utilisateur « Archivematica ».

      sudo -u archivematica bash -c " \
      set -a -e -x
      source /etc/sysconfig/archivematica-storage-service
      cd /usr/lib/archivematica/storage-service
      /usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py migrate";
      
    • Now enable and start the archivematica-storage-service, rngd (needed for encrypted spaces) and the Nginx frontend:

      sudo -u root systemctl enable archivematica-storage-service
      sudo -u root systemctl start archivematica-storage-service
      sudo -u root systemctl enable nginx
      sudo -u root systemctl start nginx
      sudo -u root systemctl enable rngd
      sudo -u root systemctl start rngd
      

      Note

      Le Service de stockage sera disponible au http://<ip>:8001.

  5. Installation du Tableau de bord Archivematica et du Serveur MCP

    There are a number of environment variables that Archivematica recognizes which can be used to alter how it is configured. For the full list, see the Dashboard install README, the MCPClient install README, and the MCPServer install README.

    • Premièrement, installer les dépôts :

      sudo -u root yum install -y archivematica-common archivematica-mcp-server archivematica-dashboard
      
    • Créer l’utilisateur et la base de données MySQL avec :

      sudo -H -u root mysql -hlocalhost -uroot -e "DROP DATABASE IF EXISTS MCP; CREATE DATABASE MCP CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
      sudo -H -u root mysql -hlocalhost -uroot -e "CREATE USER 'archivematica'@'localhost' IDENTIFIED BY 'demo';"
      sudo -H -u root mysql -hlocalhost -uroot -e "GRANT ALL ON MCP.* TO 'archivematica'@'localhost';"
      
    • Comme utilisateur Archivematica, effectuer les migrations :

      sudo -u archivematica bash -c " \
      set -a -e -x
      source /etc/sysconfig/archivematica-dashboard
      cd /usr/share/archivematica/dashboard
      /usr/share/archivematica/virtualenvs/archivematica-dashboard/bin/python manage.py migrate
      ";
      
    • Lancer et activer les services :

      sudo -u root systemctl enable archivematica-mcp-server
      sudo -u root systemctl start archivematica-mcp-server
      sudo -u root systemctl enable archivematica-dashboard
      sudo -u root systemctl start archivematica-dashboard
      
    • Redémarrer NGINX afin de charger le fichier de configuration du tableau de bord :

      sudo -u root systemctl restart nginx
      

      Note

      Le tableau de bord sera disponible au http://<ip>:81

  6. Installation du client MCP d’Archivematica

    • Install the package:

      sudo -u root yum install -y archivematica-mcp-client
      
    • Le client MCP s’attend à ce que certains programmes suivent des chemins d’accès spécifiques :

      sudo ln -sf /usr/bin/7za /usr/bin/7z
      
    • Tweak ClamAV configuration:

      sudo -u root sed -i 's/^#TCPSocket/TCPSocket/g' /etc/clamd.d/scan.conf
      sudo -u root sed -i 's/^Example//g' /etc/clamd.d/scan.conf
      
    • Indexless mode:

      If you are planning on running Archivematica in indexless mode (i.e., without Elasticsearch), then modify the relevant systemd EnvironmentFile files by adding lines that set the relevant environment variables to false:

      sudo sh -c 'echo "ARCHIVEMATICA_DASHBOARD_DASHBOARD_SEARCH_ENABLED=false" >> /etc/sysconfig/archivematica-dashboard'
      sudo sh -c 'echo "ARCHIVEMATICA_MCPSERVER_MCPSERVER_SEARCH_ENABLED=false" >> /etc/sysconfig/archivematica-mcp-server'
      sudo sh -c 'echo "ARCHIVEMATICA_MCPCLIENT_MCPCLIENT_SEARCH_ENABLED=false" >> /etc/sysconfig/archivematica-mcp-client'
      
    • Ensuite, lancer et activer/réactiver les services

      sudo -u root systemctl enable archivematica-mcp-client
      sudo -u root systemctl start archivematica-mcp-client
      sudo -u root systemctl enable fits-nailgun
      sudo -u root systemctl start fits-nailgun
      sudo -u root systemctl enable clamd@scan
      sudo -u root systemctl start clamd@scan
      sudo -u root systemctl restart archivematica-dashboard
      sudo -u root systemctl restart archivematica-mcp-server
      
  7. Finalisation de l’installation

    Configuration

    Chaque service dispose d’un fichier de configuration dans /etc/sysconfig/archivematica-packagename

    Dépannage

    Si le protocole IPv6 est désactivé, NGINX peut refuser de charger. Si cela se produit, il faut s’assurer que les directives Listen utilisées dans /etc/nginx n’utilisent pas des adresses IPv6 telles que [::]:80.

    CentOS will install firewalld which will be running default rules that will likely be blocking ports 81 and 8001. If you are not able to access the dashboard and Storage Service, then use the following command to check if firewalld is running:

    sudo systemctl status firewalld
    

    If firewalld is running, you will likely need to modify the firewall rules to allow access to ports 81 and 8001 from your location:

    sudo firewall-cmd --add-port=81/tcp --permanent
    sudo firewall-cmd --add-port=8001/tcp --permanent
    sudo firewall-cmd --reload
    
  8. Complete Post Install Configuration.

Configuration post-installation

After successfully completing a new installation, follow these steps to complete the configuration of your new server.

  1. The Storage Service runs as a separate web application from the Archivematica dashboard. The Storage Service is exposed on port 8001 by default when deploying using RPM packages. Use your web browser to navigate to the Storage Service at the IP address of the machine you have been installing on, e.g., http://<MY-IP-ADDR>:8001 (or http://localhost:8001 or http://127.0.0.1:8001 if this is a local development setup).

    If you are using an IP address or fully-qualified domain name instead of localhost, you will need to configure your firewall rules and allow access only to ports 81 and 8001 for Archivematica usage.

  2. The Storage Service has its own set of users. Create a new user with full admin privileges:

    sudo -u archivematica bash -c " \
        set -a -e -x
        source /etc/default/archivematica-storage-service || \
            source /etc/sysconfig/archivematica-storage-service \
                || (echo 'Environment file not found'; exit 1)
        cd /usr/lib/archivematica/storage-service
        /usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py createsuperuser
      ";
    

    After you have created this user, the API key will be generated automatically, and that key will connect the Archivematica pipeline to the Storage Service API. The API key can be found via the web interface (go to Administration > Users).

  3. To finish the installation, use your web browser to navigate to the Archivematica dashboard using the IP address of the machine on which you have been installing, e.g., http://<MY-IP-ADDR>:81 (or http://localhost:81 or http://127.0.0.1:81 if this is a local development setup).

  4. At the Welcome page, create an administrative user for the Archivematica pipeline by entering the organization name, the organization identifier, username, email, and password.

  5. On the next screen, connect your pipeline to the Storage Service by entering the Storage Service URL and username, and by pasting in the API key that you copied in Step (2).

    • If the Storage Service and the Archivematica dashboard are installed on the same machine, then you should supply http://127.0.0.1:8001 as the Storage Service URL at this screen.
    • If the Storage Service and the Archivematica dashboard are installed on different nodes (servers), then you should use the IP address or fully-qualified domain name of your Storage Service instance, e.g., http://<MY-IP-ADDR>:8001 and you must ensure that any firewall rules (i.e., iptables, ufw, AWS security groups, etc.) are configured to allow requests from your dashboard IP to your Storage Service IP on the appropriate port.

Retour en haut de page