Differenze tra le versioni di "Gruppo Meteo/HowTo/server"
Riga 25: | Riga 25: | ||
service rabbitmq-server restart | service rabbitmq-server restart | ||
+ | |||
+ | == mosquitto == | ||
+ | todo | ||
+ | === mosquitto-auth-plug === | ||
+ | Riferirsi a: | ||
+ | https://github.com/jpmens/mosquitto-auth-plug | ||
+ | |||
+ | copiare i sorgenti in locale | ||
+ | |||
+ | creare config.mk come segue: | ||
+ | |||
+ | # Select your backends from this list | ||
+ | BACKEND_CDB ?= no | ||
+ | BACKEND_MYSQL ?= no | ||
+ | BACKEND_SQLITE ?= no | ||
+ | BACKEND_REDIS ?= no | ||
+ | BACKEND_POSTGRES ?= no | ||
+ | BACKEND_LDAP ?= no | ||
+ | BACKEND_HTTP ?= yes | ||
+ | |||
+ | # Specify the path to the Mosquitto sources here | ||
+ | MOSQUITTO_SRC = | ||
+ | |||
+ | # Specify the path the OpenSSL here | ||
+ | OPENSSLDIR = /usr | ||
+ | |||
+ | poi: | ||
+ | |||
+ | make | ||
+ | mkdir /var/lib/mosquitto/plugins | ||
+ | cp auth-plug.so /var/lib/mosquitto/plugins/ | ||
+ | |||
+ | |||
+ | creare il file /etc/mosquitto/conf.d/rmap.conf | ||
+ | |||
+ | auth_plugin /var/lib/mosquitto/plugins/auth-plug.so | ||
+ | auth_opt_backends http | ||
+ | auth_opt_http_hostname localhost | ||
+ | auth_opt_http_ip 127.0.0.1 | ||
+ | auth_opt_http_port 80 | ||
+ | auth_opt_http_getuser_uri /auth/auth | ||
+ | auth_opt_http_superuser_uri /auth/superuser | ||
+ | auth_opt_http_aclcheck_uri /auth/acl | ||
+ | |||
+ | restart server: | ||
+ | |||
+ | service mosquitto restart | ||
== server ports == | == server ports == |
Versione delle 10:44, 24 nov 2014
Installazione
rabbitmq-server
todo
rabbitmq_auth_backend_http
fare riferimento a https://github.com/simonmacmullen/rabbitmq-auth-backend-http
Sacricare il plugin da qui http://www.rabbitmq.com/community-plugins.html e metterlo in:
/usr/lib/rabbitmq/lib/rabbitmq_server-3.3.5/plugins/
attivarlo con:
rabbitmq-plugins enable rabbitmq_auth_backend_http
aggiungere in /etc/rabbitmq/rabbitmq.config
[ {rabbit, [{auth_backends, [rabbit_auth_backend_http]}]}, {rabbitmq_auth_backend_http, [{user_path, "http://localhost:8000/auth/user"}, {vhost_path, "http://localhost:8000/auth/vhost"}, {resource_path, "http://localhost:8000/auth/resource"}]} ].
service rabbitmq-server restart
mosquitto
todo
mosquitto-auth-plug
Riferirsi a: https://github.com/jpmens/mosquitto-auth-plug
copiare i sorgenti in locale
creare config.mk come segue:
# Select your backends from this list BACKEND_CDB ?= no BACKEND_MYSQL ?= no BACKEND_SQLITE ?= no BACKEND_REDIS ?= no BACKEND_POSTGRES ?= no BACKEND_LDAP ?= no BACKEND_HTTP ?= yes # Specify the path to the Mosquitto sources here MOSQUITTO_SRC = # Specify the path the OpenSSL here OPENSSLDIR = /usr
poi:
make mkdir /var/lib/mosquitto/plugins cp auth-plug.so /var/lib/mosquitto/plugins/
creare il file /etc/mosquitto/conf.d/rmap.conf
auth_plugin /var/lib/mosquitto/plugins/auth-plug.so auth_opt_backends http auth_opt_http_hostname localhost auth_opt_http_ip 127.0.0.1 auth_opt_http_port 80 auth_opt_http_getuser_uri /auth/auth auth_opt_http_superuser_uri /auth/superuser auth_opt_http_aclcheck_uri /auth/acl
restart server:
service mosquitto restart
server ports
* 22 ssh * 80 webserver * 443 monit web server * 1883 8883 MQTT * 5672 amqp * 2003 carbon-cache * 5925 borinud * 15672 rabbitmq_management * 8090 arkimet
graphite Fedora 20 fast start
yum install graphite-web python-carbon
python /usr/lib/python2.7/site-packages/graphite/manage.py syncdb
service carbon-cache start
python /usr/lib/python2.7/site-packages/graphite/manage.py runserver
python /usr/share/doc/graphite-web/example-client.py
firefox http://127.0.0.1:8000/dashboard/
Start and test graphite interface
Start mqtt2graphite and view the graphite graphs on http://server_ip/
mqtt2graphited run
2014-07-08 23:28:08,051 Starting MQTT2Graphite_5966-localhost.localdomain
2014-07-08 23:28:08,055 INFO MODE 2014-07-08 23:28:08,084 DEBUG MODE 2014-07-08 23:28:08,213 Connected to broker at localhost as MQTT2Graphite_5966-localhost.localdomain 2014-07-08 23:28:08,253 Subscribing to topic meteo/# 2014-07-08 23:28:08,312 pubblish {'carbon_port': 2003, 'map': {'meteo/#': ('j', None)}, 'sock': <socket._socketobject object at 0xb6a9e9d0>, 'carbon_server': '127.0.0.1'} with id 1 2014-07-08 23:28:08,363 Subscribed: 2 (0,) 2014-07-08 23:28:08,409 CARBONKEY is [meteo.-.1012345_4412345.generic.-_-_-.-_-_-_-.B07030] 2014-07-08 23:28:09,834 meteo.-.1012345_4412345.generic.-_-_-.-_-_-_-.B07030.v 400.000000 1404854888 2014-07-08 23:28:09,863 CARBONKEY is [meteo.-.1137637_4449216.generic.-_-_-.-_-_-_-.B07030] 2014-07-08 23:28:09,926 meteo.-.1137637_4449216.generic.-_-_-.-_-_-_-.B07030.v 400.000000 1404854889 2014-07-08 23:28:11,133 CARBONKEY is [meteo.-.1137637_4449216.generic.254_0_0.103_3000_-_-.B12101] 2014-07-08 23:28:11,155 meteo.-.1137637_4449216.generic.254_0_0.103_3000_-_-.B12101.v 30115.000000 1404854891 2014-07-08 23:28:16,687 CARBONKEY is [meteo.-.1137637_4449216.generic.254_0_0.103_3000_-_-.B12101] 2014-07-08 23:28:16,733 meteo.-.1137637_4449216.generic.254_0_0.103_3000_-_-.B12101.v 30121.000000 1404854896 2014-07-08 23:28:24,895 CARBONKEY is [meteo.-.1137637_4449216.generic.254_0_0.103_3000_-_-.B12101] 2014-07-08 23:28:24,933 meteo.-.1137637_4449216.generic.254_0_0.103_3000_-_-.B12101.v 30121.000000 1404854904