{"id":143,"date":"2014-12-15T15:07:55","date_gmt":"2014-12-15T12:07:55","guid":{"rendered":"http:\/\/andrushasblog.ru\/?p=143"},"modified":"2015-11-16T12:55:24","modified_gmt":"2015-11-16T09:55:24","slug":"%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-prosody-%d0%b8-%d0%bc%d0%b8%d0%b3%d1%80%d0%b0%d1%86%d0%b8%d1%8f-%d1%81-ejabberd","status":"publish","type":"post","link":"https:\/\/andrushasblog.ru\/?p=143","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Prosody \u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0441 ejabberd"},"content":{"rendered":"<p>\u0420\u0435\u0448\u0438\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0430\u043a\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0433\u043e Jabber-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0435\u043b\u0430\u0441\u044c \u043d\u0435 \u0441 \u043d\u0443\u043b\u044f, \u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043f\u0435\u0440\u0435\u0435\u0437\u0434 \u0441 ejabberd, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0435\u043f\u043b\u043e\u0445, \u043d\u043e \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u044f\u0436\u0451\u043b\u044b\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043b\u043e\u0445\u043e \u0441\u0435\u0431\u044f \u0432\u0451\u043b \u043d\u0430 Ubuntu 14.04.<\/p>\n<p>\u042f \u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0430\u043c\u0443\u044e \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e (\u0447\u0438\u0442\u0430\u0439 &#8212; \u0432\u0435\u0440\u0441\u0438\u044e \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 0.10. \u0410\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 <strong>192.168.0.2<\/strong>, \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442 \u0440\u0443\u0442\u0430.<\/p>\n<h1>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Prosody<\/h1>\n<p>\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043a\u043b\u044e\u0447:<\/p>\n<pre class=\"lang:sh decode:true\">wget https:\/\/prosody.im\/files\/prosody-debian-packages.key -O- | apt-key add -\r\necho \"deb http:\/\/packages.prosody.im\/debian trusty main\" &gt;&gt; \/etc\/apt\/sources.list.d\/prosody.list<\/pre>\n<p>\u0438 \u0441\u0442\u0430\u0432\u0438\u043c:<\/p>\n<pre class=\"lang:sh decode:true\">aptitude update\r\naptitude upgrade\r\naptitude install prosody-trunk lua-dbi-mysql<\/pre>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u0438:<\/p>\n<pre class=\"lang:sh decode:true\">root@mail:\/etc\/prosody\/certs# openssl req -new -x509 -days 365 -nodes -out \"example.com.crt\" -keyout \"example.com.key\"\r\nGenerating a 2048 bit RSA private key\r\n.+++\r\n.............................+++\r\nwriting new private key to 'example.com.key'\r\n-----\r\nYou are about to be asked to enter information that will be incorporated\r\ninto your certificate request.\r\nWhat you are about to enter is what is called a Distinguished Name or a DN.\r\nThere are quite a few fields but you can leave some blank\r\nFor some fields there will be a default value,\r\nIf you enter '.', the field will be left blank.\r\n-----\r\nCountry Name (2 letter code) [AU]:RU\r\nState or Province Name (full name) [Some-State]:Saint Petersburg\r\nLocality Name (eg, city) []:Saint Petersburg\r\nOrganization Name (eg, company) [Internet Widgits Pty Ltd]:Example LLC\r\nOrganizational Unit Name (eg, section) []:IT\r\nCommon Name (e.g. server FQDN or YOUR name) []:example.com\r\nEmail Address []:it@example.com<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433. Prosody \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Lua, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u0435\u043d, \u0447\u0435\u043c \u0441\u0442\u0430\u0440\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 Erlang (\u0441 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u043c \u043d\u0430 YAML \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438)<\/p>\n<pre class=\"lang:sh decode:true \">vim \/etc\/prosody\/prosody.cfg.lua<\/pre>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u043d\u0430 2 \u0434\u043e\u043c\u0435\u043d\u0430:<\/p>\n<pre class=\"lang:lua decode:true\">admins = {\"andrusha@example.com\", \"admin@example.org\"}\r\nuse_libevent = true\r\nmodules_enabled = {\r\n        -- Generally required\r\n                \"roster\"; -- Allow users to have a roster. Recommended ;)\r\n                \"saslauth\"; -- Authentication for clients and servers. Recommended if you want to log in.\r\n                \"tls\"; -- Add support for secure TLS on c2s\/s2s connections\r\n                \"dialback\"; -- s2s dialback support\r\n                \"disco\"; -- Service discovery\r\n        -- Not essential, but recommended\r\n                \"private\"; -- Private XML storage (for room bookmarks, etc.)\r\n                \"vcard\"; -- Allow users to set vCards\r\n        -- These are commented by default as they have a performance impact\r\n                --\"blocklist\"; -- Allow users to block communications with other users\r\n                --\"compression\"; -- Stream compression (requires the lua-zlib package installed)\r\n        -- Nice to have\r\n                \"version\"; -- Replies to server version requests\r\n                \"uptime\"; -- Report how long server has been running\r\n                \"time\"; -- Let others know the time here on this server\r\n                \"ping\"; -- Replies to XMPP pings with pongs\r\n                \"pep\"; -- Enables users to publish their mood, activity, playing music and more\r\n                \"register\"; -- Allow users to register on this server using a client and change passwords\r\n\r\n        -- Admin interfaces\r\n                \"admin_adhoc\"; -- Allows administration via an XMPP client that supports ad-hoc commands\r\n                --\"admin_telnet\"; -- Opens telnet console interface on localhost port 5582\r\n\r\n        -- HTTP modules\r\n                \"bosh\"; -- Enable BOSH clients, aka \"Jabber over HTTP\"\r\n                \"http_files\"; -- Serve static files from a directory over HTTP\r\n\r\n        -- Other specific functionality\r\n                \"groups\"; -- Shared roster support\r\n                \"announce\"; -- Send announcement to all online users\r\n                --\"welcome\"; -- Welcome users who register accounts\r\n                --\"watchregistrations\"; -- Alert admins of registrations\r\n                --\"motd\"; -- Send a message to users when they log in\r\n                \"legacyauth\"; -- Legacy authentication. Only used by some old clients and bots.\r\n}\r\n\r\n-- These modules are auto-loaded, but should you want\r\n-- to disable them then uncomment them here:\r\nmodules_disabled = {\r\n        -- \"offline\"; -- Store offline messages\r\n        -- \"c2s\"; -- Handle client connections\r\n        -- \"s2s\"; -- Handle server-to-server connections\r\n        -- \"posix\"; -- POSIX functionality, sends server to background, enables syslog, etc.\r\n}\r\n\r\nallow_registration = false\r\n\r\nssl = {\r\n        key = \"\/etc\/prosody\/certs\/localhost.key\";\r\n        certificate = \"\/etc\/prosody\/certs\/localhost.crt\";\r\n}\r\n\r\nc2s_require_encryption = false\r\ns2s_secure_auth = false\r\nallow_unencrypted_plain_auth = true\r\n--s2s_insecure_domains = { \"gmail.com\" }\r\n--s2s_secure_domains = { \"jabber.org\" }\r\npidfile = \"\/var\/run\/prosody\/prosody.pid\"\r\nauthentication = \"internal_plain\"\r\nstorage = \"sql\" -- Default is \"internal\"\r\n-- For the \"sql\" backend, you can uncomment *one* of the below to configure:\r\n--sql = { driver = \"SQLite3\", database = \"prosody.sqlite\" } -- Default. 'database' is the filename.\r\nsql = { driver = \"MySQL\", database = \"prosody\", username = \"prosody\", password = \"$ecretpa$$word\", host = \"localhost\" }\r\n--sql = { driver = \"PostgreSQL\", database = \"prosody\", username = \"prosody\", password = \"secret\", host = \"localhost\" }\r\nlog = {\r\n        info = \"\/var\/log\/prosody\/prosody.log\"; -- Change 'info' to 'debug' for verbose logging\r\n        error = \"\/var\/log\/prosody\/prosody.err\";\r\n        \"*syslog\";\r\n}\r\ngroups_file = \"\/var\/lib\/prosody\/sharedgroups.txt\"\r\n----------- Virtual hosts -----------\r\nVirtualHost \"localhost\"\r\n        modules_enabled = {\r\n                \"admin_web\";\r\n        }\r\n\r\nVirtualHost \"192.168.0.2\"\r\n        modules_enabled = {\r\n                \"admin_web\";\r\n        }\r\n\r\nVirtualHost \"example.com\"\r\n        enabled = true\r\n        modules_enabled = {\r\n                \"admin_web\";\r\n        }\r\n        ssl = {\r\n                key = \"\/etc\/prosody\/certs\/example.com.key\";\r\n                certificate = \"\/etc\/prosody\/certs\/example.com.crt\";\r\n        }\r\n\r\nVirtualHost \"example.org\"\r\n        enabled = true\r\n        modules_enabled = {\r\n                \"admin_web\";\r\n        }\r\n        ssl = {\r\n                key = \"\/etc\/prosody\/certs\/example.org.key\";\r\n                certificate = \"\/etc\/prosody\/certs\/example.org.crt\";\r\n        }\r\n\r\n------ Components ------\r\n-- You can specify components to add hosts that provide special services,\r\n-- like multi-user conferences, and transports.\r\n-- For more information on components, see http:\/\/prosody.im\/doc\/components\r\n\r\n---Set up a MUC (multi-user chat) room server on conference.example.com:\r\nComponent \"conference.example.com\" \"muc\"\r\n        name = \"example.com chatrooms server\"\r\n        restrict_room_creation = true\r\nComponent \"conference.example.org\" \"muc\"\r\n        name = \"example.org chatrooms server\"\r\n        restrict_room_creation = true\r\n<\/pre>\n<p>\u0414\u0432\u0438\u0436\u043e\u043a \u0431\u0430\u0437\u044b. \u042f \u0432\u044b\u0431\u0440\u0430\u043b MySQL, \u0445\u043e\u0442\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0442\u043e\u0436\u0435 \u0445\u043e\u0440\u043e\u0448 \u0438 \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0431\u0430\u0437\u0443:<\/p>\n<pre class=\"lang:mysql decode:true\">mysql&gt; create database prosody character set utf8 collate utf8_general_ci;\r\nmysql&gt; grant usage on *.* to prosody@localhost identified by '$ecretpa$$word';\r\nmysql&gt; grant all privileges on prosody.* to prosody@localhost;\r\nmysql&gt; flush privileges;<\/pre>\n<h1>\u0412\u0430\u0436\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b<\/h1>\n<p><strong>c2s_require_encryption = false<\/strong> &#8212; \u0432 Miranda NG \u0432 Windows XP \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 TLS, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u044d\u0442\u043e \u043d\u0435\u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>legacyauth<\/strong><\/p>\n<p><strong>groups_file<\/strong> \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0434\u0442\u0438 \u0434\u043e VirtualHost. \u042d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f groups, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0431\u0449\u0435\u0433\u043e \u0440\u043e\u0441\u0442\u0435\u0440\u0430. \u0421\u0430\u043c \u0444\u043e\u0440\u043c\u0430\u0442 \u0444\u0430\u0439\u043b\u0430 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre class=\"lang:ini decode:true\">[+\u0411\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f]\r\nivanova@example.com=\u0413\u043b\u0430\u0432\u0431\u0443\u0445\r\nsidorova@examle.org\r\n[+\u041f\u0440\u043e\u0434\u0430\u0436\u0438]\r\npetrov@example.com\r\npupkin@example.org\r\n[IT]\r\nadmin@example.com=Super Admin\r\ncoder@example.org=1\u0421 \u043f\u043e\u0433\u0440\u043e\u043c\u0438\u0441\u0442<\/pre>\n<p>\u041f\u043b\u044e\u0441\u0438\u043a \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443, \u0442\u043e \u0435\u0441\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b &#171;\u0411\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f&#187; \u0438 &#171;\u041f\u0440\u043e\u0434\u0430\u0436\u0438&#187; \u0431\u0443\u0434\u0443\u0442 \u0443 \u0432\u0441\u0435\u0445 \u0432 \u0441\u043f\u0438\u0441\u043a\u0430\u0445, \u0430 &#171;IT&#187; \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u0447\u043b\u0435\u043d\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u044b &#171;IT&#187;. \u0427\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c\u0438 \u043d\u0435\u043b\u044c\u0437\u044f (\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u044e \u0447\u0435\u0440\u0435\u0437 Webmin). \u0427\u0435\u0440\u0435\u0437 \u0440\u0430\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043c\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435. \u041a\u0438\u0440\u0438\u043b\u043b\u0438\u0446\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 (\u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, UTF-8)<\/p>\n<p><strong>mod_admin_web<\/strong> &#8212; \u043f\u043b\u0430\u0433\u0438\u043d \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041e\u043d \u0435\u0449\u0451 \u043c\u0435\u043d\u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439, \u0447\u0435\u043c \u0443 ejabberd, \u0438 \u0438\u0437 \u043d\u0435\u0433\u043e \u043d\u0435 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0440\u043e\u0441\u0442\u0435\u0440, \u043d\u043e \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435\u0442. \u0418 \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<br \/>\n<a href=\"http:\/\/prosody.im\/doc\/installing_modules\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/a><br \/>\n<a href=\"https:\/\/code.google.com\/p\/prosody-modules\/wiki\/mod_admin_web\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e<\/a><br \/>\n\u0421\u0442\u0430\u0432\u0438\u043c Mercurial, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433 (\u0443 \u043c\u0435\u043d\u044f \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e). \u0412 Ubuntu \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043b\u0435\u0436\u0430\u0442 \u0432 \/usr\/lib\/prosody\/modules\/, \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 prosodyctl about<\/p>\n<pre class=\"lang:sh decode:true \">apt-get install mercurial\r\ncd \/tmp\r\nhg clone http:\/\/prosody-modules.googlecode.com\/hg\/ prosody-modules\r\ncd prosody-modules\/mod_admin_web\r\ncp -r admin_web \/usr\/lib\/prosody\/modules\/\r\nchmod +x \/usr\/lib\/prosody\/modules\/admin_web\/get_deps.sh<\/pre>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 Jabber-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0440\u0435\u0437\u043e\u043b\u044c\u0432\u0438\u0442\u0441\u044f \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u043f\u043e\u043b\u043d\u043e\u043c\u0443 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c VirtualHost \u0434\u043b\u044f IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438.\u00a0 \u041f\u0440\u0438\u043c\u0435\u0440:<br \/>\nhttp:\/\/192.168.0.2:5280\/admin\/<br \/>\nhttps:\/\/192.168.0.2:5281\/admin\/<\/p>\n<p><strong>LuaExpat<\/strong>. prosodyctl \u043c\u043e\u0436\u0435\u0442 \u0440\u0443\u0433\u0430\u0442\u044c\u0441\u044f (\u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u043d\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u0443\u044f\u0437\u0432\u0438\u043c \u043a DoS-\u0430\u0442\u0430\u043a\u0430\u043c) \u043d\u0430 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 luaexpat, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 1.3.0 \u0438\u043b\u0438 \u043d\u043e\u0432\u0435\u0435. \u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e LTS Ubuntu Server 14.04 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1.2.0, \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f &#8212; \u043b\u0438\u0431\u043e \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0438\u0437 <a href=\"https:\/\/launchpad.net\/~kalon33\/+archive\/ubuntu\/gamesgiroll\">\u044d\u0442\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a>, \u043b\u0438\u0431\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c <strong>mod_compression<\/strong>, \u043b\u0438\u0431\u043e \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f :)<\/p>\n<h1>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 ejabberd<\/h1>\n<h2>1. \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043c\u043f \u0431\u0430\u0437\u044b ejabberd<\/h2>\n<p>\u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0430\u043a\u0435\u0442 exmpp. \u0424\u0430\u0439\u043b \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432 \/var\/lib\/ejabberd, \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438.<\/p>\n<pre class=\"lang:sh decode:true\">apt-get install exmpp\r\nejabberdctl dump ejabberd_dump\r\nmv \/var\/lib\/ejabberd\/ejabber_dump \/tmp\r\n<\/pre>\n<h2>2. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043c\u043f \u0431\u0430\u0437\u044b ejabberd \u0432 prosody<\/h2>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0443 <a href=\"http:\/\/prosody.im\/doc\/creating_accounts\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u041d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c Mercurial (\u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d), \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 \u0438 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u044c \u043a\u043e\u043d\u0444\u0438\u0433.<\/p>\n<pre class=\"lang:sh decode:true\">apt-get install mercurial\r\ncd \/tmp\r\nhg clone hg clone http:\/\/hg.prosody.im\/trunk prosody-hg\r\ncd prosody-hg\/tools\/\r\n.\/prosody-hg\/tools\/ejabberd2prosody.lua \/tmp\/ejabberd_dump<\/pre>\n<h2>3. \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 Prosody \u0432 MySQL<\/h2>\n<p>\u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c MySQL. <a href=\"http:\/\/prosody.im\/doc\/migrator\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043a \u043c\u0438\u0433\u0440\u0430\u0442\u043e\u0440\u0443<\/a>.<\/p>\n<pre class=\"lang:sh decode:true\">cd migration\r\nvim migrator.cfg.lua<\/pre>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0435\u0441\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 \/etc\/prosody, \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0431\u043e \u0435\u0433\u043e, \u043b\u0438\u0431\u043e \u044d\u0442\u043e\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 &#8212;config=.\/migrator.cfg.lua<\/p>\n<pre class=\"lang:lua decode:true\">local data_path = '\/var\/lib\/prosody';\r\n\r\ninput {\r\n        type = \"prosody_files\";\r\n        path = data_path;\r\n}\r\n\r\noutput {\r\n        type = \"prosody_sql\";\r\n        driver = \"MySQL\";\r\n        database = \"prosody\";\r\n        username = \"prosody\";\r\n        password = \"$ecretpa$$word\";\r\n        host = \"localhost\";\r\n}<\/pre>\n<p>\u0418 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442<\/p>\n<pre class=\"lang:sh decode:true\">prosody-migrator input output<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0420\u0435\u0448\u0438\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0430\u043a\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0433\u043e Jabber-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0435\u043b\u0430\u0441\u044c \u043d\u0435 \u0441 \u043d\u0443\u043b\u044f, \u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043f\u0435\u0440\u0435\u0435\u0437\u0434 \u0441 ejabberd, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0435\u043f\u043b\u043e\u0445, \u043d\u043e \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u044f\u0436\u0451\u043b\u044b\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043b\u043e\u0445\u043e \u0441\u0435\u0431\u044f \u0432\u0451\u043b \u043d\u0430 Ubuntu 14.04. \u042f \u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0430\u043c\u0443\u044e \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e (\u0447\u0438\u0442\u0430\u0439 &#8212; \u0432\u0435\u0440\u0441\u0438\u044e \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 0.10. \u0410\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/andrushasblog.ru\/?p=143\">\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u0446\u0435\u043b\u0438\u043a\u043e\u043c<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-143","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=\/wp\/v2\/posts\/143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=143"}],"version-history":[{"count":17,"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=\/wp\/v2\/posts\/143\/revisions"}],"predecessor-version":[{"id":217,"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=\/wp\/v2\/posts\/143\/revisions\/217"}],"wp:attachment":[{"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andrushasblog.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}