|
| 1 | +--- |
| 2 | +title: "Installing EDB-ODBC" |
| 3 | + |
| 4 | +legacyRedirectsGenerated: |
| 5 | + # This list is generated by a script. If you need add entries, use the `legacyRedirects` key. |
| 6 | + - "/edb-docs/d/edb-postgres-odbc-connector/user-guides/odbc-guide/12.2.0.2/installing_edb-odbc.html" |
| 7 | +--- |
| 8 | + |
| 9 | +The EDB ODBC Connector is distributed and installed with the EDB Postgres Advanced Server graphical or RPM installer. |
| 10 | + |
| 11 | +## Installing the Connector with an RPM Package |
| 12 | + |
| 13 | +### On RHEL 7 |
| 14 | + |
| 15 | +Before installing the ODBC connector, you must: |
| 16 | + |
| 17 | +Install the epel-release package: |
| 18 | + |
| 19 | +- On RHEL or CentOS 7: |
| 20 | + ```text |
| 21 | + yum -y install https://dl.fedoraproject.org/pub/epel/ |
| 22 | + epel-release-latest-7.noarch.rpm |
| 23 | + ``` |
| 24 | +- On RHEL or CentOS 8: |
| 25 | + ```text |
| 26 | + dnf -y install https://dl.fedoraproject.org/pub/epel/ |
| 27 | + epel-release-latest-7.noarch.rpm |
| 28 | + ``` |
| 29 | + |
| 30 | +!!! Note |
| 31 | + You may need to enable the `[extras]` repository definition in the CentOS-Base.repo file (located in `/etc/yum.repos.d`). |
| 32 | + |
| 33 | +You must also have credentials that allow access to the EDB repository. For information about requesting credentials, visit: |
| 34 | + |
| 35 | + <https://info.enterprisedb.com/rs/069-ALB-339/images/Repository%20Access%2004-09-2019.pdf> |
| 36 | + |
| 37 | +After receiving your repository credentials you can: |
| 38 | + |
| 39 | +1. Create the repository configuration file. |
| 40 | +2. Modify the file, providing your user name and password. |
| 41 | +3. Install `edb-odbc`. |
| 42 | + |
| 43 | +**Creating a Repository Configuration File** |
| 44 | + |
| 45 | +To create the repository configuration file, assume superuser privileges, and invoke the following command: |
| 46 | + |
| 47 | +- On RHEL or CentOS 7: |
| 48 | + |
| 49 | +```text |
| 50 | +yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm |
| 51 | +``` |
| 52 | + |
| 53 | +- On RHEL or CentOS 8: |
| 54 | + |
| 55 | +```text |
| 56 | +dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm |
| 57 | +``` |
| 58 | + |
| 59 | +The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. |
| 60 | + |
| 61 | +**Modifying the file, providing your user name and password** |
| 62 | + |
| 63 | +After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. |
| 64 | + |
| 65 | +```text |
| 66 | +[edb] |
| 67 | +name=EnterpriseDB RPMs $releasever - $basearch |
| 68 | +baseurl=https://<username>:<password>@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch |
| 69 | +enabled=1 |
| 70 | +gpgcheck=1 |
| 71 | +gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY |
| 72 | +``` |
| 73 | + |
| 74 | +**Installing ODBC Connector** |
| 75 | + |
| 76 | +After saving your changes to the configuration file, use the following commands to install the ODBC Connector: |
| 77 | + |
| 78 | +- On RHEL or CentOS 7: |
| 79 | + |
| 80 | +```text |
| 81 | +yum install edb-odbc |
| 82 | + |
| 83 | +yum install edb-odbc-devel |
| 84 | +``` |
| 85 | + |
| 86 | +- On RHEL or CentOS 8: |
| 87 | + |
| 88 | +```text |
| 89 | +dnf install edb-odbc |
| 90 | + |
| 91 | +dnf install edb-odbc-devel |
| 92 | +``` |
| 93 | + |
| 94 | +When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. |
| 95 | + |
| 96 | +During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. |
| 97 | + |
| 98 | +<div id="rhel8" class="registered_link"></div> |
| 99 | + |
| 100 | +### Updating an RPM Installation |
| 101 | + |
| 102 | +If you have an existing EDB ODBC connector RPM installation, you can use yum or dnf to upgrade your repository configuration file and update to a more recent product version. To update the `edb.repo` file, assume superuser privileges and enter: |
| 103 | + |
| 104 | +- On RHEL or CentOS 7: |
| 105 | + |
| 106 | + ```text |
| 107 | + yum upgrade edb-repo |
| 108 | + ``` |
| 109 | + |
| 110 | +- On RHEL or CentOS 8: |
| 111 | + |
| 112 | + ```text |
| 113 | + dnf upgrade edb-repo |
| 114 | + ``` |
| 115 | + |
| 116 | +yum or dnf will update the `edb.repo` file to enable access to the current EDB repository, configured to connect with the credentials specified in your `edb.repo` file. Then, you can use yum or dnf to upgrade any installed packages: |
| 117 | + |
| 118 | +- On RHEL or CentOS 7: |
| 119 | + |
| 120 | + ```text |
| 121 | + yum upgrade edb-odbc |
| 122 | +
|
| 123 | + yum upgrade edb-odbc-devel |
| 124 | + ``` |
| 125 | + |
| 126 | +- On RHEL or CentOS 8: |
| 127 | + |
| 128 | + ```text |
| 129 | + dnf upgrade edb-odbc |
| 130 | +
|
| 131 | + dnf upgrade edb-odbc-devel |
| 132 | + ``` |
| 133 | + |
| 134 | +## Installing the Connector on an SLES 12 Host |
| 135 | + |
| 136 | +You can use the zypper package manager to install the connector on an SLES 12 host. zypper will attempt to satisfy package dependencies as it installs a package, but requires access to specific repositories that are not hosted at EDB. Before installing the connector, use the following commands to add EDB repository configuration files to your SLES host: |
| 137 | + |
| 138 | +```txt |
| 139 | +zypper addrepo |
| 140 | +https://zypp.enterprisedb.com/suse/epas12-sles.repo |
| 141 | +zypper addrepo |
| 142 | +https://zypp.enterprisedb.com/suse/epas-sles-tools.repo |
| 143 | +zypper addrepo |
| 144 | +https://zypp.enterprisedb.com/suse/epas-sles-dependencies.repo |
| 145 | +``` |
| 146 | + |
| 147 | +Each command creates a repository configuration file in the `/etc/zypp/repos.d directory`. The files are named: |
| 148 | + |
| 149 | +- `Edbas12suse.repo` |
| 150 | +- `edbasdependencies.repo` |
| 151 | +- `edbastools.repo` |
| 152 | + |
| 153 | +After creating the repository configuration files, use the zypper refresh command to refresh the metadata on your SLES host to include the EDB repositories. |
| 154 | + |
| 155 | +```txt |
| 156 | +/etc/zypp/repos.d # zypper refresh |
| 157 | +``` |
| 158 | + |
| 159 | +When prompted for a `User Name` and `Password`, provide your connection credentials for the EDB repository. To request credentials for the repository, visit [the EDB website](https://www.enterprisedb.com/repository-access-request). |
| 160 | + |
| 161 | +Before installing EDB Postgres Advanced Server or supporting components, you must also add SUSEConnect and the SUSE Package Hub extension to the SLES host, and register the host with SUSE, allowing access to SUSE repositories. Use the commands: |
| 162 | + |
| 163 | +```txt |
| 164 | +zypper install SUSEConnect |
| 165 | +SUSEConnect -p PackageHub/12/x86_64 |
| 166 | +SUSEConnect -p sle-sdk/12/x86_64 |
| 167 | +``` |
| 168 | + |
| 169 | +For detailed information about registering a SUSE host, visit the [SUSE website](https://www.suse.com/support/kb/doc/?id=7016626). |
| 170 | + |
| 171 | +Then, you can use the zypper utility to install the connector: |
| 172 | + |
| 173 | +```txt |
| 174 | +zypper install edb-odbc |
| 175 | +
|
| 176 | +zypper install edb-odbc-devel |
| 177 | +``` |
| 178 | + |
| 179 | +## Installing the Connector on a Debian or Ubuntu Host |
| 180 | + |
| 181 | +To install a DEB package 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/). |
| 182 | + |
| 183 | +The following steps will walk you through on using the EDB apt repository to install a DEB package. When using the commands, replace the `username` and `password` with the credentials provided by EDB. |
| 184 | + |
| 185 | +1. Assume superuser privileges: |
| 186 | + |
| 187 | + ```text |
| 188 | + sudo su – |
| 189 | + ``` |
| 190 | + |
| 191 | +2. Configure the EDB repository: |
| 192 | + |
| 193 | + ```text |
| 194 | + 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' |
| 195 | + ``` |
| 196 | + |
| 197 | +3. Add support to your system for secure APT repositories: |
| 198 | + |
| 199 | + ```text |
| 200 | + apt-get install apt-transport-https |
| 201 | + ``` |
| 202 | + |
| 203 | +4. Add the EDB signing key: |
| 204 | + |
| 205 | + ```text |
| 206 | + wget -q -O - https://<username>:<password>@apt.enterprisedb.com/edb-deb.gpg.key | apt-key add - |
| 207 | + ``` |
| 208 | + |
| 209 | +5. Update the repository metadata: |
| 210 | + |
| 211 | + ```text |
| 212 | + apt-get update |
| 213 | + ``` |
| 214 | + |
| 215 | +6. Install DEB package: |
| 216 | + |
| 217 | + ```text |
| 218 | + apt-get install edb-odbc |
| 219 | + apt-get install edb-odbc-dev |
| 220 | + ``` |
| 221 | + |
| 222 | +## Using the Graphical Installer to Install the Connector |
| 223 | + |
| 224 | +You can use the EDB Connectors Installation wizard to add the ODBC connector to your system; the wizard is available at the [EDB website](https://www.enterprisedb.com/software-downloads-postgres/). |
| 225 | + |
| 226 | +Download the installer, and then, right-click on the installer icon, and select `Run As Administrator` from the context menu. |
| 227 | + |
| 228 | +When the `Language Selection` popup opens, select an installation language and click `OK` to continue to the `Setup` window (shown in Figure below). |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | +The ODBC Connectors Installation wizard. |
| 233 | + |
| 234 | +Click `Next` to continue. |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | +The Installation dialog |
| 239 | + |
| 240 | +Use the `Installation Directory` dialog to specify the directory in which the connector will be installed, and click `Next` to continue. |
| 241 | + |
| 242 | + |
| 243 | + |
| 244 | +The Ready to Install dialog. |
| 245 | + |
| 246 | +Click `Next` on the `Ready to Install` dialog to start the installation; popup dialogs confirm the progress of the installation wizard. |
| 247 | + |
| 248 | + |
| 249 | +ß |
| 250 | +he installation is complete. |
| 251 | + |
| 252 | +When the wizard informs you that it has completed the setup, click the `Finish` button to exit the dialog. |
| 253 | + |
| 254 | +You can also use StackBuilder Plus to add or update the connector on an existing Advanced Server installation; to open StackBuilder Plus, select `StackBuilder Plus` from the `Windows Apps` menu or through Linux `Start` menu. |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | +Starting StackBuilder Plus |
| 259 | + |
| 260 | +When StackBuilder Plus opens, follow the onscreen instructions. Select the `EnterpriseDB ODBC Connector` option from the `Database Drivers` node of the tree control. |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | +Selecting the Connectors installer. |
| 265 | + |
| 266 | +Follow the directions of the onscreen wizard to add or update an installation of the EDB Connectors. |
0 commit comments