Pages

Friday, 25 March 2022

Install InfluxDB

The InfluxDB 2.1 time series platform is purpose-built to collect, store, process and visualize metrics and events. Download, install, and set up InfluxDB OSS.

Install InfluxDB v2.1

Do one of the following:

InfluxDB and the influx CLI are separate packages

The InfluxDB server (influxd) and the influx CLI are packaged and versioned separately. For information about installing the influx CLI, see Install and use the influx CLI.

Use Homebrew

We recommend using Homebrew to install InfluxDB v2.1 on macOS:

brew update
brew install influxdb

Homebrew also installs influx-cli as a dependency. For information about using the influx CLI, see the influx CLI reference documentation.

Manually download and install

To download the InfluxDB v2.1 binaries for macOS directly, do the following:

  1. Download the InfluxDB package.

    InfluxDB v2.1 (macOS)

  2. Unpackage the InfluxDB binary.

    Do one of the following:

    • Double-click the downloaded package file in Finder.
    • Run the following command in a macOS command prompt application such Terminal or iTerm2:
    # Unpackage contents to the current working directory
    tar zxvf ~/Downloads/influxdb2-2.1.1-darwin-amd64.tar.gz
    
  3. (Optional) Place the binary in your $PATH

    # (Optional) Copy the influxd binary to your $PATH
    sudo cp influxdb2-2.1.1-darwin-amd64/influxd /usr/local/bin/
    

    If you do not move the influxd binary into your $PATH, prefix the executable ./ to run it in place.

Recommended – Verify the authenticity of downloaded binary

Both InfluxDB 1.x and 2.x have associated influxd and influx binaries. If InfluxDB 1.x binaries are already in your $PATH, run the 2.1 binaries in place or rename them before putting them in your $PATH. If you rename the binaries, all references to influxd and influx in this documentation refer to your renamed binaries.

Networking ports

By default, InfluxDB uses TCP port 8086 for client-server communication over the InfluxDB HTTP API.

Start InfluxDB

Start InfluxDB by running the influxd daemon:

influxd

Run InfluxDB on macOS Catalina

macOS Catalina requires downloaded binaries to be signed by registered Apple developers. Currently, when you first attempt to run influxd, macOS will prevent it from running. To manually authorize the influxd binary:

  1. Attempt to run influxd.
  2. Open System Preferences and click Security & Privacy.
  3. Under the General tab, there is a message about influxd being blocked. Click Open Anyway.

We are in the process of updating our build process to ensure released binaries are signed by InfluxData.

“too many open files” errors

After running influxd, you might see an error in the log output like the following:

too many open files

To resolve this error, follow the recommended steps to increase file and process limits for your operating system version then restart influxd.

See the influxd documentation for information about available flags and options.

InfluxDB “phone home”

By default, InfluxDB sends telemetry data back to InfluxData. The InfluxData telemetry page provides information about what data is collected and how it is used.

To opt-out of sending telemetry data back to InfluxData, include the --reporting-disabled flag when starting influxd.

influxd --reporting-disabled

Download and install the influx CLI

The influx CLI lets you manage InfluxDB from your command line.

Download and install the influx CLI

Set up InfluxDB

The initial setup process for InfluxDB walks through creating a default organization, user, bucket, and Operator API token. The setup process is available in both the InfluxDB user interface (UI) and in the influx command line interface (CLI).

Operator token permissions

The Operator token created in the InfluxDB setup process has full read and write access to all organizations in the database. To prevent accidental interactions across organizations, we recommend creating an All-Access token for each organization and using those to manage InfluxDB.

Set up InfluxDB through the UI

  1. With InfluxDB running, visit localhost:8086.
  2. Click Get Started

Set up your initial user

  1. Enter a Username for your initial user.
  2. Enter a Password and Confirm Password for your user.
  3. Enter your initial Organization Name.
  4. Enter your initial Bucket Name.
  5. Click Continue.

InfluxDB is now initialized with a primary user, organization, and bucket. You are ready to write or collect data.

(Optional) Set up and use the influx CLI

To avoid having to pass your InfluxDB API token with each influx command, set up a configuration profile to store your credentials. To do this, complete the following steps:

  1. In a terminal, run the following command:

    # Set up a configuration profile
    influx config create -n default \
      -u http://localhost:8086 \
      -o example-org \
      -t mySuP3rS3cr3tT0keN \
      -a
    

    This configures a new profile named default and makes the profile active so your influx CLI commands run against the specified InfluxDB instance. For more detail, see influx config.

  2. Learn influx CLI commands. To see all available influx commands, type influx -h or check out influx - InfluxDB command line interface.

After you’ve installed InfluxDB, you’re ready to get started working with your data in InfluxDB.

frm https://docs.influxdata.com/influxdb/v2.1/install/

No comments:

Post a Comment