Sitewhere物联网云平台安装

InstallingSiteWhere

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服务器版本,MongoDBMQTT代理。下面是在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及相关的软件是最新的,下面是unzipJDK安装步骤。

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.



安装MongoDB作为持久数据存储

sitewhere缺省配置是使用mongodb作为设备管理和事件数据的持久存储。也可以使用ApacheHbaseinfluxDB作为数据持久存储。下面安装mongodb



sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
apt-get update
apt-get install -y mongodb-org
echo "mongodb-org hold" | sudo dpkg --set-selections
echo "mongodb-org-server hold" | sudo dpkg --set-selections
echo "mongodb-org-shell hold" | sudo dpkg --set-selections
echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
echo "mongodb-org-tools hold" | sudo dpkg --set-selections
service mongod start

Installthe HiveMQ MQTT Broker

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


总结:按照以上安装过程很流畅,存在的一个问题是
wget https://s3.amazonaws.com/sitewhere/sitewhere-server-1.6.0.tgz,从amazon s3上下载软件包不容易,
主要是无法建立SSL连接。尝试了 wget --no-certificate ... 和curl -O -L ...都是下载一半断开。
最后有一个办法解决了,使用迅雷下载器下载,结果速度还是很快。
上几张安装后的图:






评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值