Installation/openSUSE/13

From diaspora* project wiki


}}

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

Install packages

As root run:

zypper install libmysqlclient-devel ruby-devel rubygem-bundler mysql-community-server libmysqlclient-devel mysql-community-server-client make automake gcc gcc-c++ git libcurl-devel ImageMagick ImageMagick-extra libtool nginx rubygem-passenger-nginx bison libtool patch libxml2-devel libxslt-devel libffi-devel libyaml-devel nodejs redis

Install the database

If you already have one skip this step.

As root run:

zypper install postgresql-server

/etc/init.d/mysql start

Creating a user for Diaspora

As root run:

useradd -m diaspora
su diaspora
cd ~

RVM

We recommend using Ruby Version Manager it will ensure you're always on the currently recommended Ruby version and cleanly separate your Diaspora installation from all other Ruby applications on your machine. If you opt for not using it ensure your Ruby version is at least 1.9.2-p320, prior versions are incompatible. Be aware that this version is not maintained with security updates from the Ruby core team anymore. We currently recommend using .

Install RVM

As the user you want to run Diaspora under, that is not as root run:

curl -L dspr.tk/1t | bash

and follow the instructions.

Set up RVM

Ensure the following line is in your ~/.bashrc:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"


Now close all open terminals and open a new one!


If you don't have sudo installed or your current user doesn't have the privileges to execute it, run:

rvm autolibs read-only

Closely watch the output of the next step for something like "Missing required packages:". If it appears, hit Ctrl+C and install all the packages listed there. Then rerun that command.

Ensure the currently recommend version of Ruby is installed:

rvm install