--- title: Installing InfluxDB menu: influxdb_1_4: name: Installing weight: 10 parent: intro-1-4 --- This page provides directions for installing, starting, and configuring InfluxDB. ## Requirements Installation of the InfluxDB package may require `root` or administrator privileges in order to complete successfully. ### Networking By default, InfluxDB uses the following network ports: - TCP port `8086` is used for client-server communication over InfluxDB's HTTP API - TCP port `8088` is used for the RPC service for backup and restore In addition to the ports above, InfluxDB also offers multiple plugins that may require [custom ports](/influxdb/v1.4/administration/ports/). All port mappings can be modified through the [configuration file](/influxdb/v1.4/administration/config), which is located at `/etc/influxdb/influxdb.conf` for default installations. ### NTP InfluxDB uses a host's local time in UTC to assign timestamps to data and for coordination purposes. Use the Network Time Protocol (NTP) to synchronize time between hosts; if hosts' clocks aren't synchronized with NTP, the timestamps on the data written to InfluxDB can be inaccurate. ## Installation For users who don't want to install any software and are ready to use InfluxDB, you may want to check out our [managed hosted InfluxDB offering](https://cloud.influxdata.com). {{< tabs-wrapper >}} {{% tabs %}} [Ubuntu & Debian](#) [Red Hat & CentOS](#) [SLES & openSUSE](#) [FreeBSD/PC-BSD](#) [macOS](#) {{% /tabs %}} {{% tab-content %}} For instructions on how to install the Debian package from a file, please see the [downloads page](https://influxdata.com/downloads/). Debian and Ubuntu users can install the latest stable version of InfluxDB using the `apt-get` package manager. For Ubuntu users, add the InfluxData repository with the following commands: ```bash curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/lsb-release echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list ``` For Debian users, add the InfluxData repository: ```bash curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/os-release test $VERSION_ID = "7" && echo "deb https://repos.influxdata.com/debian wheezy stable" | sudo tee /etc/apt/sources.list.d/influxdb.list test $VERSION_ID = "8" && echo "deb https://repos.influxdata.com/debian jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list test $VERSION_ID = "9" && echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list ``` Then, install and start the InfluxDB service: ```bash sudo apt-get update && sudo apt-get install influxdb sudo service influxdb start ``` Or if your operating system is using systemd (Ubuntu 15.04+, Debian 8+): ```bash sudo apt-get update && sudo apt-get install influxdb sudo systemctl start influxdb ``` {{% /tab-content %}} {{% tab-content %}} For instructions on how to install the RPM package from a file, please see the [downloads page](https://influxdata.com/downloads/). Red Hat and CentOS users can install the latest stable version of InfluxDB using the `yum` package manager: ```bash cat <}} ## Configuration The system has internal defaults for every configuration file setting. View the default configuration settings with the `influxd config` command. Most of the settings in the local configuration file (`/etc/influxdb/influxdb.conf`) are commented out; all commented-out settings will be determined by the internal defaults. Any uncommented settings in the local configuration file override the internal defaults. Note that the local configuration file does not need to include every configuration setting. There are two ways to launch InfluxDB with your configuration file: * Point the process to the correct configuration file by using the `-config` option: ```bash influxd -config /etc/influxdb/influxdb.conf ``` * Set the environment variable `INFLUXDB_CONFIG_PATH` to the path of your configuration file and start the process. For example: ``` echo $INFLUXDB_CONFIG_PATH /etc/influxdb/influxdb.conf influxd ``` InfluxDB first checks for the `-config` option and then for the environment variable. See the [Configuration](/influxdb/v1.4/administration/config/) documentation for more information. ### Data & WAL Directory Permissions Make sure the directories in which data and the [write ahead log (WAL)](/influxdb/v1.4/concepts/glossary/#wal-write-ahead-log) are stored are writable for the user running the `influxd` service. > **Note:** If the data and WAL directories are not writable, the `influxd` service will not start. Information about `data` and `wal` directory paths is available in the [Data settings](/influxdb/v1.4/administration/config/#data-settings-data) section of the [Configuring InfluxDB](/influxdb/v1.4/administration/config/) documentation. ## Hosting on AWS ### Hardware We recommend using two SSD volumes. One for the `influxdb/wal` and one for the `influxdb/data`. Depending on your load each volume should have around 1k-3k provisioned IOPS. The `influxdb/data` volume should have more disk space with lower IOPS and the `influxdb/wal` volume should have less disk space with higher IOPS. Each machine should have a minimum of 8G RAM. We’ve seen the best performance with the R4 class of machines, as they provide more memory than either of the C3/C4 class and the M4 class. ### Configuring the Instance This example assumes that you are using two SSD volumes and that you have mounted them appropriately. This example also assumes that each of those volumes is mounted at `/mnt/influx` and `/mnt/db`. For more information on how to do that see the Amazon documentation on how to [Add a Volume to Your Instance](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html). ### Config File You'll have to update the config file appropriately for each InfluxDB instance you have. ``` ... [meta] dir = "/mnt/db/meta" ... ... [data] dir = "/mnt/db/data" ... wal-dir = "/mnt/influx/wal" ... ... [hinted-handoff] ... dir = "/mnt/db/hh" ... ``` ### Permissions When using non-standard directories for InfluxDB data and configurations, also be sure to set filesystem permissions correctly: ```bash chown influxdb:influxdb /mnt/influx chown influxdb:influxdb /mnt/db ```