Editing Eng:J2J:AdminGuide
From JaWiki (Jabber/XMPP wiki)
Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.
The administrator who locked it offered this explanation: MediaWiki upgrading
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
For J2J you will need: | For J2J you will need: | ||
* [http://python.org Python] >=2.3 | * [http://python.org Python] >=2.3 | ||
− | * [http://twistedmatrix.com/ Twisted] >= | + | * [http://twistedmatrix.com/ Twisted] >=8.0.1 |
− | * [http://www.postgresql.org/ PostgreSQL] >= | + | * [http://www.postgresql.org/ PostgreSQL] >=7.4.7 |
* [http://www.pygresql.org/ PyGreSQL] >=3.8 | * [http://www.pygresql.org/ PyGreSQL] >=3.8 | ||
− | + | (Note: there is experimental mysql support in 1.1.8, see Changelog.txt) | |
− | (Note: there is experimental | + | |
* Any Jabber-server (for example ejabberd, jabberd2 or Openfire), that supports: | * Any Jabber-server (for example ejabberd, jabberd2 or Openfire), that supports: | ||
Line 21: | Line 20: | ||
You need to get sources of [[Eng:J2J|J2J]]. You can do it at [http://jrudevels.org/index.php?pg=downloads.php&dir=J2J JRuDevels Downloads], or with help of [http://subversion.tigris.org/ SVN]: | You need to get sources of [[Eng:J2J|J2J]]. You can do it at [http://jrudevels.org/index.php?pg=downloads.php&dir=J2J JRuDevels Downloads], or with help of [http://subversion.tigris.org/ SVN]: | ||
− | <nowiki>svn co | + | <nowiki>svn co https://svn.jrudevels.org/j2j/trunk j2j/</nowiki> |
=== Database setup === | === Database setup === | ||
Line 31: | Line 30: | ||
createdb j2j | createdb j2j | ||
* mysql | * mysql | ||
− | mysql -h localhost | + | mysql -h localhost -p |
+ | >CREATE DATABASE j2j; | ||
Let's create a DB user: | Let's create a DB user: | ||
Line 38: | Line 38: | ||
A -P key means, that user is created with a password-prompt. Store it, because it will be needed for next steps. Same with yourpassword in mysql: | A -P key means, that user is created with a password-prompt. Store it, because it will be needed for next steps. Same with yourpassword in mysql: | ||
* mysql: | * mysql: | ||
− | mysql -h localhost | + | mysql -h localhost -p |
+ | >GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON j2j.* TO 'j2j'@'localhost' IDENTIFIED BY 'yourpassword'; | ||
And import a database structure: | And import a database structure: | ||
Line 45: | Line 46: | ||
\i pgsql.schema | \i pgsql.schema | ||
* mysql | * mysql | ||
− | mysql -h localhost | + | mysql -h localhost -p |
+ | >use j2j | ||
+ | >\. mysql.schema | ||
=== Gateway configuration === | === Gateway configuration === | ||
− | Configuration file is needed for [[Eng:J2J|J2J]]. Default search paths for it is: ./j2j.conf, ~/.j2j/j2j.conf | + | Configuration file is needed for [[Eng:J2J|J2J]]. Default search paths for it is: ./j2j.conf, ~/.j2j/j2j.conf, /etc/j2j/j2j.conf. Let's copy example of this and edit it: |
cp j2j.conf.example j2j.conf | cp j2j.conf.example j2j.conf | ||
nano -w j2j.conf | nano -w j2j.conf | ||
Line 77: | Line 80: | ||
Let's start the gateway: | Let's start the gateway: | ||
− | python main.py | + | <nowiki>python main.py</nowiki> |
it should spit "Connected", see also your jabber server log. | it should spit "Connected", see also your jabber server log. | ||
=== Problems === | === Problems === | ||
* If you see: | * If you see: | ||
− | <nowiki>Exception exceptions.AttributeError: "database instance has no attribute 'dbCursor'" in <bound method | + | <nowiki> |
− | + | Exception exceptions.AttributeError: "database instance has no attribute 'dbCursor'" in <bound method database.__del__ of <database.database instance at 0x85f1bec>> ignored | |
+ | </nowiki> | ||
Check if you have installed python db access support ( i.e. python-pygresql, python-mysqldb in debian) and if it is up to date. Otherwise, is postgresql/mysql rdbms accesible with the parameters in [database] section in your j2j.conf? is it up? | Check if you have installed python db access support ( i.e. python-pygresql, python-mysqldb in debian) and if it is up to date. Otherwise, is postgresql/mysql rdbms accesible with the parameters in [database] section in your j2j.conf? is it up? | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Sometimes main.py doesn't spit nothing, check your jabber server log, maybe there is an authentication password problem so recheck [component] section in j2j.conf | * Sometimes main.py doesn't spit nothing, check your jabber server log, maybe there is an authentication password problem so recheck [component] section in j2j.conf | ||
− | * In j2j. | + | |
+ | * In debian etch twisted is too old: | ||
+ | <nowiki> | ||
+ | Traceback (most recent call last): | ||
+ | File "/usr/src//j2j/main.py", line 11, in ? | ||
+ | import j2j | ||
+ | File "/usr/src/j2j/j2j.py", line 14, in ? | ||
+ | from client import Client | ||
+ | File "/usr/src/j2j/client.py", line 10, in ? | ||
+ | from twisted.names.error import DNSNameError | ||
+ | ImportError: No module named error | ||
+ | </nowiki> | ||
+ | ... required twisted 8.01 is in etch+1; ubuntu 8.04 is ok too. | ||
=== Command line options === | === Command line options === | ||
− | Start [[Eng:J2J|J2J]] with the --help key | + | Start [[Eng:J2J|J2J]] with the --help key for get the help on command-line options. |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:English]] | [[Category:English]] |