Skip to the content.

MacOS Installation Guide for Docker, MySQL and git.

To install Omeka S using Docker, you need to have Docker, MySQL, and Git installed on your system.

1.1 Install Docker

Docker is a platform that allows you to create, deploy, and run applications in containers. Follow these instructions for your operating system:

  1. Download and install Docker Desktop for macOS from the Docker website.
  2. Open Docker Desktop and follow the installation instructions.
  3. Verify Docker installation by opening a terminal and running:
     docker --version
    

1.2 Install MySQL

Omeka S requires a MySQL database. Here’s how to install MySQL on different systems:

macOS

  1. Install MySQL using Homebrew:
     brew install mysql
    
  2. Start MySQL:
     brew services start mysql
    

Once MySQL is installed and running on your macOS system, you can use the MySQL command-line interface to manage databases and users. Access MySQL Command Line:

  1. Log in to the MySQL shell using the root user:
     mysql -u root -p
    
  2. Enter the root password when prompted. You should now see the MySQL prompt (mysql>).

  3. To create a new database, use the following SQL command:
     CREATE DATABASE my_database;
    
  4. Replace my_database with your desired database name (and don’t forget to save it somewhere the name because you’ll need it later where it will be prompted as; MYSQL_DATABSE=my_database).

  5. To create a new MySQL user (but take step 8 into account when doing so!), run:
     CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'userpassword';
    
  6. Replace newuser with the username and userpassword with a strong password. You’ll also need to save your username and userpassword somewhere. For username it will later be prompted as; MYSQL_USER=newuser and the password as; MYSQL_PASSWORD=userpassword

  7. Grant the new user full access to the database you created:
    GRANT ALL PRIVILEGES ON my_database.* TO 'newuser'@'localhost';
    
  8. Apply the changes:
    FLUSH PRIVILEGES;
    
  9. To exit the MySQL shell, type:
    EXIT;
    

    After setting up MySQL, test the installation to ensure it’s working correctly. Open Terminal.

  10. Log in using the root user:
    mysql -u root -p
    
  11. Enter the root password when prompted.

  12. To list all databases in MySQL, use:
    SHOW DATABASES;
    
  13. You should see a list of databases, including the one you created (my_database).

  14. Verify that the new user has access to the database:
    mysql -u newuser -p
    
  15. Enter the password for newuser.
  16. Once logged in, list the databases accessible to this user:
    SHOW DATABASES;
    
  17. You should see my_database listed.

  18. Type EXIT; to exit the MySQL shell:
    EXIT;
    

You have now successfully installed, configured MySQL on macOS. You can use these basic commands to manage your MySQL databases and users.

1.3 Install Git

Git is a powerful version control system that allows you to track changes in your code and collaborate with others. This tutorial will guide you through the basic steps of installing Git, configuring it, and using fundamental Git commands.

  1. Install Git using Homebrew:
     brew install git
    
  2. Alternatively, install Xcode Command Line Tools:
     xcode-select --install
    

1.4 Configuring Git

Once Git is installed, configure it with your name and email. This information will be used to track your commits.

  1. Set your username:
     git config --global user.name "Your Name"
    
  2. Set your email:
     git config --global user.email "your.email@example.com"
    

You can check your configuration at any time with:

git config --list