-->

Fiware Orion context Broker on Ubuntu

2019-02-25 16:10发布

问题:

I am willing to install a Orion context broker standalone instance on a Ubuntu 12.04 Server using an image from FiWare Cloud.

Looks like orion contextBroker is supporting mostly CentOS and it is distributed either a rpm package nor yum repository nor from sources directly (option that I would like to avoid if it is possible)

There is some documentation / resource where can I learn from? This is all I could find: https://github.com/telefonicaid/fiware-orion/issues?q=is%3Aissue+is%3Aopen+ubuntu

thanks

回答1:

Orion Context Broker works on Ubuntu but currently there is no .deb available so you need to build from sources. The repository even include an init.d script for Ubuntu may be useful.

However, our DevOps team is working right now on the .deb packaging tooling, so probably we have new on this soon. This answer will be edited when that happens.

UPDATE: at the end the plan to create a .deb package was dropped out and by the time being (March 2017) there isn't any new plan about it. However, FIWARE Orion is a open source community driver project, so if you want to contribute in that sense, don't hesitate to propose the needed changes to the repository (as pull requests).



回答2:

the last post from Feb 2015 promises a Orion Context Broker.deb-Package. As fas the post is not updated till then I guess there is still no such .deb-Package right?

Such a .deb-Package would be very helpful cause -- since the statement Orion Context Broker runs/works on Ubuntu might be right but -- to install and get it run is not a peace of cake (any more) cause of outdated and unavailable libraries and other dependencies (see this).

At least to get some up to date information about the status of this objective (.deb-Package for Orion Context Broker) would be nice as this forum is named as the official way to communicate.



回答3:

Instructions to install FIWARE Orion on Ubuntu (obtained by trial and error methodology applied on Ubuntu 14.04):

  1. git clone https://github.com/telefonicaid/fiware-orion
  2. sudo apt-get install libcurl4-gnutls-dev
  3. if you Ubuntu< 17.04 or > 17.04: open the file CMakeLists.txt, find the following code (near line 80) IF (${DISTRO} STREQUAL "Ubuntu_17.04") set (CMAKE_CXX_FLAGS "-Wall -Wno-unknown-pragmas -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -fno-var-tracking-assignments") ELSE() set (CMAKE_CXX_FLAGS "-Wall -Wno-unknown-pragmas -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -Werror -fno-var-tracking-assignments") ENDIF ()
  4. remove "-Werror" from the second set

  5. sudo apt-get install libmicrohttpd-dev

  6. sudo apt-get install mongodb-clients
  7. sudo apt-get install mongodb-dev
  8. sudo apt-get install mongodb-server
  9. install boost

    • wget https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.bz2
    • tar --bzip2 -xf boost_1_65_1.tar.bz2
    • cd boost_1_65_1
    • sudo apt-get update
    • sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev
    • ./bootstrap.sh --prefix=/usr/local
    • Find the maximum number of physical cores:

    n=cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}'

    • sudo ./b2 --with=all -j $n install
    • Add /usr/local/lib to your LD LIBRARY PATH:

    sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf'

    • sudo ldconfig
  10. install mongo-cxx-driver

    • 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 apt-get install scons
    • scons
    • sudo scons install --prefix=/usr/local
  11. install rapidjson:

    • on ubuntu >=15.04: sudo apt-get install rapidjson-dev
    • on ubuntu < 15.04: git clone git://github.com/miloyip/rapidjson sudo cp -r rapidjson/include/rapidjson /usr/include/rapidjson
  12. cd fiware-orion

  13. make
  14. sudo make install INSTALL_DIR=/usr
  15. Check that everything is ok, invoking the broker version message:
    • contextBroker --version