How to Install Omeka Classic CMS on Ubuntu 18.04 LTS
Omeka Classic is a free and open source web publishing platform for sharing digital collections and creating media-rich online exhibits. Omeka Classic enables you to create complex narratives and share rich collections and content at low cost without sacrificing design and technical quality. You can extend its functionality with themes and plugins.
In this tutorial, we will learn how to install Omeka Classic CMS on Ubuntu 18.04 server.
Requirements
- A server running Ubuntu 18.04.
- A non-root user with sudo privileges.
Install LAMP Server
Before starting, you will need Apache web server, MariaDB and PHP to be installed to your system. If not installed, then first install Apache and MariaDB server using the following command:
sudo apt-get install apache2 mariadb-server -y
Once both are installed, you will need to install the latest version of PHP to your system. By default, the latest version of PHP is not available in the Ubuntu 18.04 default repository. So add the PHP repository with the following command:
sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php
Next, update the repository and install PHP along with all the required dependencies by running the following command:
sudo apt-get install install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-sqlite3 php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip -y
Once all the packages are installed, start Apache and MariaDB service and enable them to start on boot by running the following command:
sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start mysql
sudo systemctl enable mysql
Configure MariaDB
Next, you will need to create a database and user for Omeka. First, log in to MariaDB shell with the following command:
mysql -u root -p
Enter your root password, then create a database and user for Omeka:
MariaDB [(none)]> CREATE DATABASE omeka_db;
MariaDB [(none)]> CREATE USER omeka_user;
Next, grant all the privileges to the Omeka database:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON omeka_db.* TO ‘omeka_user’@’localhost’ IDENTIFIED BY ‘password’;
Next, flush the privileges and exit from the MariaDB shell:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
Install Omeka Classic
First, download the latest version of Omeka classic with the following command:
wget https://github.com/omeka/Omeka/releases/download/v2.6.1/omeka-2.6.1.zip
Once the download is completed, unzip the downloaded file:
unzip omeka-2.6.1.zip
Next, copy the extracted directory to the Apache root directory and give necessary permissions:
sudo cp -r omeka-2.6.1 /var/www/html/omeka
sudo chown -R www-data:www-data /var/www/html/omeka
sudo chmod -R 755 /var/www/html/omeka/
Next, change the directory to the omeka and modify db.ini file:
cd /var/www/html/omeka sudo nano db.ini
Make the following changes:
[database] host = "localhost" username = "omeka_user" password = "password" dbname = "omeka_db" prefix = "omeka_" charset = "utf8"
Save and close the file, when you are finished.
Next, create an Apache virtual host file for Omeka:
sudo nano /etc/apache2/sites-available/omeka.conf
add the following lines:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/omeka/ ServerName example.com <Directory /var/www/html/omeka/> Options FollowSymLinks AllowOverride All </Directory> ErrorLog /var/log/apache2/omeka-error_log CustomLog /var/log/apache2/omeka-access_log common </VirtualHost>
Save and close the file. Then, enable virtual host file, Apache rewrite module and header module with the following command:
sudo a2ensite omeka.conf
sudo a2enmod rewrite
sudo a2enmod headers
Finally, restart Apache service to make the changes:
sudo systemctl restart apache2
Access Omeka Classic Web Interface
Open your web browser and type the URL http://example.com. You will be redirected to the following page:
Here, provide all the required details like your admin username and password, site name, email address, then click on the Install button. Once the installation has been completed. You should see the following page:
Now, click on the Admin Dashboard button. You should see the following page:
Here, provide your admin login credentials, then click on the Log In button. You should see the following page: