Last updated: 2017-03-22 : Update to 1.2.2
The following assumes you're executing as a root user
yum update
yum install -y git
mkdir -p /opt/influx/{wal,data,ssl}
# devices maybe different for you so adjust accordingly
mkfs.ext4 /dev/sdb
mkfs.ext4 /dev/sdc
mount /dev/sdb /opt/influx/wal/
mount /dev/sdc /opt/influx/data/
# it may look something like this so your devices are mounted across restarts
/dev/sdb /opt/influx/wal ext4 defaults,nofail 0 2
/dev/sdc /opt/influx/data ext4 defaults,nofail 0 2
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.2.2.x86_64.rpm
yum localinstall influxdb-1.2.2.x86_64.rpm
chkconfig influxdb on
First, you need to download the certificate bundle on the influxdb host. Below is an example of sending from your local system.
# on your local
# scp the cert or download
# your cert needs to be bundle that combines the private key, your crt and certificate chain
# do so with something like below
cat privkey.pem mysite.crt mysite-ca-bundle.crt > bundle.pem
scp bundle.pem root@myhost:/tmp
Now, on the influx host, you can configure influxdb config
mv /tmp/bundle.pem /opt/influx/ssl/
chown -R influxdb:influxdb /opt/influx/
cp /etc/influxdb/influxdb.conf{,-bak}
sed -i s./var/lib/influxdb/meta./opt/influx/data/meta. /etc/influxdb/influxdb.conf
sed -i s./var/lib/influxdb/data./opt/influx/data/data. /etc/influxdb/influxdb.conf
sed -i s./var/lib/influxdb/wal./opt/influx/wal. /etc/influxdb/influxdb.conf
sed -i 's,# https-certificate = "/etc/ssl/influxdb.pem",https-certificate = "/opt/influx/ssl/bundle.pem",' /etc/influxdb/influxdb.conf
sed -i "s/# https-enabled = false/https-enabled = true/" /etc/influxdb/influxdb.conf
/etc/init.d/influxdb start # start with auth-enabled = false
Now, connect to the influxdb and configure the users. We'll configure one admin user and one non-admin user.
influx
> create user superadmin with password 'my_password' with all privileges
> create user nonadmin with password 'na_password'
> grant all on tsdb_stage to nonadmin
> grant READ on tsdb_prod to nonadmin
> grant WRITE on tsdb_dev to nonadmin
Once you have created necessary users, you can re-enable the authentication. You could have chosen to just create admin user first and then create non-admin users after enabling authentication to reduce the window of keeping your influxdb wide open.
/etc/init.d/influxdb stop
sed -i "s/# auth-enabled = false/auth-enabled = true/" /etc/influxdb/influxdb.conf
/etc/init.d/influxdb start
That should be all for getting the influxdb up and running on Amazon Linux.