How to Install Access to Memory (AtoM) on FreeBSD Latest

Access to Memory (AtoM) is an open-source web-based application that is used to organize and publish archival description and digital archival objects. In this tutorial, we will go through the steps on how to install AtoM on FreeBSD Latest.

Prerequisites:

Step 1: Installation of Required Packages

Before we can begin the installation process, we need to make sure that all the required packages are installed on the system. To do this, open a terminal and run the following command:

sudo pkg install -y apache24 php74 php74-mysqli php74-xml php74-mbstring php74-gd php74-curl php74-zip mariadb104-server mariadb104-client

Step 2: Configure Apache Web Server

After the installation of all the required packages, we need to configure our Apache web server. The following steps will guide you through the configuration process:

  1. Enable and start the web server service:

    sudo sysrc apache24_enable="YES"
    sudo service apache24 start
    
  2. Create a new virtual host configuration file:

    sudo nano /usr/local/etc/apache24/Includes/atom.conf
    

    Add the following lines to the atom.conf file:

    <VirtualHost *:80>
            ServerAdmin admin@example.com
            DocumentRoot "/usr/local/www/atom"
            ServerName atom.example.com
            <Directory "/usr/local/www/atom">
                    Options Indexes FollowSymLinks
                    AllowOverride All
                    Require all granted
            </Directory>
            ErrorLog "/var/log/httpd-atom-error.log"
            CustomLog "/var/log/httpd-atom-access.log" combined
    </VirtualHost>
    

    Save and exit the file.

  3. Restart the Apache web server for the changes to take effect:

    sudo service apache24 restart
    

Step 3: Install Access to Memory

  1. Download the latest version of AtoM from the official website:

    sudo fetch "https://www.accesstomemory.org/download/" -o atom.tar.gz
    
  2. Extract the downloaded file:

    sudo tar -xzvf atom.tar.gz -C /usr/local/www/
    
  3. Change the ownership of the AtoM directory to the Apache user:

    sudo chown -R www:www /usr/local/www/atom/
    

Step 4: Configure MariaDB Database Server

  1. Enable and start the MariaDB service:

    sudo sysrc mysql_enable="YES"
    sudo service mysql-server start
    
  2. Secure the MariaDB installation by running the following command:

    sudo mysql_secure_installation
    

    Follow the on-screen prompts to set the root password and remove anonymous user accounts, among other security measures.

  3. Create a new database for AtoM:

    sudo mysql -u root -p
    CREATE DATABASE atom;
    GRANT ALL PRIVILEGES ON atom.* TO 'atom_user'@'localhost' IDENTIFIED BY 'password';
    FLUSH PRIVILEGES;
    exit;
    

    Replace password with a strong, unique password of your choice.

Step 5: Configure AtoM Settings

  1. Copy the default configuration file for AtoM:

    sudo cp /usr/local/www/atom/atom/Configuration.example.php /usr/local/www/atom/atom/Configuration.php
    
  2. Edit the Configuration.php file using your preferred editor:

    sudo nano /usr/local/www/atom/atom/Configuration.php
    
  3. Update the following lines in the file:

    const APP_NAME = 'My AtoM';
    const APP_INST_NAME = 'My AtoM';
    
    $this->databaseInfo = array(
            'adapter' => 'mysqli',
            'params' => array(
                    'host' => 'localhost',
                    'port' => '3306',
                    'username' => 'atom_user',
                    'password' => 'password',
                    'dbname' => 'atom',
                    'charset' => 'utf8'
            )
    );
    
    $this->baseUrl = 'http://atom.example.com/';
    $this->timeZone = 'Pacific/Auckland';
    

    Replace My AtoM with the desired name for your instance, and replace http://atom.example.com/ with the URL of your instance.

    Replace username and password with the database user credentials that you set up in the previous step.

    Save and exit the file.

Step 6: Complete the Installation

Now that everything has been set up and configured, we can complete the installation by running the AtoM installer script:

sudo php /usr/local/www/atom/atom/scripts/atomInstall.php

Follow the on-screen prompts to complete the installation.

Conclusion

In this tutorial, we have gone through the process of installing Access to Memory (AtoM) on FreeBSD Latest. After completing this tutorial, you should have a working instance of AtoM that can be used to organize and publish archival description and digital archival objects.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!