Installing on Mac OS X
======================

EDB provides a graphical interactive installer for MacOS. You can access
it two ways:

-  Download the graphical installer from the `Downloads page <https://www.enterprisedb.com/software-downloads-postgres#migration-toolkit>`_  and invoke
   the installer directly. See :ref:`Installing directly <Installing directly>`  .

-  Use Stack Builder with PostgreSQL to download the EDB installer
   package and invoke the graphical installer. See :ref:`Using Stack Builder <Using Stack Builder>`  .

Prerequisites
-------------

You must have a Java JVM (version 1.8.0 or later) in place before Stack
Builder can perform a Migration Toolkit installation. `Adoptium <https://adoptium.net>`_ 
offers prebuilt OpenJDK binaries from fully open sources.

You must also set the ``JAVA_HOME`` environment variable. Use the
following command:

.. code:: shell

   export JAVA_HOME=$(/usr/libexec/java_home)

Using Stack Builder
-------------------

If you are using PostgreSQL, you can invoke the graphical installer with
Stack Builder. See `Using Stack Builder <https://www.enterprisedb.com/docs/supported-open-source/postgresql/installer/03_using_stackbuilder/>`_  .

1. In Stack Builder, follow the prompts until you get to the module
   selection page.

On the Welcome page, use the drop-down listbox to select the target
server installation from the list of available servers. If your network
requires you to use a proxy server to access the internet, select
``Proxy servers`` and specify a server; if you do not need to use a
proxy server, click ``Next`` to proceed.

1. Expand the **Registration-requiredandtrialproducts** node.

2. Expand the **EnterpriseDBTools** node and select **MigrationToolkit**
   .

3. Select **Next** and proceed to :ref:`Using the graphical installer <Using the graphical installer>`  .

Installing directly
-------------------

1. After downloading the graphical installer, use the terminal to
   execute the following command. If necessary, provide a password when
   prompted. Superuser or administator privileges are required.

.. code:: shell

      sudo ~/Downloads/edb-migrationtoolkit-55.5.0-1-osx.app/Contents/MacOS/installbuilder.sh

1. Proceed to :ref:`Using the graphical installer <Using the graphical installer>`  .

Using the graphical installer
-----------------------------

1. Select the installation language and select **OK** .

2. On the Setup Migration Toolkit page, select **Next** .

3. Read the license agreement. If you accept the agreement, select
   **Iaccepttheagreement** and select **Next** .

4. Browse to a directory where you want Migration Toolkit to be
   installed, or allow the installer to install Migration Toolkit in the
   default location. Select **Next** .

5. On the Ready to Install page, select **Next** .

An information box shows the installation progress of the selected
components.

1. When the installation has completed, select **Finish** .

After installing Migration Toolkit, you must install the appropriate
JDBC drivers before performing a migration. See :ref:`Installing a JDBC driver <Installing a JDBC driver>`  for more
information.

..  Note::
   The EDB JDBC driver is not available for Mac OS.
