Skip to content

Installing on FreeBSD

axavio edited this page Mar 19, 2012 · 16 revisions

Work In Progress

This guide has not yet been tested from scratch, but includes the basic steps. USE AT YOUR OWN RISK.

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

To install Ruby (1.9):

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

    sudo cd /usr/ports/lang/ruby19 && 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 (optional? time-consuming step):

    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.

Clone this wiki locally