一、文件准備
1.1 文件名稱
influxdb-1.2.2.x86_64.rpm
1.2 下載地址
https://portal.influxdata.com/downloads
【注意、注意、注意】下載時可能需要FanQiang
二、工具准備
2.1 Xshell
一個強大的安全終端模擬軟件,它支持SSH1, SSH2, 以及Microsoft Windows 平台的TELNET 協議。
Xshell 通過互聯網到遠程主機的安全連接以及它創新性的設計和特色幫助用戶在復雜的網絡環境中享受他們的工作。
三、部署圖
由於InfluxDb集群版是收費的,而單機版是開源的,所以我們目前只部署單機版
四、InfluxDb安裝
以下操作,均使用root用戶
4.1 通過Xshell連接到虛擬機,執行如下命令:
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.2.2.x86_64.rpm
sudo yum localinstall influxdb-1.2.2.x86_64.rpm
五、InfluxDb配置文件
InfluxDb配置文件,存放在/etc/influxdb/influxdb.conf
詳細配置參考:https://docs.influxdata.com/influxdb/v1.2/administration/config/
主要修改點如下所示:
5.1 端口設置
InfluxDb默認使用如下網絡端口:
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
【注意、注意、注意】 如果你也安裝了Hadoop並且啟動了,yarn的Web端口也是8088,會導致influxdb啟動不起來!!!
在influxdb.conf中的全局部分,增加如下紅字所示部分:
# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com # The data includes a random ID, os, arch, version, the number of series and other # usage data. No data from user databases is ever transmitted. # Change this option to true to disable reporting. reporting-disabled =true bind-address = ":8087"
【注意、注意、注意】如上所示,influxdb每隔24小時,會收集你機器上的一些信息,然后上報到usage.influxdata.com,果斷關閉!
8083是Influxdb的Web界面管理端口,這個在1.1+版本是默認關閉的,需要手動打開:
[admin] # Determines whether the admin service is enabled. enabled = true # The default bind address used by the admin service. bind-address = ":8083"
六、InfluxDb操作
6.1 啟動InfluxDb
執行命令:systemctl start influxdb
或者:influxd
6.2 查看InfluxDb狀態
執行命令:systemctl status influxdb
6.2 停止InfluxDb
執行命令:systemctl stop influxdb
七、瀏覽器訪問InfluxDb
瀏覽器中輸入:http://10.10.0.1:8083