How to Install Access to Memory (AtoM) on Arch Linux
Access to Memory (AtoM) is a free, open-source software application that provides an easy-to-use and customizable platform for managing archival, cultural and historical collections. In this tutorial, we will install AtoM on an Arch Linux system.
Before we start, ensure that your system is up-to-date:
sudo pacman -Syu
Prerequisites
- Apache web server
- PHP 7.1 or higher
- PostgreSQL 9.5 or higher
- Git
- Composer
- Node.js and npm
The next step is to install all these prerequisites, if they are not already installed.
sudo pacman -S apache php postgresql git composer nodejs npm
Now, let's create a database and a user for AtoM.
sudo -u postgres psql
postgres=# CREATE USER atom WITH PASSWORD 'password';
postgres=# CREATE DATABASE atom;
postgres=# GRANT ALL PRIVILEGES ON DATABASE atom TO atom;
postgres=# \q
Install and Configure AtoM
- Clone the AtoM repository from GitHub:
git clone https://github.com/artefactual/atom.git
- Switch to the AtoM directory:
cd atom
- Install Composer dependencies:
composer install --no-dev
- Install Node.js dependencies:
npm install
- Build the frontend assets:
npm run build
- Copy the
.env.examplefile to.env:
cp .env.example .env
- Edit the
.envfile and set the following environment variables:
APP_ENV=production
APP_DEBUG=false
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=atom
DB_USERNAME=atom
DB_PASSWORD=password
- Generate a new app key for security:
php artisan key:generate
- Run database migrations:
php artisan migrate
- Create a new admin user:
php artisan atom:make-admin
- Start the built-in web server:
php artisan serve
Configure Apache
To run AtoM on the Apache web server, create a new virtual host configuration file /etc/httpd/conf/extra/atom.conf, and add the following content:
<VirtualHost *:80>
ServerName your-domain.com
DocumentRoot /path/to/atom/public
<Directory /path/to/atom/public>
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/httpd/atom_error.log
CustomLog /var/log/httpd/atom_access.log combined
</VirtualHost>
Replace your-domain.com with your own domain name, and /path/to/atom with the path to your AtoM installation directory.
Enable the newly created virtual host and restart the Apache service:
sudo ln -s /etc/httpd/conf/extra/atom.conf /etc/httpd/conf/available/
sudo systemctl restart httpd
Conclusion
In this tutorial, we have successfully installed Access to Memory (AtoM) on an Arch Linux system, and configured a new virtual host in Apache web server. You can now access AtoM on your web browser by visiting http://your-domain.com.