Template:Installation/Head: Difference between revisions

From diaspora* project wiki
m (Undoing)
mNo edit summary
Line 6: Line 6:
</div>
</div>


{{Installation/Introduction}}
{{Template:Installation/Introduction}}


== Before you start ==
{{Template:Installation/GuideVersion}}
 
You need to choose if you want a production setup or development setup. Diaspora has three development trees: master, stable and develop. The master tree always contains the current release. The stable tree is where new features and bug fixes are added before a new minor version is released. The develop tree is where new features and bug fixes are added before a new major version is released. Therefore if you want a development setup you should run from develop. But it isn't guaranteed to be in a good state, so it's not recommended to run a production setup from it.
 
Diaspora is written in Ruby on Rails and therefore knows different running modes. These have nothing to do with running from the master or the develop tree. Nonetheless we recommend the development mode for development setups and production mode for production setups. The difference is, apart from a slightly different default configuration, speed. The development mode reloads the code on each request, so it speeds up your development. The production mode doesn't do that, so pages load significantly faster. That's the only major difference you need to care about. To emphasize it one more time: Running a production setup in development mode gains you nothing.
 
Lastly you can choose between running on MySQL/MariaDB or PostgreSQL, in our experience PostgreSQL achieves a better performance.
 
== Versions of this guide ==
 
{{Serious|Make sure to use the correct version of the guide, see below.}}
 
The current guide is for a '''{{#switch: {{#var:mode}}|production=production|development=development}}''' setup
with  '''{{#switch: {{#var:DB}}|mysql=MySQL|postgres=PostgreSQL|mariadb=MariaDB}}''' as database.
 
You can change them below:
 
Running mode: {{#ifeq: {{#var:mode}}|production|'''Production'''|[[{{FULLPAGENAME}}?db={{#var:DB}}&mode=production|Production]]}} | {{#ifeq: {{#var:mode}}|development|'''Development'''|[[{{FULLPAGENAME}}?db={{#var:DB}}&mode=development|Development]]}}<br />
Database: {{#ifeq: {{#var:DB}}|mysql|'''MySQL'''|[[{{FULLPAGENAME}}?db=mysql&mode={{#var:mode}}|MySQL]]}} {{!}} {{#ifeq: {{#var:DB}}|postgres|'''PostgreSQL'''|[[{{FULLPAGENAME}}?db=postgres&mode={{#var:mode}}|PostgreSQL]]}} {{!}} {{#ifeq: {{#var:DB}}|mariadb|'''MariaDB'''|[[{{FULLPAGENAME}}?db=mariadb&mode={{#var:mode}}|MariaDB]]}}





Revision as of 01:51, 2 September 2016


}}

Introduction

NoteNote:You don't need to have your own pod to use diaspora*.
Running your own diaspora* server allows more control over your data, but it requires technical skills and time. Instead, you can register on one of the installations open to everyone that allow you to use diaspora* in a few clicks without any requirements

This guide will outline the procedure to get you set up with a production-ready installation of diaspora*.

Things to know

  • The install is a bit complex, but we're here to help.
    It's extremely helpful to have some experience in Linux/Unix server administration or Rails app deployment already. But don't worry, if you run into problems and need help, just visit us in our IRC channels on Freenode.
  • Running a common setup will get you the most help, if you need it.
    Most people in the community will have some experience running diaspora* with Unicorn as the app server using Nginx as outward-facing web server. Of course, you're free to run any other app server (Thin, Passenger...) or web server (Apache), but you might find it harder to get help if you run into unexpected troubles.
  • diaspora* is developed utilizing latest web standards
    Therefore UX is best with recent browsers, so please update your Firefox, Opera, Chrome or Safari to the newest version. We do not currently support any version of Internet Explorer, though we won't reject any contributions attempting to change that circumstance.
  • diaspora* strongly recommends HTTPS
    as we encrypt communication amongst servers and to the client browsers. You can get a free TLS certificate from Let's Encrypt.
    Unfortunately, self-signed certificates or certificates issued by CACert won't work.
  • We need your feedback
    to constantly improve and update this guide. Have a look at How we communicate
  • Do not run any of the commands you find in this guide as root (except if requested).
    Just use your normal user - or even better - create a separate user for diaspora* (rationale).


Versions of this guide

WarningWarning:Make sure to use the correct version of the guide, see below.

» Help me decide!

In Production mode, your pod is configured to deal with high load for everyday usage. This is recommended for a pod you want to actually use.

In Development mode, your pod is configured for development. This is recommended ony for development contributors of diaspora* which use the pod only locally for testing purposes.

For Database, choose PostgreSQL unless you already have an existing database server that you want to re-use. We recommend an isolated PostgreSQL installation exclusively for your pod.

The current guide is for a production setup with PostgreSQL as database.

You can change them below:

Running mode: Production | Development

Database: PostgreSQL | MySQL (deprecated) | MariaDB (deprecated)



Requirements

Hardware

Minimum recommended:

  • Memory: 1.5 GB
  • Swap: 1 GB
  • CPU: decent multicore
  • Storage: The amount of hard disk space required largely depends on how many images you expect your users to upload.

It is possible to run a pod on a Raspberry Pi >= 2. However, this will be very slow and is not recommended for multi-user pods.

Software

Over the course of this manual, you will install the following software if not already installed.

  • Build tools - for compiling source packages
  • Ruby - the Ruby programming language
  • RubyGems - package manager for Ruby code libraries (like CPAN for Perl or PEAR for PHP)
  • Bundler - gem management tool for Ruby projects
  • MySQL or MariaDB or PostgreSQL - backend storage engine
  • OpenSSL - encryption library.
  • libcurl - multiprotocol file transfer library WARNING: Due to sidekiq longjmp error, you need at least curl 7.32
  • ImageMagick - image processing library
  • Git - version control system
  • Redis - persistent key-value store
  • one of the JavaScript runtimes on execjs' supported list.


Please note that running diaspora* together with other applications that use Redis on the same machine can be dangerous. Only do that if you absolutely know what you are doing, and if you know how to change the Redis database for all of the applications.

Prepare the system