Install Diaspora one Centos 6.4 with Apache

So Im going to test diaspora on one of my virtual server with run centos 6.4.

Setup Centos

Setup Repos

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm"

Install packages

yum install tar make automake gcc gcc-c++ git net-tools libcurl-devel libxml2-devel libffi-devel libxslt-devel tcl redis ImageMagick npm mysql-server mysql-devel httpd mod_ssl libyaml libyaml-devel patch readline-devel libtool bison

Start services

chkconfig --level 3 httpd on
chkconfig --level 3 mysqld on
chkconfig --level 3 redis on

 

service mysqld start
service httpd start
service redis start

 

Install Diaspora

adduser diaspora
su diaspora

Install ruby

\curl -L https://get.rvm.io | bash -s stable
source /home/diaspora/.rvm/scripts/rvm
 rvm autolibs read-only
rvm install 1.9.3-p448
git clone -b master git://github.com/diaspora/diaspora.git
cd diaspora <-- press y

Configure Mysql

Run this in mysql

Create database diaspora;
CREATE USER 'diaspora'@'localhost' IDENTIFIED BY 'some_pass@diaspora';
GRANT ALL PRIVILEGES ON diaspora.* TO 'diaspora'@'localhost';
 

 

Configure Diaspora

 

cp config/diaspora.yml.example config/diaspora.yml
cp config/database.yml.example config/database.yml

Set up your mysql settings in configure/diaspora.yml

Set up the diaspora.yml with you settings. This is the settings I enabled

url: "https://pod.ztekarna.com"
certificate_authorities: '/etc/pki/tls/certs/ca-bundle.crt'
rails_environment: 'production'
database: 'mysql'
unicorn_worker: 2
pod_name: "Ztekarna"
enable_registrations: true
autofollow_on_join_user: 'diasporahq@joindiaspora.com'
open: true
count: 25
suggest_email: 'admin@ztekarna.com'
enable: true
sender_address: 'no-reply@ztekarna.com'
method: 'smtp'
host: 'localhost'
 port: 25

 

Run diaspora setup

RAILS_ENV=production bundle install --without test development
RAILS_ENV=production bundle exec rake db:create db:schema:load

Start Diaspora

./script/server

Setup Apache config

Use this config for setting up apache

https://gist.github.com/MrZYX/719014

I now for testing use the ssl keys in /etc/pki/tls but for production you should use sign keys.

DONE !

No when diaspora is started you can visit your url and start using Diaspora

 

Starting diaspora then

install screen

yum install screen

Then to start diaspora run

screen
su diaspora
source /home/diaspora/.rvm/scripts/rvm
./script/server
ctr+d

More reading

https://gist.github.com/MrZYX/719014

https://wiki.diasporafoundation.org/Installation/CentOS/6

https://wiki.diasporafoundation.org/Main_Page