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:
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!
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
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:
tar -xzvf passenger-2.2.15.tar.gz
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.
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/
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
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.