Diaspora on openSUSE

A possible milestone in the world of social networking was reached a few days ago, as the developers announced the pre-alpha release of the Diaspora project.  While there is ample instruction on their wiki for installing a seed on Ubuntu, there is no documentation on getting one running on SUSE Linux, especially in Apache.  However, after some tinkering around, I have successfully installed and set it my own Diaspora seed.  Here is what I did for openSUSE 11.3:

Warning

This application is pre-alpha quality (i.e. minimal functionality).  While the Diaspora team has released the source code and some basic installation instructions, there is absolutely no support right now.  In addition, the application has a lot of security holes, as this article points out.  On top of that, you will have to install a lot of software, which always carries the risk of messing up your system.

While I am happy to answer some basic questions about what I did, I am not a Ruby expert and will probably not be able to help on most specific problems.  If you do this, it is at your own risk!

General Dependencies

Diaspora uses Ruby on Rails for its platform.  If you don’t have it installed already, expect to spend a lot of time on installation.  The following lines should get you started, and the rest of the Ruby libraries will come near the end.

zypper in apache2-devel ruby rubygems gcc-c++ libxslt-devel ImageMagick git
gem install rake
gem install rack
gem install bundler

Apache

Diaspora is designed to run under mod_passenger, so you will probably need to install this module if you want to use Apache.  The best way to do this is by downloading and compiling the source code.  Here is what I did:

wget http://rubyforge.org/frs/download.php/71376/passenger-2.2.15.tar.gz
tar -xzvf passenger-2.2.15.tar.gz
./passenger-2.2.15/bin/passenger-install-apache2-module
mv ../ext/apache2/mod_passenger.so /usr/lib64/apache2/

You will want to replace the download URL and file names with the current latest version from http://www.modrails.com/install.html.  After you have compiled and moved the module into the Apache module directory, just add “passenger” to the modules section in /etc/sysconfig/apache2.  Once you have done that, set up your Apache configuration according to the online manual.

MongoDB

Diaspora uses MongoDB for its data storage.  I don’t know of any openSUSE repositories that carry this, but the binaries seem to work just fine.  Simply download and extract the Linux binary tar file from http://www.mongodb.org/downloads.  Once you have done this, you have two choices for the database location.  One is to create the default location, /data/db.  The other is to define your own database location and to add a parameter when starting up the server.  I opted for the second, so here is what my startup command looks like:

nohup ./mongod --dbpath /opt/db/ & > /dev/null/

Diaspora

Finally, we get to Diaspora itself.  To install and set up the application, change to the directory where you want to install it and use the following commands:

git clone http://github.com/diaspora/diaspora.git
cd diaspora
bundle install && bundle install devise.git

You might want to get up and stretch, as that last line could take awhile to run.

Running the Application

What you do here depends on whether you are planning on running Diaspora with the included development server, or with Apache.  If you are running it as a development server, executing ‘bundle exec thin start’ should be sufficient (you can test on port 3000).  If you want to shut it off, just replace the “start” with “stop” in the above command.

To run Diaspora in Apache, just follow the passenger module online manual, using Diaspora’s public directory in place of the examples.  Make sure that the entire application directory is owned by ‘wwwrun’.

While the application is definitely pre-alpha quality, I see a lot of promise.  The Diaspora team is dedicated, skilled, and well funded.  I wish them the best of luck in this project.

14 thoughts on “Diaspora on openSUSE

  1. Pingback: Tweets that mention Diaspora on openSUSE | Matt's Blog -- Topsy.com

  2. Cornelius Schumacher

    Have you thought about creating a Diaspora demo appliance in SUSE Studio? This would be an excellent way for people to try it out on openSUSE without messing up their system or risking any data because of security issues.

    Reply
    1. Matt Post author

      That’s a great idea! I have tinkered around SUSE Studio before, but it never occurred to me to use it for this. I think I will give that a shot today.

      Reply
    1. Matt Post author

      That’s good to know.

      Does it figure out where to install the Apache module, or do you have to move it over to the correct directory yourself? Also, where does it install the other passenger files?

      Reply
  3. darix

    rpm -ql rubygem-passenger

    and yes all files are in the correct places, also most other ruby libraries you need should be there. if not … drop me a mail.

    darix (one of the maintainer of of devel:languages:ruby:extensions)

    Reply
    1. Matt Post author

      I sure will. I’m working on a Diaspora appliance on SUSE Studio, so it’s good to know who to contact about Ruby extensions.

      Reply
  4. Pingback: Links 22/9/2010: Dell Announces Another Linux-powered Tablet, Facebook Adds to MySQL | Techrights

  5. Pingback: openSUSE Weekly News, Issue 142 is out! | Gnu Architecture

  6. Pingback: openSUSE Weekly News, Issue 142 is out! | LATEST WORDPRESS-TEMPLATES-PLUGINS-RSS

    1. Matt Post author

      Great! I had some trouble building in all the correct Ruby packages, so I’m glad you got one working. Now I know where to go when the next revision comes out.

      Reply
    1. Matt Post author

      I hadn’t checked out what they have been up to lately. I’m glad they made the switch to MySQL. Hosting companies will probably be a bit more receptive to that.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>