|
| 1 | +--- |
| 2 | +title: "Installing the MongoDB Foreign Data Wrapper" |
| 3 | +--- |
| 4 | + |
| 5 | + |
| 6 | +<div id="installing_the_MongoDB_data_adapter" class="registered_link"></div> |
| 7 | + |
| 8 | +The MongoDB Foreign Data Wrapper can be installed with an RPM package. During the installation process, the installer will satisfy software prerequisites. If yum encounters a dependency that it cannot resolve, it will provide a list of the required dependencies that you must manually resolve. |
| 9 | + |
| 10 | +<div id="using_an_rpm_package_to_install_the_data_adapter" class="registered_link"></div> |
| 11 | + |
| 12 | +## Installing the MongoDB Foreign Data Wrapper using an RPM Package |
| 13 | + |
| 14 | +You can install the MongoDB Foreign Data Wrapper using an RPM package on the following platforms: |
| 15 | + |
| 16 | +- [RHEL or CentOS 7 PPCLE](#rhel_centos7_PPCLE) |
| 17 | +- [RHEL 7](#rhel7) |
| 18 | +- [RHEL 8](#rhel8) |
| 19 | +- [CentOS 7](#centos7) |
| 20 | +- [CentOS 8](#centos8) |
| 21 | + |
| 22 | +<div id="rhel_centos7_PPCLE" class="registered_link"></div> |
| 23 | + |
| 24 | +### On RHEL or CentOS 7 PPCLE |
| 25 | + |
| 26 | +1. Use the following command to create a configuration file and install Advance Toolchain: |
| 27 | + |
| 28 | + ```text |
| 29 | + rpm --import https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7/gpg-pubkey-6976a827-5164221b |
| 30 | +
|
| 31 | + cat > /etc/yum.repos.d/advance-toolchain.repo <<EOF |
| 32 | + # Begin of configuration file |
| 33 | + [advance-toolchain] |
| 34 | + name=Advance Toolchain IBM FTP |
| 35 | + baseurl=https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7 |
| 36 | + failovermethod=priority |
| 37 | + enabled=1 |
| 38 | + gpgcheck=1 |
| 39 | + gpgkey=ftp://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHELX/gpg-pubkey-6976a827-5164221b |
| 40 | + # End of configuration file |
| 41 | + EOF |
| 42 | + ``` |
| 43 | + |
| 44 | +2. Install the EDB repository: |
| 45 | + |
| 46 | + ```text |
| 47 | + yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm |
| 48 | + ``` |
| 49 | + |
| 50 | +3. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: |
| 51 | + |
| 52 | + ```text |
| 53 | + sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo |
| 54 | + ``` |
| 55 | + |
| 56 | +4. Install the EPEL repository: |
| 57 | + |
| 58 | + ```text |
| 59 | + yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
| 60 | + ``` |
| 61 | + |
| 62 | +5. On RHEL 7 PPCLE, enable the additional repositories to resolve EPEL dependencies: |
| 63 | + |
| 64 | + ```text |
| 65 | + subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" |
| 66 | + ``` |
| 67 | + |
| 68 | +6. Install the selected package: |
| 69 | + |
| 70 | + ```text |
| 71 | + dnf install edb-as<xx>-mongo_fdw |
| 72 | + ``` |
| 73 | + |
| 74 | + where `xx` is the server version number. |
| 75 | + |
| 76 | + |
| 77 | +<div id="rhel7" class="registered_link"></div> |
| 78 | + |
| 79 | +### On RHEL 7 |
| 80 | + |
| 81 | +1. To create the repository configuration file, assume superuser privileges, and invoke the following command: |
| 82 | + |
| 83 | + ```text |
| 84 | + yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm |
| 85 | + ``` |
| 86 | + |
| 87 | +2. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: |
| 88 | + |
| 89 | + ```text |
| 90 | + sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo |
| 91 | + ``` |
| 92 | + |
| 93 | +3. Install the EPEL repository: |
| 94 | + |
| 95 | + ```text |
| 96 | + yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
| 97 | + ``` |
| 98 | + |
| 99 | +4. Enable the additional repositories to resolve dependencies: |
| 100 | + |
| 101 | + ```text |
| 102 | + subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" |
| 103 | + ``` |
| 104 | + |
| 105 | +5. Install the selected package: |
| 106 | + |
| 107 | + ```text |
| 108 | + dnf install edb-as<xx>-mongo_fdw |
| 109 | + ``` |
| 110 | + |
| 111 | + where `xx` is the server version number. |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | +<div id="rhel8" class="registered_link"></div> |
| 117 | + |
| 118 | +### On RHEL 8 |
| 119 | + |
| 120 | +1. To create the repository configuration file, assume superuser privileges, and invoke the following command: |
| 121 | + |
| 122 | + ```text |
| 123 | + dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm |
| 124 | + ``` |
| 125 | + |
| 126 | +2. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: |
| 127 | + |
| 128 | + ```text |
| 129 | + sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo |
| 130 | + ``` |
| 131 | + |
| 132 | +3. Install the EPEL repository: |
| 133 | + |
| 134 | + ```text |
| 135 | + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm |
| 136 | + ``` |
| 137 | + |
| 138 | +4. Enable the additional repositories to resolve dependencies: |
| 139 | + |
| 140 | + ```text |
| 141 | + ARCH=$( /bin/arch ) subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms" |
| 142 | + ``` |
| 143 | + |
| 144 | +5. Disable the built-in PostgreSQL module: |
| 145 | + |
| 146 | + ```text |
| 147 | + dnf -qy module disable postgresql |
| 148 | + ``` |
| 149 | +6. Install the selected package: |
| 150 | + |
| 151 | + ```text |
| 152 | + dnf install edb-as<xx>-mongo_fdw |
| 153 | + ``` |
| 154 | + |
| 155 | + where `xx` is the server version number. |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | +<div id="centos7" class="registered_link"></div> |
| 160 | + |
| 161 | +### On CentOS 7 |
| 162 | + |
| 163 | +1. To create the repository configuration file, assume superuser privileges, and invoke the following command: |
| 164 | + |
| 165 | + ```text |
| 166 | + yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm |
| 167 | + ``` |
| 168 | + |
| 169 | +2. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: |
| 170 | + |
| 171 | + ```text |
| 172 | + sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo |
| 173 | + ``` |
| 174 | + |
| 175 | +3. Install the EPEL repository: |
| 176 | + |
| 177 | + ```text |
| 178 | + yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
| 179 | + ``` |
| 180 | + |
| 181 | +4. Install the selected package: |
| 182 | + |
| 183 | + ```text |
| 184 | + dnf install edb-as<xx>-mongo_fdw |
| 185 | + ``` |
| 186 | + |
| 187 | + where `xx` is the server version number. |
| 188 | + |
| 189 | + |
| 190 | +<div id="centos8" class="registered_link"></div> |
| 191 | + |
| 192 | +### On CentOS 8 |
| 193 | + |
| 194 | + |
| 195 | +1. To create the repository configuration file, assume superuser privileges, and invoke the following command: |
| 196 | + |
| 197 | + ```text |
| 198 | + dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm |
| 199 | + ``` |
| 200 | + |
| 201 | +2. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: |
| 202 | + |
| 203 | + ```text |
| 204 | + sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo |
| 205 | + ``` |
| 206 | + |
| 207 | +3. Install the EPEL repository: |
| 208 | + |
| 209 | + ```text |
| 210 | + dnf -y install epel-release |
| 211 | + ``` |
| 212 | + |
| 213 | +4. Enable the additional repositories to resolve dependencies: |
| 214 | + |
| 215 | + ```text |
| 216 | + dnf config-manager --set-enabled PowerTools |
| 217 | + ``` |
| 218 | + |
| 219 | +5. Disable the built-in PostgreSQL module: |
| 220 | + |
| 221 | + ```text |
| 222 | + dnf -qy module disable postgresql |
| 223 | + ``` |
| 224 | +6. Install the selected package: |
| 225 | + |
| 226 | + ```text |
| 227 | + dnf install edb-as<xx>-mongo_fdw |
| 228 | + ``` |
| 229 | + |
| 230 | + where `xx` is the server version number. |
| 231 | + |
| 232 | + |
| 233 | +## Installing the MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host |
| 234 | + |
| 235 | +To install the MongoDB Foreign Data Wrapper on a Debian or Ubuntu host, you must have credentials that allow access to the EDB repository. To request credentials for the repository, visit the [EDB website](https://www.enterprisedb.com/repository-access-request/). |
| 236 | + |
| 237 | +The following steps will walk you through using the EDB apt repository to install a Debian package. When using the commands, replace the `username` and `password` with the credentials provided by EDB. |
| 238 | + |
| 239 | +1. Assume superuser privileges: |
| 240 | + |
| 241 | + ```text |
| 242 | + sudo su – |
| 243 | + ``` |
| 244 | + |
| 245 | +2. Configure the EDB repository: |
| 246 | + |
| 247 | + On Debian 9 and Ubuntu: |
| 248 | + |
| 249 | + ```text |
| 250 | + sh -c 'echo "deb https://username:[email protected]/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list' |
| 251 | + ``` |
| 252 | + |
| 253 | + On Debian 10: |
| 254 | + |
| 255 | + 1. Set up the EDB repository: |
| 256 | + |
| 257 | + ```text |
| 258 | + sh -c 'echo "deb [arch=amd64] https://apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list' |
| 259 | + ``` |
| 260 | + |
| 261 | + 1. Substitute your EDB credentials for the `username` and `password` in the following command: |
| 262 | + |
| 263 | + ```text |
| 264 | + sh -c 'echo "machine apt.enterprisedb.com login <username> password <password>" > /etc/apt/auth.conf.d/edb.conf' |
| 265 | + ``` |
| 266 | + |
| 267 | +3. Add support to your system for secure APT repositories: |
| 268 | + |
| 269 | + ```text |
| 270 | + apt-get install apt-transport-https |
| 271 | + ``` |
| 272 | + |
| 273 | +4. Add the EDB signing key: |
| 274 | + |
| 275 | + ```text |
| 276 | + wget -q -O - https://<username>:<password>@apt.enterprisedb.com/edb-deb.gpg.key | apt-key add - |
| 277 | + ``` |
| 278 | + |
| 279 | +5. Update the repository metadata: |
| 280 | + |
| 281 | + ```text |
| 282 | + apt-get update |
| 283 | + ``` |
| 284 | + |
| 285 | +6. Install the Debian package: |
| 286 | + |
| 287 | + ```text |
| 288 | + apt-get install edb-as<xx>-mongo-fdw |
| 289 | + ``` |
| 290 | + |
| 291 | + where `xx` is the server version number. |
0 commit comments