Yesterday an Open Source alternative to Facebook was launched by four New Yorkers called Diaspora. Today I decided to have a play and see if I could get this installed on one of my servers. The following post details the steps I took to get it up and running.
Before we start I’d like to thank Hemanth who produced a guide to getting Diaspora installed on Debian/Ubuntu
After logging into your server or opening your terminal app we need the following:
yum install libxslt libxslt-devel libxml2 libxml2-devel
We then install Ruby 1.8.7. This has to be done manually as currently CentOS doesn’t have an RPM for 1.8.7.
wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz
tar -zxvf ruby-1.8.7.tar.gz
cd ruby-1.8.7
./configure –with-openssl-dir=/usr/lib64/openssl
make
sudo make install
With Ruby installed we can now install Gems
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz
tar -zxvf rubygems-1.3.6.tgz
cd rubygems-1.3.6
sudo ruby setup.rb
Next we install the MongoDB. To install MongoDB you may need to add a yum repo this is assumed in the following lines.
touch /etc/yum.repos.d/10gen.repo
vi /etc/yum.repos.d/10gen.repo
Add following into it:
[10gen]
name=10gen Repository baseurl=http://downloads.mongodb.org/distros/fedora/13/os/x86_64/
gpgcheck=0
enabled=1
Now we can install it with yum
yum install mongo-stable mongo-stable-server
Install ImageMagick
sudo yum install ImageMagick
Install Git
yum install git
We now install the RubyGem Bundler that seems to handle the running of Diaspora
gem install bundler
CD into the directory you wish to install Diaspora into
cd /var/www/html
We can now clone the Diaspora Git
git clone http://github.com/diaspora/diaspora.git
CD into the Diaspora root directory
cd /diaspora
We now run bundle to install all the Diaspora dependancies
bundle install
We can now start our database
service mongod start
And finally start our Diaspora application
bundle exec thin start
Or to deomize it so we don’t have to leave our shell session running
bundle exec thin start -d
Point your browser at your domain and you should be greeted with a login screen
To sign in to the application go to the following url and create yourself a user
If you don’t want Diaspora running on port 3000 you can specify which port to run on at startup, I’m having issues changing my port to a useful one as Apache is running on 80
bundle exec thin start –port=80
Nice tutorial! I was able to follow it and install diaspora, which I never thought I could do, considering I don’t know any of the dependancies.
Great walk through, for my first sneak peek at the application!
You do have to be pretty persistant to get to the end of the tutorial, though. I had to load alternate repositories to yum, etc., and I didn’t install openssh-devel before compiling ruby. But without your tutorial i would have just had to skip the whole install. Everything was straightforward.
Thanks again!
[…] Anleitung hier (http://www.robmcghee.com/web/installing-diaspora-on-a-centos-vps/) hat dabei sehr gut […]
This guide is outdated, please don’t use it anymore. Up-to-date instructions can always be found on: https://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora
Thanks!