Installation/Script: Difference between revisions

From diaspora* project wiki
mNo edit summary
(Note that the script got removed.)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Work_in_progress}}
{{Out of date}}
{{Out of date}}
{{Note|The script got removed due to not being maintained and having bugs. You can try an alternative script at https://github.com/Raven24/diaspora-install}}


== Foreword ==
== Quick Start ==


This articles focuses on how to get a development environment setup on a linux distribution.
Here's how to get a [http://guides.rubyonrails.org/getting_started.html development environment] up and running. This is where any new pod runner should start, as well as anyone looking to contribute to diaspora*.
Besides installation means, the setting up should be pretty the same on Windows.
If you have any problem, don't hesitate to join us on [[IRC#IRC|IRC]]


The project uses the following tools with following versions. We will explain you how to get them :
This script assumes you have a [http://railsapps.github.io/installing-rails.html basic Rails setup installed].


{|
==== Step 1: Run the script and follow the on screen instructions. ====
! style="text-align:left;"| Tool
! Version
|-
| Ruby
| 2.1.2
|-
| Ruby Gem
| any
|-
| Rails
| 4.1.6
|-
| RVM
| any
|-
| Rspec
| 3.0
|-
| Bundler gem
| any
|}


==== Step 1: Get the sources and install the tools ====
  bash <(curl https://raw.githubusercontent.com/diaspora/diaspora/master/script/install.sh)


The diaspora* project uses git and Github to manage sources. You can clone them with the following command :
Alternatively you can also try an experimental install script (written in Ruby): [https://github.com/Raven24/diaspora-install see here]


    git clone https://github.com/diaspora/diaspora.git
==== Step 2: Run the development server ====


Then, to get the tools, you must use the packaging command-line tool of your distribution : <tt>apt-get</tt>, <tt>urpmi</tt>, <tt>yum</tt>, etc...
  rails s
Ruby should be in every decent distribution repo :


  # On Mageia/Mandriva :
then visit 'http://localhost:3000' in your browser.
  urpmi ruby
  # On Ubuntu/Debian :
  apt-get install ruby
  # On Fedora/CentOS :
  yum install ruby


The other tools might or might not be prepackaged by your distribution. On Mageia/Mandriva Linux, you should do the following :
==== Step 3 (for developers): Run tests ====


  urpmi ruby-RubyGems
  rake
  urpmi ruby-rails
  urpmi ruby-rvm
  urpmi ruby-rspec
  urpmi ruby-bundler
 
Your distribution might have a different naming scheme for ruby packages. If they are not named the same way than on Mageia/Mandriva, you can search them with the following :
 
  # On Fedora/CentOS :
  yum search rvm
  # On Debian/Ubuntu :
  apt-cache search rvm
 
If you can't find any of these, you should be able to get all the required tools with RubyGems.
Please refer to the [https://rubygems.org/pages/download following page] to see how to install and use it.
 
It is better to use the tools packaged by your distribution than these installed by gem if they exists.
At least, you should have the <tt>rvm</tt> and <tt>bundler</tt> gems installed.
 
==== Step 2: Setting up the environment ====


Once you have <tt>rvm</tt> and <tt>bundler</tt> installed, place yourself in the diaspora source directory and type :
==== Step 4 (for everyone): Party! ====


    # Will install the correct version of ruby
    rvm install 2.1.2
    # Rvm requires bash to be run in login mode before setting a default version of Ruby
    /bin/bash --login
    # Will use the correct version of ruby by default
    rvm use 2.1.2 --default
    # Turn off the previous bash thread
    exit
the <tt>--default</tt> option will make ruby use the version by default in every shell. Without this option, you will have to type <tt>rvm use 2.0.0-p481</tt> each time you want to start the diaspora server.
Then, install all the required bundles :
    bundle update
One last step : configure all the config files ! Move to ''./config'' and copy all the ''.example'' files renaming them by removing the ''.example'' part.
You should have three : ''diaspora.yml.example'', ''database.yml.example'' and ''schedule.yml.example''. Or you can do it with one command-line... because it's cool !
    for file in `ls *.example`; do cp "$file" `echo "$file" | sed s/.example//`; done
Then, edit the file ''database.yml'' to set the credentials to your database. by default, it is using mysql, but you can set postgres.
You just have to comment the line <tt><<: *mysql</tt> and uncomment <tt>#<<: *postgres</tt>
If you want to work on the XMPP chat, please also follow the instructions [[Vines|there]].
==== Step 3 : start the server ! ====
    ./script/server
and go to the page [http://0.0.0.0:3000 http://0.0.0.0:3000]
==== Step 4 : Run tests ====
  rake


==== Step 5 : Troubles ? ====
== Main installation guides ==
Want a production setup? Having trouble with the installation script? Want to install diaspora* the slow way?


You have many ways to [[How_we_communicate|contact us]]
Read the specific installation guides [[Installation|here]].

Latest revision as of 13:19, 2 May 2015

Out of dateOut of date:This page's accuracy may be compromised due to out-of-date information. Please help improve the page by updating it. There may be additional information on the talk page.
NoteNote:The script got removed due to not being maintained and having bugs. You can try an alternative script at https://github.com/Raven24/diaspora-install

Quick Start

Here's how to get a development environment up and running. This is where any new pod runner should start, as well as anyone looking to contribute to diaspora*.

This script assumes you have a basic Rails setup installed.

Step 1: Run the script and follow the on screen instructions.

 bash <(curl https://raw.githubusercontent.com/diaspora/diaspora/master/script/install.sh)

Alternatively you can also try an experimental install script (written in Ruby): see here

Step 2: Run the development server

 rails s

then visit 'http://localhost:3000' in your browser.

Step 3 (for developers): Run tests

 rake

Step 4 (for everyone): Party!

Main installation guides

Want a production setup? Having trouble with the installation script? Want to install diaspora* the slow way?

Read the specific installation guides here.