Linux CentOS installation configuration prosody Author: owoer | Posted on: October 27, 2014 | Columns: Other | Comments Off
Installation:
#yum Install prosody
Configuration:
Configuration file path
/etc/prosody/prosody.cfg.lua
Adding hosts in Prosody.cfg.lua
#vi/etc/prosody/prosody.cfg.lua
Find VirtualHost
——— –virtual hosts ——— –
VirtualHost "localhost"
VirtualHost "Domain/IP"
Restart service after saving
#/etc/init.d/prosody restart
Or
#prosodyctl restart
Add Users:
#prosodyctl adduser [email protected] Domain/IP
Change Password:
#prosodyctl passwd [email protected] Domain/IP
To turn on the firewall:
The well-known port for the XMPP server is the famous port for Tcp/5222,xmpp server interconnection tcp/5269
Firewall to open port 5222
Iptables-a input-p tcp–dport 5222-j ACCEPT
to open SSL/TLS:
prosody 0.9+ run:
#prosodyctl cert generate example.com
for older versions ( e.g. 0.8), you can run the OpenSSL manually like so:
#openssl req-new-x509-days 365-nodes-out "PROSODY.CRT"-newkey RS A:2048-keyout "Prosody.key"
This step requires some certificate information, which is explained as follows:
Country name (2 letter code) [GB]: "Enter a two-character country name here. Chinese for CN "
State or province name (full name) [Berkshire]:" Province name, such as Beijing for Beijing "
Locality name (eg, city) [Newbury]:" Town name , such as Beijing "
Organization name (eg, company) [My companies LTD]:" Corporate name "
Organizational unit name (eg, section) []:" Department name "
Common name (eg, your name or your server ' s hostname) []: "Name, usually certificate name, prosody need to lose your virtual hostname/IP"
Email address []: "E-mail"
#mkdir/etc/prosody/certs
#mv prosody.*/etc/prosody/certs
#vi/etc/prosody/prosody.cfg.lua
Change the KEY/CRT certificate save path under virtual hosts
——— –virtual hosts ——— –
SSL = {
Key = "/etc/pki/tls/private/prosody.key";
Certificate = "/ETC/PKI/TLS/CERTS/PROSODY.CRT";
}
The default path above is the path where you store the certificate
SSL = {
Key = "/etc/prosody/certs/prosody.key";
Certificate = "/ETC/PROSODY/CERTS/PROSODY.CRT";
}
See:
Http://prosody.im/doc
Linux CentOS installation Configuration prosody