> [!CAUTION]
> **Caution:** This documentation covers Edge for Private Cloud 4.17.09, which is no longer supported. Google does not provide security patches, bug fixes, or technical support for this version. The current supported version is 4.54.00. See the [Edge for Private Cloud documentation](https://docs.apigee.com/private-cloud/latest/overview) for the current version, or [All versions](https://docs.apigee.com/private-cloud/versions) to compare releases.

*Edge for Private Cloud v. 4.17.09*

To install Edge on a node, you first install the Edge apigee-setup utility. If you are in an
environment where your nodes do not have an external internet connection, you must also install a
local copy of the Apigee repo.

## Default installation directory: /opt/apigee

Edge installs all files in the `/opt/apigee` directory. You cannot change this
directory. However, if desired, you can create a symlink to map `/opt/apigee` to
another location. See [Installation Requirements](https://docs.apigee.com/private-cloud/v4.17.09/installation-requirements) for more
information.

## Prerequisite: Disable SELinux

You must disable SELinux, or set it to permissive mode, before you can install Edge
`apigee-setup` utility or any Edge components. If necessary, after installing Edge, you
can re-enable SELinux.

- To **temporarily** set SELinux to permissive mode, execute the following command:
  1. **On a Linux 6.x operating system** :

     ```
     > sudo echo 0 > /selinux/enforce
     ```

     To re-enable SELinux after installing Edge:

     ```
     > sudo echo 1 > /selinux/enforce
     ```
  2. **On a Linux 7.x operating system** :

     ```
     > sudo setenforce 0 
     ```

     To re-enable SELinux after installing Edge:

     ```
     > sudo setenforce 1
     ```
- To **permanently** disable SELinux or set it to permissive mode:
  1. Open `/etc/sysconfig/selinux` in an editor.
  2. Set `SELINUX=disabled` or `SELINUX=permissive`
  3. Save your edits.
  4. Restart the node.
  5. If necessary, re-enable SELinux after Edge installation by repeating this procedure to set `SELINUX=enabled`.

## Prerequisite: Enable EPEL repo

You must enable [Extra Packages for
Enterprise Linux (or EPEL)](https://fedoraproject.org/wiki/EPEL) to install or update Edge, or to create a local repo. The
command you use depends on your version of RedHat/CentOS:

- For RedHat/CentOS/Oracle 7.x:

  ```
  > wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; sudo rpm -ivh epel-release-latest-7.noarch.rpm
  ```
- For RedHat/CentOS/Oracle 6.x:

  ```
  > wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm; sudo rpm -ivh epel-release-latest-6.noarch.rpm
  ```

## Prerequisite: Check libdb4
library version on RedHat 7.4 and CentOS 7.4

On RedHat 7.4 and CentOS 7.4, check the version of the `libdb4` RPMs before you install. Edge
requires version 4.8 and some versions of RedHat 7.4 and CentOS 7.4 ship with a
later version.

You can use the following command to check your version:

```
> rpm -qa | grep libdb
```

If you see that the `libdb4` RPM version is later than version 4.8, use the
following command to replace the RPMs:

```
> rpm -Uvh --oldpackage libdb4-cxx-4.8.30-13.el7.x86_64.rpm libdb4-4.8.30-13.el7.x86_64.rpm
```

If you have to download these RPMs, you can get them from:

- [http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-4.8.30-13.el7.x86_64.rpm](https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-4.8.30-13.el7.x86_64.rpm)
- [http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-4.8.30-13.el7.x86_64.rpm](https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-4.8.30-13.el7.x86_64.rpm)

## Install Edge
apigee-setup utility on a node with an external internet connection

To install Edge on a node with an external Internet connection:

1. Obtain the username and password from Apigee that you use to access the Apigee repository. If you have an existing username:password for the Apigee ftp site, you can use those credentials.
2. Log in to your node as root to install the Edge RPMs

   > [!NOTE]
   > **Note**: While RPM installation requires root access, you can perform Edge configuration without root access.

3. Install `yum-utils` and `yum-plugin-priorities`:

   ```
   > sudo yum install yum-utils
   > sudo yum install yum-plugin-priorities
   ```
4. Disable SELinux as described above.
5. Enable EPEL repo as described above.
6. **If you are installing on AWS** , run the following `yum-configure-manager` command:

   ```
   > sudo yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
   ```
7. Download the Edge `bootstrap_4.17.09.sh` file to `/tmp/bootstrap_4.17.09.sh`:

   ```
   > curl https://software.apigee.com/bootstrap_4.17.09.sh -o /tmp/bootstrap_4.17.09.sh
   ```
8. Install the Edge apigee-service utility and dependencies:

   ```
   > sudo bash /tmp/bootstrap_4.17.09.sh apigeeuser=uName apigeepassword=pWord
   ```

   where <var translate="no">uName:pWord</var> are the username and password you received from
   Apigee. If you omit <var translate="no">pWord</var>, you will be prompted to enter it.

   By default, the installer checks to see that you have Java 1.8 installed. If you do not, it
   installs it for you. Use the `JAVA_FIX` option to specify how to handle
   Java installation. `JAVA_FIX` takes the following values:
   - I = Install OpenJDK 1.8 (default)
   - C = Continue without installing Java
   - Q = Quit. For this option, you have to install Java yourself.

   The installation of the apigee-service utility creates the /etc/yum.repos.d/apigee.repo file
   that defines the Apigee repository. To view the definition file, use the command:

   ```
   > cat /etc/yum.repos.d/apigee.repo
   ```

   To view the repo contents, use the command:

   ```
   > sudo yum -v repolist 'apigee*'
   ```
9. Use `apigee-service` to install the `apigee-setup` utility:

   ```
   > /opt/apigee/apigee-service/bin/apigee-service apigee-setup install
   ```
10. Use `apigee-setup` to install and configure Edge components on the node. See [Install Edge components on a node](https://docs.apigee.com/private-cloud/v4.17.09/install-edge-components-node) for more.

## Install Edge
apigee-setup utility on a node with no external Internet connection

If your Edge nodes are behind a firewall, or in some other way are prohibited from accessing
the Apigee repository over the Internet, then you must create a local repository, or mirror,
of the Apigee repo. That mirror must then be accessible to all nodes. Once created, nodes
can then access that local mirror to install Edge.

To create the internal Apigee repository, you do require a node with an external internet
access to be able to download the Edge RPMs and dependencies. Once you have created the internal
repo, you can then move it to another node or make that node accessible to the Edge nodes for
installation.

> [!NOTE]
> **Note**: Apigee does not host all third-party dependencies in our public repositories. You must download and install these dependencies from publicly accessible repositories.

After you create a local Edge repository, you might later have to update it with the latest
Edge release files. The following sections describe how to create a local repository, and how to
update it.

### Create a local Apigee repository

To create a local Apigee repo:

1. Obtain the username and password from Apigee that you use to access the Apigee repository. If you have an existing username:password for the Apigee ftp site, you can use those credentials.
2. Log in to your node as root to install the Edge RPMs.  

   > [!NOTE]
   > **Note**: While RPM installation requires root access, you can perform Edge configuration without root access.

3. Install `yum-utils` and `yum-plugin-priorities`:

   ```
   > sudo yum install yum-utils
   > sudo yum install yum-plugin-priorities
   ```
4. Disable SELinux as described above.
5. Enable EPEL repo as described above.
6. **If you are installing on AWS** , run the following `yum-configure-manager` command:  

   ```
   > sudo yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
   ```
7. Download the Edge `bootstrap_4.17.09.sh` file to `/tmp/bootstrap_4.17.09.sh`:

   ```
   > curl https://software.apigee.com/bootstrap_4.17.09.sh -o /tmp/bootstrap_4.17.09.sh
   ```
8. Install the Edge `apigee-service` utility and dependencies:

   ```
   > sudo bash /tmp/bootstrap_4.17.09.sh apigeeuser=uName apigeepassword=pWord
   ```

   where <var translate="no">uName:pWord</var> are the username and password you received from
   Apigee. If you omit <var translate="no">pWord</var>, you will be prompted to enter it.
9. Install the `apigee-mirror` utility on the node:

   ```
   > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror install
   ```

   > [!NOTE]
   > **Note** : If you are updating an existing repo to 4.17.09, you only have to update `apigee-mirror`:
   >
   > ```
   > > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror update
   > ```

10. Use the `apigee-mirror` utility to sync the Apigee repo to the `/opt/apigee/data/apigee-mirror/repos/` directory.

    To minimize the size of the repo, include the `--only-new-rpms` to download just the latest
    RPMs. You need approximately 1.6 GB of disk space for the download:

    ```
    > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror sync --only-new-rpms
    ```

    If you want to download the entire repo, including older RPMs, omit `--only-new-rpms`.
    You need approximately 6 GB of disk space for the full download:

    ```
    > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror sync
    ```

    You now have a local copy of the Apigee repo. The next section describes how to install the
    Edge `apigee-setup` utility from the local repo.
11. **(Optional)** If you want to install Edge from the local repo onto the same node that hosts the local repo, then you need to first run the following commands:
    1. Run `bootstrap_4.17.09.sh` from the local repo to install the `apigee-service` utility:

       ```
       > sudo bash /opt/apigee/data/apigee-mirror/repos/bootstrap_4.17.09.sh apigeeprotocol="file://"
         apigeerepobasepath=/opt/apigee/data/apigee-mirror/repos
       ```
    2. Use `apigee-service` to install the `apigee-setup` utility:

       ```
       > /opt/apigee/apigee-service/bin/apigee-service apigee-setup install
       ```
    3. Use `apigee-setup` to install and configure Edge components on the node. See [Install Edge components on a node](https://docs.apigee.com/private-cloud/v4.17.09/install-edge-components-node) for more.

### Install apigee-setup on a remote node from the local repo

You have two options for installing Edge from the local repo. You can either:

- Create a .tar file of the repo, copy the .tar file to a node, and then install Edge from the .tar file.
- Install a webserver on the node with the local repo so that other nodes can access it. Apigee provides the Nginx webserver for you to use, or you can use your own webserver.

#### Install from the .tar file:

1. On the node with the local repo, use the following command to package the local repo into a single .tar file named `/opt/apigee/data/apigee-mirror/apigee-4.17.09.tar.gz`:

   ```
   > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror package
   ```
2. Copy the .tar file to the node where you want to install Edge. For example, copy it to the `/tmp` directory on the new node.
3. Install `yum-utils` and `yum-plugin-priorities`:

   ```
   > sudo yum install yum-utils
   > sudo yum install yum-plugin-priorities
   ```
4. On the new node, disable SELinux as described above.
5. Enable EPEL repo as described above.
6. On the new node, untar the file to the /tmp directory:  

   ```
   > tar -xzf apigee-4.17.09.tar.gz
   ```

   This command creates a new directory, named repos, in the directory containing the .tar
   file. For example `/tmp/repos.`
7. Install the Edge apigee-service utility and dependencies from `/tmp/repos`:

   ```
   > sudo bash /tmp/repos/bootstrap_4.17.09.sh apigeeprotocol="file://" apigeerepobasepath=/tmp/repos
   ```

   Notice that you include the path to the repos directory in this command.
8. Use `apigee-service` to install the `apigee-setup` utility:

   ```
   > /opt/apigee/apigee-service/bin/apigee-service apigee-setup install
   ```
9. Use `apigee-setup` to install and configure Edge components on the node. See [Install Edge components on a node](https://docs.apigee.com/private-cloud/v4.17.09/install-edge-components-node) for more.

#### Install from the repo using the Nginx webserver:

1. Install the Nginx webserver on the repo node:

   ```
   > opt/apigee/apigee-service/bin/apigee-service apigee-mirror nginxconfig
   ```
2. By default, Nginx is configured to use localhost as the server name and port 3939. To change these values:
   1. Open `/opt/apigee/customer/application/mirror.properties` in an editor. Create the file if it does not exist.
   2. Set the following values as necessary:

      ```
      conf_apigee_mirror_listen_port=3939
      conf_apigee_mirror_server_name=localhost
      ```
   3. Restart Nginx:  

      ```
      > /opt/nginx/scripts/apigee-nginx restart
      ```
3. By default, the repo requires a username:password of `admin:admin`. To change these credentials, set the following environment variables:

   ```
   MIRROR_USERNAME=uName
   MIRROR_PASSWORD=pWord
   ```
4. Install `yum-utils` and `yum-plugin-priorities`:

   ```
   > sudo yum install yum-utils > sudo yum install yum-plugin-priorities
   ```
5. On the new node, disable SELinux as described above.
6. Enable EPEL repo as described above.
7. On the remote node, download the Edge bootstrap_4.17.09.sh file to `/tmp/bootstrap_4.17.09.sh`:

   ```
   > /usr/bin/curl http://uName:pWord@remoteRepo:3939/bootstrap_4.17.09.sh -o /tmp/bootstrap_4.17.09.sh
   ```

   where <var translate="no">uName:pWord</var> are the username and password you set above for the
   repo, and <var translate="no">remoteRepo</var> is the IP address or DNS name of the repo node.
8. On the remote node, install the Edge `apigee-service` utility and dependencies:

   ```
   > sudo bash /tmp/bootstrap_4.17.09.sh apigeerepohost=remoteRepo:3939 apigeeuser=uName
     apigeepassword=pWord apigeeprotocol=http://
   ```

   where <var translate="no">uName:pWord</var> are the repo username and password.
9. On the remote node, use `apigee-service` to install the `apigee-setup` utility:

   ```
   > /opt/apigee/apigee-service/bin/apigee-service apigee-setup install
   ```
10. Use `apigee-setup` to install and configure Edge components on the remote node. See [Install Edge components on a node](https://docs.apigee.com/private-cloud/v4.17.09/install-edge-components-node) for more.

### Update a local Apigee repository

To update the repo, you must download the latest bootstrap_4.17.09.sh file, then perform a new
sync:

1. Download the Edge bootstrap_4.17.09.sh file to `/tmp/bootstrap_4.17.09.sh`:

   ```
   > curl https://software.apigee.com/bootstrap_4.17.09.sh -o /tmp/bootstrap_4.17.09.sh
   ```
2. Run the Edge `bootstrap_4.17.09.sh` file:

   ```
   > sudo bash /tmp/bootstrap_4.17.09.sh apigeeuser=uName apigeepassword=pWord
   ```

   where <var translate="no">uName:pWord</var> are the username and password you
   received from Apigee. If you omit <var translate="no">pWord</var>, you will be prompted to enter it.
3. Update `apigee-mirror`:

   ```
   > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror update
   ```
4. Perform the sync:

   ```
   > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror sync --only-new-rpms
   ```
5. If you want to download the entire repo:

   ```
   > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror sync
   ```

### Clean a local Apigee repo

Cleaning the local repo deletes `/opt/apigee/data/apigee-mirror` and
`/var/tmp/yum-apigee-*`.

To clean the local repo, use:

```
> /opt/apigee/apigee-service/bin/apigee-service apigee-mirror clean
```

### Add or update Edge 4.16.0x/4.17.0x in a 4.17.09 repo

If you have to maintain installations for Edge 4.16.0x or 4.17.01/4.17.05 in a 4.17.09 repo,
you can maintain a repo that contains all versions. From that repo, you can then install any
version of Edge.

To add 4.16.0x/4.17.0x to an 4.17.09 repo:

1. Ensure that you have installed the 4.17.09 version of the `apigee-mirror` utility:

   ```
   > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror version
   ```

   You should see a result in the form below, where <var translate="no">xyz</var> is the build
   number:

   ```
   apigee-mirror-4.17.09-0.0.xyz
   ```
2. Use the `apigee-mirror` utility to download Edge 4.16.0x/4.17.01/4.17/05 to your repo. Notice how you prefix the command with the desired version:

   ```
   > apigeereleasever=4.17.01 /opt/apigee/apigee-service/bin/apigee-service apigee-mirror sync --only-new-rpms
   ```

   Use this same command to later update the 4.16.0x/4.17.05 repos by specifying the required
   version numbers.
3. Examine the `/opt/apigee/data/apigee-mirror/repos` directory to see the file structure:

   ```
   > ls /opt/apigee/data/apigee-mirror/repos
   ```

   You should see the following files and directories:

   ```
   apigee apigee-repo-1.0-6.x86_64.rpm
   bootstrap_4.16.01.sh
   bootstrap_4.16.05.sh
   bootstrap_4.17.01.sh
   bootstrap_4.17.05.sh 
   bootstrap_4.17.09.sh
   thirdparty
   ```

   Notice how you have a bootstrap file for all versions of Edge. The `apigee`
   directory also contains separate directories for each version of Edge.
4. To package the repo into a .tar file, use the following command:

   ```
   > apigeereleasever=4.17.01 /opt/apigee/apigee-service/bin/apigee-service apigee-mirror package
   ```

   This command packages all the 4.17.0x and 4.16.0x repos into the same .tar file. You cannot
   package only part of the repo.

To install Edge from the local repo or .tar file, just make sure to run the correct bootstrap
file by using one of the following commands. This example installs Edge 4.17.01:

- If installing from a .tar file, run the correct bootstrap file from the repo:

  ```
  > sudo bash /tmp/repos/bootstrap_4.17.01.sh apigeeprotocol="file://" apigeerepobasepath=/tmp/repos
  ```

  To complete the installation, follow the remaining steps from "Install from the .tar file"
  above.
- If installing using the Nginx webserver, download and then run the correct bootstrap file from the repo:

  ```
  > /usr/bin/curl http://uName:pWord@remoteRepo:3939/bootstrap_4.17.01.sh -o /tmp/bootstrap_4.17.01.sh
  > sudo bash /tmp/bootstrap_4.17.01.sh apigeerepohost=remoteRepo:3939
    apigeeuser=uName apigeepassword=pWord apigeeprotocol=http://
  ```

  To complete the installation, follow the remaining steps from "Install from the repo using the
  Nginx webserver" above.