Tutorial: Installing LoopBack connectors
This tutorial shows you how to install a LoopBack data source connector manually by using the command line in IBM® API Connect Version 5.0.6 and earlier.
Before you begin
To install a data source connector, you must be able to run an npm install
command, which requires a connection to the internet. Alternatively, you can configure a private npm
repository.
The Oracle, DB2, and SQLLite connectors require C compiler tools to build and install binary extensions. The exact requirements depend on your operating system. Once you have installed compiler tools, you can install the connector following the instructions in the following procedure.
- Microsoft .NET Framework 4.0
- Visual
Studio. Use Visual Studio Community unless you want purchase Visual Studio Enterprise.
Run the installer, check "Visual C++" under "Programming Languages", and accept the default
installation location. Note: The Visual Studio installation can take a long time.
- Windows SDK. If the installation fails, look for C++ 2010 x64&x86 Redistributable in your installed programs and uninstall it.
- Python 2.7.10.
- Version 3 of npm. Enter the following command:
npm install -g npm
Then ensure thenpm
command uses the correct version:npm -v
If the version shown is not 3.x.x, then edit your system PATH to ensure that
C:\Users\username\AppData\Roaming\npm
supersedes any other entries. - For 64-bit builds of Node.js and native modules you also need the Windows 7 64-bit SDK. If the installation fails, try uninstalling any C++ 2010 x64&x86 redistributable that you have installed first. If you get errors that the 64-bit compilers are not installed you may also need the compiler update for the Windows SDK 7.1.
You must have the command-line developer tools (or full installation of Xcode) and Python.
Click Install to install the command-line developer tools only. Alternatively, you can click Get Xcode to install the full Xcode product, but doing this can take a long time.
Python is also required. Most versions of OSX come with Python by default. If for some reason you don't have it, download and install Python.
Many Linux® systems come with the necessary tools. The specific requirements are:
- Python version 2.7. NOTE: version 3.x is not supported.
-
make
- A C/C++ compiler toolchain, like GCC. NOTE: g++ version 4.2 or later is required.
apt-get install build-essential
About this task
Before you can use a LoopBack data source to access data in a backend system such as a database, you must install the data source connector. The In-memory and email connectors are built-in to LoopBack®, so you don't need to install them. The command-line tool and API Designer will automatically prompt you to install connectors as needed, but you can also do it manually
Install a new data source connector manually by following these steps:
Procedure
Results
Installing the Oracle connector
About this task
- Follow the instructions in Installing the Oracle connector for your platform.
- If you prefer (or if you still have issues with the connector), install the LoopBack CLI by
using the comand:
Then enter the following command to install and troubleshoot the Oracle connector:npm install -g loopback-cli
This command determines if the connector is ready to use. If it is, the tool will print "Oracle connector is ready" and exit. Otherwise, it will prompt you to install Oracle Instant Client,lb oracle
loopback-connector-oracle
, and theoracledb
module. For more information, see Oracle installer command.