$ echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list
$ wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install prosody
admins = { "user@example.com" } -- modules_enabled = { -- Generally required "roster"; -- Allow users to have a roster. Recommended ;) "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in. "tls"; -- Add support for secure TLS on c2s/s2s connections "dialback"; -- s2s dialback support "disco"; -- Service discovery "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. -- Not essential, but recommended "private"; -- Private XML storage (for room bookmarks, etc.) "vcard"; -- Allow users to set vCards -- These are commented by default as they have a performance impact --"privacy"; -- Support privacy lists --"compression"; -- Stream compression (requires the lua-zlib package installed) -- Nice to have "version"; -- Replies to server version requests "uptime"; -- Report how long server has been running "time"; -- Let others know the time here on this server "ping"; -- Replies to XMPP pings with pongs "pep"; -- Enables users to publish their mood, activity, playing music and more "register"; -- Allow users to register on this server using a client and change passwords -- Admin interfaces "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands "admin_telnet"; -- Opens telnet console interface on localhost port 5582 } modules_disabled = { } allow_registration = false -- ssl = { -- ssl , key = "/etc/prosody/certs/localhost.key"; certificate = "/etc/prosody/certs/localhost.crt"; } c2s_require_encryption = true -- - s2s_secure_auth = false pidfile = "/var/run/prosody/prosody.pid" authentication = "internal_hashed" -- ( ) storage = "internal" -- log = { info = "/var/log/prosody/prosody.log"; error = "/var/log/prosody/prosody.err"; "*syslog"; } VirtualHost "example.com" -- jabber ssl = { -- key = "/etc/prosody/certs/example.com.key"; certificate = "/etc/prosody/certs/example.com.crt"; }
$ sudo prosodyctl cert generate example.com $ sudo cp /usr/lib/prosody/example.com* /etc/prosody/certs/
$ sudo prosodyctl register user example.com password $ sudo prosodyctl restart
_xmpp-client._tcp.example.com. 18000 IN SRV 0 5 5222 xmpp.example.com.
_xmpp-server._tcp.example.com. 18000 IN SRV 0 5 5269 xmpp.example.com.
jabber._tcp.example.com. 18000 IN SRV 0 5 5269 xmpp.example.com.
modules_enabled = { ... "message_logging"; ... }
plugin_paths = { "/usr/lib/prosody/modules", "/path/to/prosody-modules" } ... modules_enabled = { ... "message_logging"; ... }
$ prosodyctl restart
$ sudo apt-get install prosody-0.10
storage = "sql2"
--sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename. --sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" } --sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "", host = "localhost" }
$ sudo apt-get install lua-dbi-sqlite3
modules_enabled = { ... "mam"; ... }
plugin_paths = { "/usr/lib/prosody/modules", "/path/to/prosody-modules" } ... modules_enabled = { ... "mam"; ... }
$ prosodyctl restart
Source: https://habr.com/ru/post/207032/
All Articles