SiteWhereprovides many options for installation depending on userrequirements. There are options for running SiteWhere locally or invarious cloud environments. 安装SiteWhere
SiteWhere根据客户需求提供了多种安装选择,可以在本地主机上安装,也可以在多种云环境中安装。
InstallingLocally on Linux
InstallingSiteWhere locally with the default configuration requires threecomponents: a SiteWhere server distribution, a MongoDB instance, andan MQTT broker. The following steps can
be executed on a new Ubuntu14.04 (or similar) instance. Similar commands should work on otherLinux/Unix variants.
在本地linux环境中安装
sitewhere本地安装在缺省配置情况下需要三个组件,sitewhere服务器版本,MongoDB和MQTT代理。下面是在ubuntu14.04上的安装步骤,其他linux/unix版本应该类似。
UpdateComponents and Install Required Tools
Startby making sure the Ubuntu instance is running the latest versions ofits included software. Also, the following steps will install theunzip command and a JDK.
更新组件和安装工具
确保ubuntu及相关的软件是最新的,下面是unzip和JDK安装步骤。
sudo su
add-apt-repository ppa:openjdk-r/ppa
apt-get update -y
apt-get install unzip openjdk-8-jdk InstallMongoDB for Persistence
Thedefault SiteWhere configuration uses MongoDB for persistence ofdevice management and event data. Other persistence stores such asApache HBase and InfluxDB may also be used. The
commands below willinstall MongoDB with the default settings.
Thedefault SiteWhere configuration uses MQTT for receiving device eventdata and sending device commands. HiveMQ provides a free edition witha limited number of connections that works
well for most situations.
安装HiveMQMQTT代理
sitewhere默认使用MQTT作为接受设备事件数据和发送设备指令。HiveMQ是免费版本,在连接性方面有限制,但大部分情况都能满足要求。
cd /opt
wget --content-disposition https://s3.amazonaws.com/sitewhere-hivemq/hivemq-3.0.2.zip
unzip hivemq-3.0.2.zip
wget --content-disposition https://s3.amazonaws.com/sitewhere-hivemq/config.xml
mv config.xml hivemq-3.0.2/conf
cd hivemq-3.0.2/bin
./run.sh &
HiveMQ is run asa background task. Pressenter a to return to acommand prompt.
hiveMQ在后台运行,按enter进入命令行操作。
Installa SiteWhere Server Release
Thesesteps will download a SiteWhere distribution from the communitywebsite and install it locally.
安装sitewhere服务器版本
下载sitewhere安装。
cd /opt
wget https://s3.amazonaws.com/sitewhere/sitewhere-server-1.6.0.tgz
tar -zxvf sitewhere-server-1.6.0.tgz
mv sitewhere-server-1.6.0 /opt/sitewhere
export CATALINA_HOME=/opt/sitewhere
cd /opt/sitewhere/bin
chmod +x *.sh
sh startup.sh