How to Install Omeka S on Debian Latest

Omeka S is a free and open-source web platform used by museums, libraries, and cultural institutions to build digital repositories and exhibit their collections. Here is a step-by-step guide to installing Omeka S on Debian Latest.

Prerequisites

Before we proceed with the installation, it's important to make sure that your Debian latest system has the necessary packages installed. You'll need:

Step 1: Install PHP Extensions

Omeka S requires the mbstring and intl PHP extensions to be installed. Run the following commands to install them:

sudo apt update
sudo apt install php-mbstring php-intl

Step 2: Install Composer

Composer is a dependency management tool for PHP. Install it using the following commands:

cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Verify that Composer is installed by running:

composer --version

Step 3: Download Omeka S

Visit the Omeka S download page (https://omeka.org/s/download/) and get the latest version of the code. You can also use the following command to download the latest version:

cd ~
wget https://github.com/omeka/omeka-s/releases/download/v2.2.2/omeka-s-2.2.2.zip

Extract the files using this command:

sudo apt install unzip
unzip omeka-s-*.zip -d /var/www/html/

Step 4: Configure the Web Server

Apache

Create a new Apache virtual host file for Omeka S:

sudo nano /etc/apache2/sites-available/omeka.conf

Add the following configuration:

<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/html/omeka-s
  ServerName your-domain.com
  ServerAlias www.your-domain.com
  <Directory /var/www/html/omeka-s/>
    Options FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>
  ErrorLog ${APACHE_LOG_DIR}/omeka.error.log
  CustomLog ${APACHE_LOG_DIR}/omeka.access.log combined
</VirtualHost>

Save the file and enable the virtual host:

sudo a2ensite omeka.conf
sudo systemctl reload apache2

Nginx

Create a new Nginx server block for Omeka S:

sudo nano /etc/nginx/sites-available/omeka

Add the following configuration:

server {
  listen 80;
  server_name your-domain.com www.your-domain.com;
  root /var/www/html/omeka-s;
  index index.php index.html index.htm;

  location / {
    try_files $uri $uri/ /index.php$is_args$args;
  }

  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  }

  location ~ /\.ht {
    deny all;
  }
}

Save the file and enable the server block:

sudo ln -s /etc/nginx/sites-available/omeka /etc/nginx/sites-enabled/
sudo systemctl reload nginx

Step 5: Create the Omeka S database

Create a new MySQL database for Omeka S:

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

Step 6: Install Omeka S

Change to the Omeka S directory and install the dependencies using Composer:

cd /var/www/html/omeka-s/
sudo composer install --no-dev

Copy the .env file:

cp .env.example .env

Edit the .env file and update the database settings:

sudo nano .env
DB_USER=omeka_user
DB_PASSWORD=password
DB_NAME=omeka_db
DB_HOST=localhost

Generate the encryption keys:

./bin/omeka-cli generate-secret

Run the installation:

./bin/install

Follow the prompts and fill in the required information, including the site name, administrator credentials, and plugin settings.

Once the installation is complete, remove the install directory:

rm -rf /var/www/html/omeka-s/install

Step 7: Enable HTTPS (optional but recommended)

To enable HTTPS, follow these steps:

  1. Obtain a TLS/SSL certificate for your domain. You can use a free certificate from Let's Encrypt by following this tutorial: How to Secure Nginx with Let's Encrypt on Debian.
  2. Update the Apache or Nginx virtual host configuration to listen on port 443 and use the SSL/TLS certificate.

Conclusion

You have successfully installed Omeka S on Debian Latest! You can now customize your Omeka S installation, including adding themes and plugins, and start creating your digital collection.

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!