# Deploying an EAC application on UNIX

This section describes the steps for deploying an EAC application in a UNIX environment using the provided deploy.sh file.

Before deployment, unpack the Deployment Template package on the primary server. Five directories - bin, conf, data, doc, and lib - are installed into the `deploymentTemplate-[VERSION]` directory.

The shell script in the bin directory is used in the following deployment steps to configure and distribute the template files into the deployment directory structure.

To deploy the application:

1. On the primary server, execute the batch script to deploy the application: `deploymentTemplate-[VERSION]/bin/deploy.sh` The template identifies the location and version of your Platform Services install based on the `ENDECA_ROOT` environment variable. If the information presented by the installer does not match the version or location of the software you plan to use for the deployment, stop the installation, reset your `ENDECA_ROOT` environment variable, and start again. Note that the installer may not be able to parse the Platform Services version from the `ENDECA_ROOT` path if it is installed in a non-standard directory structure. It is not necessary for the installer to parse the version number, so if you are certain that the `ENDECA_ROOT` path points to the correct location, proceed with the installation.
2. Specify whether your application is going to be a Dgraph deployment or an Agraph deployment.
   1. If an Agraph deployment was selected, specify whether your application is going to use Parallel Forge.
3. Specify a short name for your application. The name should consist of lower- or uppercase letters, or digits between zero and nine.
4. Specify the full path into which your application should be deployed. This directory must already exist. The installation creates a folder inside of the deployment directory with the name of your application and the application directory structure and files will be deployed there. For example, if your application name is MyApp, specifying the deployment directory as `/localdisk/apps` installs the template for your application into `/localdisk/apps/myapp`.
5. Specify the port number of the EAC Central Server. By default, the installer assumes that the Central Server host is the machine on which it is being run and that all EAC Agents are running on the same port. All of these settings can be configured to reflect a different environment configuration once the application is deployed.
6. Specify whether your application will use Oracle Endeca Workbench for configuration management. Integration can be enabled or disabled after deployment, but enabling it deploys a default set of scripts that manage configuration integration from Oracle Endeca Workbench.
7. Specify the port number of Oracle Endeca Workbench. By default, the installer assumes that the Workbench host is the machine on which it is being run, but this can be re-configured once the application is deployed.
8. The installer can be configured to prompt the user for custom information specific to the deployment. By default, Dgraph deployments use this functionality to prompt the user for Dgraph and Log Server port numbers, while the Agraph deployment also ask for Agraph (and Forge server, if using Parallel Forge) port numbers.

If the application directory already exists, the installation script archives the existing directory, to avoid accidental loss of data. For example, if the installer finds that /localdisk/apps/myapp already exists, it renames the existing directory to /localdisk/apps/myapp.[timestamp].bak and installs the new deployment into a new myapp directory. Note that in the case of deployments that use a large amount of disk space, it is important to remove archived deployment directories to clear up disk space.

Related concepts
Integrating and running CAS crawls that write to Record Store instances
Integrating and running CAS crawls that write to record output files
Related tasks
Deploying an EAC application on Windows