i Sitewhere物联网云平台安装-IoT云平台-电子人社区 -

电子人社区

 找回密码
 立即注册

今日 : 0|主题 : 94|排名 : 312 
打印 上一主题 下一主题

Sitewhere物联网云平台安装

发表于 2016-4-10 13:58:33 | 394600 只看该作者 回帖奖励 |倒序浏览 |阅读模式

[复制链接]
发表于 2016-4-10 13:58:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
电子人社区网讯:

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 ...都是下载一半断开。
最后有一个办法解决了,使用迅雷下载器下载,结果速度还是很快。
上几张安装后的图:






来源:CSDN

 

                                                   转载请注明:电子人社区

0条回复
跳转到指定楼层

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|电子人物联网  

Copyright 2013 最新最精彩-社区论坛 版权所有 All Rights Reserved.

QQ|电子人物联网  

GMT+8, 2024-5-3 22:28 , Processed in 0.109174 second(s), 37 queries.

快速回复 返回顶部 返回列表