LoginSignup
9
15

More than 5 years have passed since last update.

Jabber(XMPP)をインストールしてみた - ejabberd

Last updated at Posted at 2015-05-26

zabbix のアラート通知に jabber が利用できるようなので ejabberd-15.04をインストールしてみた。

環境:CentOS release 6.5 (Final) ejabberd-15.04-linux-x86_64

Jabberとは

Jabber は、オープンソースで提供されているクロスプラットフォームのメッセージングシステムです。 Jabber は、XMPP(Extensible Messaging and Presence Protocol)と呼ばれることがあります。 Jabber アカウントを使用している人にメッセージを送るには、自分も Jabber アカウントを使用する必要があります。Jabber は、オープンソースで提供されているクロスプラットフォームのメッセージングシステムです。 Jabber は、XMPP(Extensible Messaging and Presence Protocol)と呼ばれることがあります。 Jabber アカウントを使用している人にメッセージを送るには、自分も Jabber アカウントを使用する必要があります。

ejabberd のインストール

ダウンロード

以下のURLからダウンロードします。
https://www.process-one.net

# wget "https://www.process-one.net/downloads/downloads-action.php?file=/ejabberd/15.04/ejabberd-15.04-linux-x86_64-installer.run" -O ejabberd-15.04-linux-x86_64-installer.run

実行権限の付与

# chmod +x ejabberd-15.04-linux-x86_64-installer.run

インストーラの実行

# ./ejabberd-15.04-linux-x86_64-installer.run

言語の選択

Language Selection

Please select the installation language
[1] Dutch - Nederlands
[2] English - English
[3] French - Francais
[4] German - Deutsch
[5] Russian - Русский
[6] Simplified Chinese - ?体中文
[7] Spanish - Espanol
Please choose an option [2] : 2

ライセンスの承諾

Do you accept this license? [y/n]:y

インストールディレクトリとドメイン設定

----------------------------------------------------------------------------
Please specify the directory where ejabberd will be installed.

Installation Directory [/opt/ejabberd-15.04]:

----------------------------------------------------------------------------
ejabberd server domain

Please enter the desired ejabberd domain name. The domain is the visible
attribute that is added to the username to form the Jabber Identifier (for
example: user@example.net). This computer must be known on the network with this
address name.

ejabberd server domain [myhost]: sample.net

----------------------------------------------------------------------------
Administrator username

Please enter the administrator username for the current ejabberd installation. A
Jabber account with this username will be created and granted administrative
privileges. Don't use blankspaces in the username.

Administrator username [admin]:

----------------------------------------------------------------------------
Administrator password

Please provide a password for the administrator user (at least 5 characters).

Administrator password :
Retype password :
----------------------------------------------------------------------------
Cluster

Will this node be part of a cluster ? (Please note ejabberd clustering is
intended for advanced users).

Cluster [y/N]: n


----------------------------------------------------------------------------
Setup is now ready to begin installing ejabberd on your computer.

インストール

上記の設定から続きます。

Do you want to continue? [Y/n]: Y
----------------------------------------------------------------------------
Please wait while Setup installs ejabberd on your computer.

 Installing
 0% ______________ 50% ______________ 100%
 #########################################

----------------------------------------------------------------------------
Setup has finished installing ejabberd on your computer.

View Readme file? [Y/n]: n

ejabberdの起動

# cd /opt/ejabberd-15.04/bin
# ./ejabberdctl start

Linux ファイアウォールの設定

以下を追記

/etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5280 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5222 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5269 -j ACCEPT

BIND の設定

ソーンファイルに SRVレコードの追記

xmpp                                 IN      A    XX.YYY.ZZ.132
_xmpp-client._tcp.sample.net. 18000 IN SRV 0 5 5222 xmpp.sample.net.
_xmpp-server._tcp.sample.net. 18000 IN SRV 0 5 5269 xmpp.sample.net.

管理コンソールへログイン

以下のURLから管理コンソールにログインして、ユーザを登録します。
http://xmpp.sample.net:5280/admin
注)ユーザ名は admin@ドメイン となります。jabber.png

9
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
15