我一直在尝试在Ubuntu 16.04中安装Orion Context Broker,为此我尝试构建代理的源代码,但没有成功。有人能告诉我最好的方法吗?如何配置Fiware软件包以与apt-get一起使用?
感谢您的帮助!
答案 0 :(得分:1)
安装Orion的最佳方法是使用Docker。 (https://hub.docker.com/r/fiware/orion/)。
Docker和docker-compose。你可以快速安装Orion和Mongodb。 (https://github.com/telefonicaid/fiware-orion/tree/master/docker)
答案 1 :(得分:0)
我刚刚使用Ubuntu 16.04从虚拟机的源代码安装了代理。 幸运的是我保存了以下步骤:)
sudo apt-get install emacs
sudo apt-get install aptitude
sudo apt-get install git
cd
mkdir git
cd git
git clone https://github.com/telefonicaid/fiware-orion.git
cd fiware-orion
#
# To compile the broker, install the following packages:
#
sudo aptitude install cmake
sudo aptitude install g++
sudo aptitude install libcurl4-openssl-dev
sudo aptitude install uuid-dev
sudo aptitude install libgnutls-dev
sudo aptitude install libgcrypt-dev
sudo aptitude install scons
sudo aptitude install libboost-dev
sudo aptitude install libboost-regex-dev
sudo aptitude install libboost-thread-dev
sudo aptitude install libboost-filesystem-dev
#
# Install MHD, from source
#
sudo mkdir /opt/libmicrohttpd
sudo chown <user>:<group> /opt/libmicrohttpd
cd /opt/libmicrohttpd
wget http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.48.tar.gz
tar xvf libmicrohttpd-0.9.48.tar.gz
cd libmicrohttpd-0.9.48
./configure --disable-messages --disable-postprocessor --disable-dauth
make
sudo make install
sudo ldconfig
#
# Install mongo client, from source
#
sudo mkdir /opt/mongodb
sudo chown <user>:<group> /opt/mongodb
cd /opt/mongodb
wget https://github.com/mongodb/mongo-cxx-driver/archive/legacy-1.1.2.tar.gz
tar xfvz legacy-1.1.2.tar.gz
cd mongo-cxx-driver-legacy-1.1.2
sudo scons install --prefix=/usr/local --disable-warnings-as-errors
#
# Install rapidjson, from source
#
sudo mkdir /opt/rapidjson
sudo chown <user>:<group> /opt/rapidjson
cd /opt/rapidjson
wget https://github.com/miloyip/rapidjson/archive/v1.0.2.tar.gz
tar xfvz v1.0.2.tar.gz
sudo mv rapidjson-1.0.2/include/rapidjson/ /usr/local/include
#
# Ready to compile the broker
# However, to install in privileged directories, we need to prepare a little first:
#
sudo touch /usr/bin/contextBroker
sudo touch /etc/default/contextBroker
sudo mkdir /etc/init.d/contextBroker
sudo chown <user>:<group> /usr/bin/contextBroker
sudo chown <user>:<group> /etc/default/contextBroker
sudo chown <user>:<group> /etc/init.d/contextBroker
#
# Now let's compile and install
#
cd ~/git/fiware-orion
make di
#
# Test
#
# You need two terminals for this:
# - One xterm to start the broker in (foreground)
# - One xterm to send a command to the broker, and see the result:
#
# (In xterm 1): contextBroker -fg
# (In xterm 2): curl localhost:1026/version
#
# The output should be similar to this:
#
# {
# "orion" : {
# "version" : "1.10.0-next",
# "uptime" : "0 d, 0 h, 0 m, 6 s",
# "git_hash" : "97623c4c001d56b5458c9ecc5b191ecb812ce257",
# "compile_time" : "nodate",
# "compiled_by" : "ken",
# "compiled_in" : "localhost",
# "release_date" : "nodate",
# "doc" : "https://fiware-orion.readthedocs.org/en/master/"
# }
# }
#