Difference between revisions of "Improvements/CentOS-RedHat support/Installation"

From Archivematica
Jump to navigation Jump to search
(Created page with "= Quick install using [https://www.vagrantup.com/ Vagrant] = This method will have you up and running in no time, using a virtual machine provisioned with vagrant. <ul> <li>...")
 
(No difference)

Revision as of 08:59, 31 March 2016

Quick install using Vagrant

This method will have you up and running in no time, using a virtual machine provisioned with vagrant.

  • First, clone the am-packbuild repo:

    git clone https://github.com/artefactual-labs/am-packbuild/
  • cd into the rpm-testing directory

    cd am-packbuild/rpm-testing/
  • run vagrant

    vagrant up

After the install, the Archivematica Dashboard will be avaliable on port 81 of the vagrant deployed box, and the Storage Service, in port 8001.

You can log in the vm over ssh running vagrant ssh

Step by step Install

Prerequisites

Extra repos

Some repositories need to be installed in order to fullfill the instalation procedure:

  • Extra packages for enterprise linux

    yum install -y epel-release
  • Elasticsearch

    sudo -u root rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
    sudo -u root bash -c 'cat << EOF > /etc/yum.repos.d/elasticsearch.repo
    [elasticsearch-1.7]
    name=Elasticsearch repository for 1.7 packages
    baseurl=https://packages.elastic.co/elasticsearch/1.7/centos
    gpgcheck=1
    gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch
    enabled=1
    EOF'
  • Archivematica

    sudo -u root bash -c 'cat << EOF > /etc/yum.repos.d/archivematica.repo
    [archivematica]
    name=archivematica
    baseurl=https://packages.archivematica.org/1.x/centos
    gpgcheck=0
    enabled=1
    EOF'

Service depencencies.

Common services like elasticsearch, mariadb and gearmand should be installed and enabled before the archivematica install. It can be done with:

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

Installing Archivematica Storage Service

  • First, we install the packages:

    sudo -u root yum install -y python-pip archivematica-storage-service
  • After the package is installed, we need to populate the sqlite database, and collect some static files used by django. Those tasks must be run as “archivematica” user.

    sudo -u archivematica bash -c " \
    set -a -e -x
    source /etc/sysconfig/archivematica-storage-service
    cd /usr/share/archivematica/storage-service
    /usr/lib/python2.7/archivematica/storage-service/bin/python manage.py migrate
    /usr/lib/python2.7/archivematica/storage-service/bin/python manage.py collectstatic --noinput
    ";
  • And now, we enable and start the archivematica-storage-service and it’s 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

The storage service will be avaliable at http://<ip>:8001

Installing Archivematica Dashboard and MCP Server

  • First, install the pacakges:

    sudo -u root yum install -y archivematica-common archivematica-mcp-server archivematica-dashboard
  • Create and populate the mysql database with:

    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';"
    sudo -H -u root mysql -hlocalhost -uroot MCP < /usr/share/archivematica/MCPServer/mysql
  • And as archivematica user, run migrations:

    sudo -u archivematica bash -c " \
    set -a -e -x
    source /etc/sysconfig/archivematica-dashboard
    cd /usr/share/archivematica/dashboard
    /usr/lib/python2.7/archivematica/dashboard/bin/python manage.py syncdb --noinput
    ";
    sudo -u root /usr/share/archivematica/MCPServer/mysql_dev.sh MCP
  • Start and enable 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
  • Reload nginx in order to load the dashboard config file:
    sudo -u root systemctl reload nginx

The dashboard will be avaliable at http://ip:81

Installing Archivematica MCP Client

  • First, we need to add some extra repos with the MCP Client dependencies:

  • Nux multimedia repo

        rpm -Uvh https://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
  • Forensic tools repo

        rpm -Uvh https://forensics.cert.org/cert-forensics-tools-release-el7.rpm
  • Then, install the package:

    sudo -u root yum install -y archivematica-mcp-client
  • The MCP Client expect some programs in certain paths, so we put things in place:

    sudo cp /usr/bin/clamscan /usr/bin/clamdscan
    sudo ln -s /usr/bin/7za /usr/bin/7z
  • After that, we can enable and start 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

Configuration

Each service have a configuration file in /etc/sysconfig/archivematica-packagename

Known bugs / Caveats

  • If IPv6 is disabled, Nginx may refuse to start. If that is the case make sure that the listen directives used under /etc/nginx are not using IPv6 addresses like [::]:80.
  • If you find a bug, please let us know here