Skip to content

Instantly share code, notes, and snippets.

@mjbalcueva
Created August 27, 2023 18:57
Show Gist options
  • Save mjbalcueva/0bebc16178b133e882b7f696690654bd to your computer and use it in GitHub Desktop.
Save mjbalcueva/0bebc16178b133e882b7f696690654bd to your computer and use it in GitHub Desktop.
Omeka Classic Installation Guide for Debian Based Distros

Omeka Classic Installation Guide (Ubuntu 22.04.3)

Installation Prerequisites

  1. Download virtualbox
  2. Download ubuntu

Virtual Machine (Ubuntu) Setup

  1. Launch VirtualBox and create a new virtual machine instance using the downloaded Ubuntu ISO.
  2. Set your desired username and password.
  3. Adjust hardware settings for better performance, including base memory and processor count.

Add User to sudoers file Error Fix

  1. Open a terminal in your Ubuntu virtual machine.
  2. Run the following commands:
    su -
    usermod -a -G sudo YourUserName
  3. Restart the virtual machine

Apache, Mysql & PHP Setup

  1. Install Apache and MariaDB (MySQL):
    sudo apt install apache2 mariadb-server
  2. Add PHP repository and install PHP:
    sudo apt install software-properties-common
    sudo add-apt-repository ppa:ondrej/php
    sudo apt install php libapache2-mod-php php-mysql php-xml
  3. Enable and start Apache and MySQL services:
    sudo systemctl start apache2
    sudo systemctl enable apache2
    sudo systemctl start mysql
    sudo systemctl enable mysql

Database Configuration

  1. Open MySQL as root:
    sudo mysql -u root -p
  2. In the MySQL prompt, create a database and user, grant privileges, and exit:
    CREATE DATABASE your_database_name;
    CREATE USER your_user_name;
    GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_user_name'@localhost IDENTIFIED BY 'your_user_password';
    FLUSH PRIVILEGES;
    EXIT

Omeka classic Setup

  1. Download and move Omeka Classic:
    cd ~/Downloads/
    wget https://github.com/omeka/Omeka/releases/download/v3.1.1/omeka-3.1.1.zip
    unzip omeka-3.1.1.zip
    sudo mv omeka-3.1.1 /var/www/html/omeka/
    rm omeka-3.1.1.zip
    
  2. Configure ownership and permissions:
    sudo chown -R www-data:www-data /var/www/html/omeka/
    sudo chmod -R 755 /var/www/html/omeka/
  3. Edit the Omeka database configuration file:
    gedit admin:/var/www/html/omeka/db.ini
    Replace the placeholders with your database information:
    [database]
    host     = "localhost"
    username = "your_user_name"
    password = "your_user_password"
    dbname   = "your_database_name"
    prefix   = "omeka_"
    charset  = "utf8"
    ;port     = ""
  4. Save and exit the editor.
  5. Create and edit an Apache configuration file for Omeka:
    sudo touch /etc/apache2/sites-available/omeka.conf
    gedit admin:/etc/apache2/sites-available/omeka.conf
    Add the following content:
    <VirtualHost *:80>
        ServerAdmin admin@website_name.com
        DocumentRoot /var/www/html/omeka/
        ServerName website_name.com
        <Directory /var/www/html/omeka/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/omeka-error.log
        CustomLog ${APACHE_LOG_DIR}/omeka-access.log common
    </VirtualHost>
  6. Save and exit the editor
  7. Enable and restart Apache with necessary modules:
    sudo a2dissite 000-default
    sudo a2ensite omeka.conf
    sudo a2enmod rewrite
    sudo a2enmod headers
    sudo systemctl restart apache2
  8. Access Omeka Classic by visiting http://localhost in your web browser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment