Difference between revisions of "Eng:J2J:AdminGuide"

From JaWiki (Jabber/XMPP wiki)
Jump to: navigation, search
(database setup)
(Configuring)
Line 36: Line 36:
 
  \i pgsql.schema
 
  \i pgsql.schema
  
=== Настройка компонента ===
+
=== Gateway configuration ===
  
Необходимо получить конфигурационный файл для компонента с именем config.py. Для этого скопируем пример такого файла и отредактируем его:
+
Configuration file config.py is needed for [[J2J]]. Let's copy example of this and edit it:
 
  cp config.py.example config.py
 
  cp config.py.example config.py
 
  nano -w config.py
 
  nano -w config.py
  
Параметры:
+
Parameters:
* JID - JID компоненты. Например,  
+
* JID - JID of gateway. For example,  
 
  JID=u"j2j.server.com"
 
  JID=u"j2j.server.com"
* HOST - IP или доменное имя сервера, к которому необходимо присоединить компонент. Например,
+
* HOST - IP or domain-name of your Jabber-server. For example,
 
  HOST="127.0.0.1"
 
  HOST="127.0.0.1"
* PORT - порт на сервере, к которому необходимо подключаться. Должен совпадать с аналогичным, прописанным в конфигурации Вашего Jabber-[[server|сервера]].
+
* PORT - port on Jabber-server to which J2J will be connected. It must be the same as it specified in your Jabber-server's configuration.
* DB_HOST - IP или доменное имя сервера БД.
+
* DB_HOST - IP or Domain-name of your database server.
* DB_USER - имя пользователя БД (в нашем примере - j2j)
+
* DB_USER - Database username (in our example is j2j)
* DB_NAME - имя базы данных (в нашем примере - j2j)
+
* DB_NAME - Database name (in our example is j2j)
* DB_PASS - пароль от БД для данного пользователя БД.
+
* DB_PASS - Password for this database username.
* DB_PREFIX - в общем случае остается без изменений.
+
* DB_PREFIX - pass it as is.
* ADMINS - список [[JID]]ов, на которые будут приходить уведомления о новых регистрациях. Пример:
+
* ADMINS - a list of [[JID]]s, for a notifications of new users registrations. For example,
 
  ADMINS=[u"vasya@server.ru",u"zhenya@server.com"]
 
  ADMINS=[u"vasya@server.ru",u"zhenya@server.com"]
  

Revision as of 11:49, 2 June 2007

Installation and operation guide for J2J (Jabber-to-Jabber) gateway.

Installation and configuring

Dependencies

For J2J you will need:

Source code downloads

You need to get sources of J2J. You can do it at JRuDevels Downloads, or with help of SVN:

svn co https://svn.jrudevels.org/j2j/trunk j2j/

Database setup

You need to setup a database to work with J2J:

Let's create a DB user:

createuser -P j2j

A -P key means, that user is created with a password-prompt. Store it, because it will be needed for next steps.

Let's create a database for J2J:

createdb j2j

And import a database structure:

psql -U j2j j2j
\i pgsql.schema

Gateway configuration

Configuration file config.py is needed for J2J. Let's copy example of this and edit it:

cp config.py.example config.py
nano -w config.py

Parameters:

  • JID - JID of gateway. For example,
JID=u"j2j.server.com"
  • HOST - IP or domain-name of your Jabber-server. For example,
HOST="127.0.0.1"
  • PORT - port on Jabber-server to which J2J will be connected. It must be the same as it specified in your Jabber-server's configuration.
  • DB_HOST - IP or Domain-name of your database server.
  • DB_USER - Database username (in our example is j2j)
  • DB_NAME - Database name (in our example is j2j)
  • DB_PASS - Password for this database username.
  • DB_PREFIX - pass it as is.
  • ADMINS - a list of JIDs, for a notifications of new users registrations. For example,
ADMINS=[u"vasya@server.ru",u"zhenya@server.com"]

Запуск

Теперь все готово к запуску:

python main.py

Администрирование транспорта

ToDo: Информация пока отсутствует