Changeset - 8be6cdc53ac2
[Not reviewed]
0 1 4
HanzZ - 13 years ago 2012-11-29 14:20:59
hanzz.k@gmail.com
Docs
5 files changed with 215 insertions and 1 deletions:
0 comments (0 inline, 0 general)
_includes/themes/twitter/my.html
Show inline comments
 
@@ -16,13 +16,13 @@
 
    <!-- HEADER -->
 
    <div id="header_wrap" class="outer">
 
        <header class="inner">
 
          <a id="forkme_banner" href="https://github.com/hanzz/libtransport">View on GitHub</a>
 

	
 
          <h1 id="project_title">Spectrum 2</h1>
 
          <h2 id="project_tagline">Spectrum 2 transports</h2>
 
          <h2 id="project_tagline">Spectrum 2 XMPP transports</h2>
 

	
 
			<section id="menu">
 
			<a class="menuitem" href="http://hanzz.github.com/libtransport">About</a>
 
			<a class="menuitem" href="http://hanzz.github.com/libtransport/documentation">Documentation</a>
 
			<a class="menuitem" href="http://hanzz.github.com/libtransport/download">Download</a>
 
			<a class="menuitem" href="http://hanzz.github.com/libtransport/discussion">Discussion</a>
documentation/about.md
Show inline comments
 
new file 100644
 
---
 
layout: page
 
title: Spectrum 2
 
---
 

	
 
## Gateway mode and server mode
 

	
 
Spectrum 2 can work in two modes: Gateway mode and Server mode. This chapter describes differences betweeen those two modes. If you want to find out how to configure Spectrum 2 to run in gateway or server mode, read the Configuration part of this documentation.
 

	
 
### Gateway mode
 

	
 
Gateway mode represents the classic way how XMPP gateway works. You have to configure an external XMPP server (like Prosody or Ejabberd) to serve the subdomain you want to use for Spectrum 2 (for example "icq.domain.tld"). Spectrum 2 in gateway mode then connects the XMPP server as its component and users are able to find out "icq.domain.tld" in Service Discovery, register it and use it.
 

	
 
*Advantages:*
 
* Users can use more legacy networks using single XMPP account (and using single TCP connection).
 
* It's easy to extend existing XMPP servers using gateway mode.
 

	
 
*Disadvantages:*
 
* Passwords are stored (even in encrypted form) on server.
 
* Roster (contact list) synchronization can be problematic, because it depends on the client user uses. This can be improved by usage of Remote Roster protoXEP.
 
* You have to setup XMPP server and use database even if you only want to use Spectrum 2 as a tool to connect legacy networks using XMPP protocol.
 

	
 
### Server mode
 

	
 
In server mode, Spectrum 2 behaves as standalone server. User then logins legacy networks by logging XMPP account like this one: "my_msn_name%hotmail.com@msn.domain.tld".
 

	
 
*Advantages:*
 
* Passwords are not stored on server.
 
* Roster synchronization is easy, because Spectrum 2 acts as normal server.
 
* If you want to use Spectrum 2 as wrapper between different networks, you don't need database or Jabber server as another layer.
 
* Using SRV records you can easily run Spectrum 2 on different machines to scale it.
 

	
 
*Disadvantages:*
 

	
 
* Clients have to support more accounts to connect more legacy networks (Therefore they will need have to use more TCP connections).
 

	
 
## Instance, main process and backends
 

	
 
This chapter describes differences between Spectrum 2 instance, Spectrum 2 main process and Spectrum 2 backends.
 

	
 
### Spectrum 2 instance
 

	
 
In server mode, Spectrum 2 instance is single XMPP server. In gateway mode, it is single XMPP gateway. We can say these statements about Spectrum 2 instance:
 

	
 
* One instance is defined by one configuration file (By default stored in `/etc/spectrum2/transports/`).
 
* Spectrum 2 instance is represented to end user by its Jabber ID (for example icq.domain.tld).
 
* Internally every Spectrum 2 instance consists of Spectrum 2 main process and Spectrum 2 backends.
 
* One instance can run just one type of Spectrum 2 backend.
 

	
 
### Spectrum 2 main process
 

	
 
Spectrum 2 main process is the main process of Spectrum 2 instance.
 

	
 
* Spectrum 2 main process is responsible for running Spectrum 2 backends and routing users' requests to proper backend.
 
* By default the logs of Spectrum 2 main process are stored in `/var/log/spectrum2/$jid/spectrum2.log`.
 

	
 
### Spectrum 2 backend
 

	
 
Spectrum 2 backend is special application run by Spectrum 2 main process. The goal of Spectrum 2 backend is to handle users's sessions. Spectrum 2 main process can handle more Spectrum 2 backends, but all messages from single user are always handled by the same backend.
 

	
 
One Spectrum 2 instance can run only one type of Spectrum 2 backend.
 

	
documentation/installation/debian_ubuntu.md
Show inline comments
 
new file 100644
 
---
 
layout: page
 
title: Spectrum 2
 
---
 

	
 
We have APT repositories for Debian and Ubuntu that make it very easy to install Spectrum 2.
 

	
 
To use the repositories, just add the following lines to @/etc/apt/sources.list@:
 

	
 
	deb http://packages.spectrum.im $dist spectrum2
 

	
 
where $dist is either lenny, squeeze, hardy, intrepid, jaunty, karmic or lucid. If you are unsure, you can usually find your distribution in the file /etc/lsb-release. We also have a source repository at the same location if you want to build the package yourself.
 

	
 
### Add GPG key
 

	
 
After you have added the repository, you still have to import the GPG key that is used to sign the packages in the repository. You can do this in two ways:
 

	
 
You can download and add the key manually (apt-key requires root privileges):
 

	
 
	wget -O - http://packages.spectrum.im/keys/apt-repository@fsinf.at | apt-key add -
 

	
 
You can simply update the repositories and install the fsinf-keyring packages:
 

	
 
	apt-get update
 
	apt-get install fsinf-keyring
 
	apt-get update
 

	
 
Don’t worry about the warnings that the packages can’t be identified, they will be gone after you installed the fsinf-keyring package.
 

	
 
### Install spectrum2 - development version
 

	
 
After you have done that, simply do:
 

	
 
	apt-get install spectrum2 spectrum2-backend-libpurple
 

	
 
Note that these repositories pull in quite a few dependencies, depending on the distribution you use.
documentation/installation/fedora_rhel.md
Show inline comments
 
new file 100644
 
---
 
layout: page
 
title: Spectrum 2
 
---
 

	
 
There are nightbuilds for Fedora, CentOS-6 or RHEL6 distributions.
 

	
 
### Fedora
 

	
 
Save [fedora-spectrum2.repo](http://repos.fedorapeople.org/repos/jkaluza/spectrum2/fedora-spectrum2.repo) file into `/etc/yum.repos.d/`.
 

	
 
Install spectrum2 and spectrum2-libpurple-backend:
 

	
 
	yum install spectrum2 spectrum2-libpurple-backend
 

	
 
### RHEL/CentOS
 

	
 
Save [epel-spectrum2.repo](http://repos.fedorapeople.org/repos/jkaluza/spectrum2/epel-spectrum2.repo) file into `/etc/yum.repos.d/`.
 

	
 
Install spectrum2 and spectrum2-libpurple-backend:
 

	
 
	yum install spectrum2 spectrum2-libpurple-backend
documentation/installation/from_source_code.md
Show inline comments
 
new file 100644
 
---
 
layout: page
 
title: Spectrum 2
 
---
 

	
 
## Install Boost and libidn
 

	
 
You have to have boost-devel and libidn-devel installed before compiling Swiften, otherwise it will compile against bundled version of Boost and libidn and Spectrum compilation will fail.
 

	
 
## Install Swiften from git repository:
 

	
 
	git clone git://swift.im/swift
 
	cd swift
 
	git checkout swift-2.0beta1
 
	./scons V=1 swiften_dll=1 Swiften SWIFTEN_INSTALLDIR=/usr/local force-configure=1
 
	sudo ./scons V=1 swiften_dll=1 Swiften SWIFTEN_INSTALLDIR=/usr/local /usr/local
 

	
 
*Note* - If the output of "./scons" command contains following during the configure stage, you don't have boost-devel or libidn-devel installed during the compilation and *Swiften won't work properly*:
 

	
 
	Checking for C++ header file boost/signals.hpp... no
 
	....
 
	Checking for C library idn... no
 

	
 

	
 
The proper configure script output looks like this:
 

	
 
	scons: Reading SConscript files ...
 
	Checking whether the C++ compiler worksyes
 
	Checking whether the C compiler worksyes
 
	Checking for C library z... yes
 
	Checking for C library resolv... yes
 
	Checking for C library pthread... yes
 
	Checking for C library dl... yes
 
	Checking for C library m... yes
 
	Checking for C library c... yes
 
	Checking for C library stdc++... yes
 
	Checking for C++ header file boost/signals.hpp... yes
 
	Checking for C library boost_signals... yes
 
	Checking for C++ header file boost/thread.hpp... yes
 
	Checking for C library boost_thread... no
 
	Checking for C library boost_thread-mt... yes
 
	Checking for C++ header file boost/regex.hpp... yes
 
	Checking for C library boost_regex... yes
 
	Checking for C++ header file boost/program_options.hpp... yes
 
	Checking for C library boost_program_options... yes
 
	Checking for C++ header file boost/filesystem.hpp... yes
 
	Checking for C library boost_filesystem... yes
 
	Checking for C++ header file boost/system/system_error.hpp... yes
 
	Checking for C library boost_system... yes
 
	Checking for C++ header file boost/date_time/date.hpp... yes
 
	Checking for C library boost_date_time... yes
 
	Checking for C++ header file boost/uuid/uuid.hpp... yes
 
	Checking for C function XScreenSaverQueryExtension()... yes
 
	Checking for package gconf-2.0... yes
 
	Checking for C header file gconf/gconf-client.h... yes
 
	Checking for C library gconf-2... yes
 
	Checking for C header file libxml/parser.h... no
 
	Checking for C header file libxml/parser.h... yes
 
	Checking for C library xml2... yes
 
	Checking for C header file idna.h... yes
 
	Checking for C library idn... yes
 
	Checking for C header file readline/readline.h... yes
 
	Checking for C library readline... yes
 
	Checking for C header file avahi-client/client.h... yes
 
	Checking for C library avahi-client... yes
 
	Checking for C library avahi-common... yes
 
	Checking for C header file openssl/ssl.h... yes
 

	
 
Note that you have to have at least Python 2.5 to build Swiften.
 

	
 
## Install Google protobuf
 

	
 
In Fedora, you just have to install following packages:
 

	
 
	sudo yum install protobuf protobuf protobuf-devel
 

	
 
## Install Libpurple for libpurple backend
 

	
 
You should definitely have latest libpurple, so download Pidgin and compile it, because your distribution probably doesn't have the latest one.
 

	
 
## Install libCommuni for libCommuni IRC backend
 

	
 
The instructions are defined on "libCommuni wiki":https://github.com/communi/communi/wiki.
 

	
 
## Install Spectrum 2
 

	
 
	git clone git://github.com/hanzz/libtransport.git
 
	cd libtransport
 
	cmake . -DCMAKE_BUILD_TYPE=Debug
 
	make
 

	
 
Before running make, check cmake output if the supported features are OK for you. If not, install libraries needed by Spectrum to provide specific feature.
 

	
 
You can also install spectrum using "sudo make install"
0 comments (0 inline, 0 general)