Installation/FreeBSD

From diaspora* project wiki
Revision as of 23:52, 23 October 2012 by Sean Tilley (talk | contribs) (Created page with "=== Caveat === Installation on FreeBSD is a more involved and variable process than on some (all?) of the Linux distros. This guide is intended for experienced FreeBSD admin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Caveat

Installation on FreeBSD is a more involved and variable process than on some (all?) of the Linux distros. This guide is intended for experienced FreeBSD admins. It uses a combination of ports and packages and takes a while to get everything compiled and running properly.

This is not intended as in introduction to FreeBSD.

Versions

These instructions are for installing Diaspora* on a fresh install of FreeBSD 9.0.

They will install Ruby 1.9 and PostgreSQL 9.1.

Package Management

Use of the `portmaster` ports management tool is assumed.

Prerequisites

It is assumed that you have a fresh install of FreeBSD 9.0 with ports tree installed and you are running from the non-root user that you intend to run Diaspora* under.

Packages/ports up and running should include:

  • bash
  • sudo
  • curl
  • ca_nss_root

The Basics

Install required libraries:

sudo pkg_add -r libxml2 libxslt


PostgreSQL

To install Postgresql as your database, run the following:

sudo pkg_add -r postgresql91-server

Add `postgresql_enable="YES"` to /etc/rc.conf, then:

       sudo /usr/local/etc/postgresql initdb
       sudo /usr/local/etc/postgresql start
   

Set it up to run as your user (diaspora for example):

       sudo su pgsql
       createuser -srdP diaspora
       exit

ImageMagick

To install ImageMagick, run the following:

       sudo pkg_add -r ImageMagick-nox11

SQLite3

To install sqlite3, run the following:

       sudo pkg_add -r sqlite3

Git

To install Git, run the following:

       sudo pkg_add -r git

Redis

To install Redis, run the following:

       sudo pkg_add -r redis

And add `redis_enable="YES"` to /etc/rc.conf


Ruby

To install Ruby (1.9):

Add `RUBY_DEFAULT_VER=1.9` to /etc/make.conf and then run:

       cd /usr/ports/lang/ruby19 && sudo make install clean
     

To install RubyGems, run the following:

       cd /usr/ports/devel/ruby-gems/ && sudo make install clean
   

Recompile everything to synchronize dependencies and add required ports

This is step is optional and very time-consuming:

       sudo portmaster -a
   

Bundler

To install Bundler, run the following:

       sudo gem install bundler 

Congrats! You have all your dependencies installed. Go back to Notes On Installing and Running Diaspora.