绑定完请刷新页面
取消
刷新

分享好友

×
取消 复制
Sitewhere物联网云平台安装
2022-04-24 11:28:58

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 7F0CEB1
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


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

来源 https://blog.csdn.net/yingcloud/article/details/51059089?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165076954316782388078446%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165076954316782388078446&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-24-51059089.nonecase&utm_term=SiteWhere&spm=1018.2226.3001.4450
分享好友

分享这个小栈给你的朋友们,一起进步吧。

SiteWhere
创建时间:2022-04-24 11:04:49
SiteWhere
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

技术专家

查看更多
  • itt0918
    专家
戳我,来吐槽~