-
Notifications
You must be signed in to change notification settings - Fork 478
Installation
There are two different versions of Mongo Connector you can install. There is the version on PyPi that is available to Python via tools such as pip and setuptools, and there is the development version available on Github. In general, we recommend using the version on PyPi, since it is easier to install and more likely to be stable.
This installs the version from PyPi:
pip install mongo-connector
The install command can be customized to include the doc managers and any other extra dependencies for your target system.
Target System | Install Command |
---|---|
MongoDB | pip install mongo-connector |
Elasticsearch 1.x | pip install 'mongo-connector[elastic]' |
Amazon Elasticsearch 1.x Service | pip install 'mongo-connector[elastic-aws]' |
Elasticsearch 2.x | pip install 'mongo-connector[elastic2]' |
Amazon Elasticsearch 2.x Service | pip install 'mongo-connector[elastic2-aws]' |
Elasticsearch 5.x | pip install 'mongo-connector[elastic5]' |
Solr | pip install 'mongo-connector[solr]' |
To get the latest development version:
cd your/installation/directory
git clone https://github.com/mongodb-labs/mongo-connector.git
cd mongo-connector
python setup.py install
You can make mongo-connector
run as a Linux daemon that is started when your system boots. Simply follow these steps after installing from Github:
- Edit config.json to your liking.
- Run
python setup.py install_service
. - Run
chmod +x /etc/init.d/mongo-connector
or chmod +x script/mongo-connector before step 2. -
update-rc.d mongo-connector defaults
to make sure the boot config is updated. If Elasticsearch is installed, we should start mongo-connector after Elasticsearch withupdate-rc.d mongo-connector defaults 96 20
.
This creates a "mongo-connector" entry in /etc/init.d and copies the "config.json" file to /etc/mongo-connector.json. This has been tested so far on Fedora, Debian, and CentOS but should work on similar systems.
To remove mongo-connector
as a Linux daemon, do python setup.py uninstall_service
. This removes /etc/init.d/mongo-connector and /etc/mongo-connector.json.