Difference between revisions of "Mozilla Firefox Sync Server"

From ArchWiki
Jump to: navigation, search
m (Configuration files)
(Reorganization of topics)
Line 6: Line 6:
  
 
Newer versions of Mozilla Firefox feature bookmarks, passwords and browsing history synchronization between all your computers and devices. Mozilla Foundation provides a public Sync server, but you can host your own one if you want.
 
Newer versions of Mozilla Firefox feature bookmarks, passwords and browsing history synchronization between all your computers and devices. Mozilla Foundation provides a public Sync server, but you can host your own one if you want.
 
Mozilla Sync Server depends on Python 2 during installation. Arch Linux provides Python 3 as default Python version so there are special tweaks needed before running Mozilla Sync Server setup.
 
 
 
==Prerequisites==
 
==Prerequisites==
 
===Dependencies===
 
===Dependencies===
Line 14: Line 11:
 
===Accessibility===
 
===Accessibility===
 
If you intend to use your server with itinerant clients, you should install it on an Internet reachable computer.
 
If you intend to use your server with itinerant clients, you should install it on an Internet reachable computer.
 
 
===Administration Rights===
 
===Administration Rights===
 
All installation instructions are commands relying on the superuser privileges, so open a terminal and type:
 
All installation instructions are commands relying on the superuser privileges, so open a terminal and type:
Line 23: Line 19:
 
}}
 
}}
  
==Preparing Python==
+
==Installation==
 +
Mozilla Sync Server depends on Python 2 during installation. Arch Linux provides Python 3 as default Python version so there are special tweaks needed before running Mozilla Sync Server setup.
 +
Setup process creates an isolated Python environment in which all necessary dependencies are downloaded and installed. Afterwards, running the server only relies on the isolated Python environment, independently of the system-wide Python.
 +
===Python preparation===
 
Mozilla Sync Server setup needs Python 2.6 or newer. In default configuration, {{ic|/usr/bin/python}} is a symbolic link to {{ic|/usr/bin/python3}} whereas Python 2 is {{ic|/usr/bin/python2}}.
 
Mozilla Sync Server setup needs Python 2.6 or newer. In default configuration, {{ic|/usr/bin/python}} is a symbolic link to {{ic|/usr/bin/python3}} whereas Python 2 is {{ic|/usr/bin/python2}}.
  
Line 35: Line 34:
 
# ln -sf python2 python
 
# ln -sf python2 python
 
}}
 
}}
 
+
===Setup===
==Installing Mozilla Sync Server==
+
Setup process creates an isolated Python environment in which all necessary dependencies are downloaded and installed. This is why swapping Python versions is only needed during installation. Afterwards, running the server only relies on the isolated Python environment, independently of the system-wide Python.
+
 
+
 
Installation instructions (adapted from [http://docs.services.mozilla.com/howtos/run-sync.html Mozilla Howto], Copyright 2010 Mozilla Foundation, CC BY-SA 2.5):
 
Installation instructions (adapted from [http://docs.services.mozilla.com/howtos/run-sync.html Mozilla Howto], Copyright 2010 Mozilla Foundation, CC BY-SA 2.5):
 
{{bc|
 
{{bc|
Line 69: Line 65:
 
Check the end of the build messages, they should state "[done]". Otherwise, look at the first error messages, they give you hints on the problem and how to solve it.
 
Check the end of the build messages, they should state "[done]". Otherwise, look at the first error messages, they give you hints on the problem and how to solve it.
  
==Restoring initial Python state==
+
===Python initial state restoration===
 
{{bc|
 
{{bc|
 
# cd /usr/bin
 
# cd /usr/bin
Line 75: Line 71:
 
}}
 
}}
  
==Configuration files==
+
==Configuration==
Configuration files define where databases and logs will be created.
+
===Server-side===
 +
Configuration files are used to define where databases and logs will be created.
 
We will place databases in {{ic|/opt/weave/data}} and log files in {{ic|/var/log/weave}}, so we must create the directories.
 
We will place databases in {{ic|/opt/weave/data}} and log files in {{ic|/var/log/weave}}, so we must create the directories.
 
  # mkdir /opt/weave/data /var/log/weave
 
  # mkdir /opt/weave/data /var/log/weave
Line 115: Line 112:
 
}}
 
}}
  
==First Test Run==
+
===Client-side===
  
 
==Automatic Startup of the Server==
 
==Automatic Startup of the Server==
 
==Client-side Configuration==
 

Revision as of 20:01, 24 November 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Mozilla Firefox Sync Server#)

This page is about special operations required in order to install Mozilla Sync Server.

Newer versions of Mozilla Firefox feature bookmarks, passwords and browsing history synchronization between all your computers and devices. Mozilla Foundation provides a public Sync server, but you can host your own one if you want.

Prerequisites

Dependencies

Before proceeding, you need to install python2, python2-virtualenv, sqlite3, mercurial and make, all available in the official repositories.

Accessibility

If you intend to use your server with itinerant clients, you should install it on an Internet reachable computer.

Administration Rights

All installation instructions are commands relying on the superuser privileges, so open a terminal and type:

$ su -
Password: 
# 

Installation

Mozilla Sync Server depends on Python 2 during installation. Arch Linux provides Python 3 as default Python version so there are special tweaks needed before running Mozilla Sync Server setup. Setup process creates an isolated Python environment in which all necessary dependencies are downloaded and installed. Afterwards, running the server only relies on the isolated Python environment, independently of the system-wide Python.

Python preparation

Mozilla Sync Server setup needs Python 2.6 or newer. In default configuration, /usr/bin/python is a symbolic link to /usr/bin/python3 whereas Python 2 is /usr/bin/python2.

Before running setup, we must check the link and change it if necessary:

# cd /usr/bin
# ls -l python

    lrwxrwxrwx 1 root root 7  5 sept. 07:04 python -> python3

# ln -sf python2 python

Setup

Installation instructions (adapted from Mozilla Howto, Copyright 2010 Mozilla Foundation, CC BY-SA 2.5):

# mkdir -p /opt/weave
# cd /opt/weave
# hg clone https://hg.mozilla.org/services/server-full

      ... source repository cloning messages ...

# cd server-full
# make build

      ... many build messages, including harmless warnings ...

      ... end of the successful build messages:

Building the app 
  Checking the environ   [ok]
  Updating the repo   [ok]
  Building Services dependencies 
    Getting server-core     [ok]
    Getting server-reg     [ok]
    Getting server-storage     [ok]  [ok]
  Building External dependencies   [ok]
  Now building the app itself   [ok]
[done]

Check the end of the build messages, they should state "[done]". Otherwise, look at the first error messages, they give you hints on the problem and how to solve it.

Python initial state restoration

# cd /usr/bin
# ln -sf python3 python

Configuration

Server-side

Configuration files are used to define where databases and logs will be created. We will place databases in /opt/weave/data and log files in /var/log/weave, so we must create the directories.

# mkdir /opt/weave/data /var/log/weave

At least two configuration files must be changed in /opt/weave/server-full in order to reflect these choices: development.ini and etc/sync.conf.

In development.ini, locate the line:

args = ('/tmp/sync-error.log',)

and change it to:

args = ('/var/log/weav/sync-error.log',)

In etc/sync.conf, locate the line:

sqluri = sqlite:////tmp/test.db

and change it to:

sqluri = sqlite:////opt/weave/data/sync.db

This statement appears twice in the file, around line 12 and around line 24. Both should be modified.

Near line 15, we bump the disk quota from 5 to 25 MB:

quota_size = 25600

Near line 28, the fallback node URL must reflect our server's name (here server-name.domain-name). Change:

fallback_node = http://localhost:5000/

to:

fallback_node = http://server-name.domain-name:5000/

Client-side

Automatic Startup of the Server