简体   繁体   中英

Best way to send Orion to background?

Literally from:

https://ask.fiware.org/question/86/best-way-to-send-orion-to-background/


Hi there,

I've installed Orion in a CentOS 6 as recommended in the documentation and I'm wondering how to run this on the background.

Running contextBroker, it stays in foreground:

[centos@oc-orion fiware-orion]$ contextBroker
INFO@15:04:54  contextBroker.cpp[1502]: Orion Context Broker is running
[centos@oc-orion fiware-orion]$ INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  mongoConnectionPool.cpp[196]: Successful connection to database
INFO@15:04:54  contextBroker.cpp[1282]: Connected to mongo at localhost:orion
INFO@15:04:54  MongoGlobal.cpp[2856]: Database Operation Successful ({})
INFO@15:04:54  MongoGlobal.cpp[504]: Database Operation Successful ({ conditions.type: "ONTIMEINTERVAL" })
INFO@15:04:54  contextBroker.cpp[1590]: Startup completed
INFO@15:05:04  MongoGlobal.cpp[2856]: Database Operation Successful ({})

I've been thinking on running this with supervisor or similar, but not sure...any ideas?

Thanks!

In fact, running Orion just using contextBroker runs the process in background (note that algthough the standard output is printed in the same terminal where the command was issued, that doesn't mean that the process runs in foreground). In order to run in foreground, use the -fg CLI argument.

The proper way of running Orion in background in CentOS 6 is as service (I'm assuming that you installed Orion as RPM):

/etc/init.d/contextBroker start

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM