forked from diaspora/diaspora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ubuntu-setup.bash
96 lines (83 loc) · 2.43 KB
/
ubuntu-setup.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
# Author : [email protected]
# Site : www.h3manth.com
# This script helps to setup diaspora.
#
# Set extented globbing
shopt -s extglob
# Check if the user has sudo privileges.
[[ $( id -u) ]] && echo "$(whoami) has no sudo permissions on this machine" && exit 1
# Install build tools
echo "Installing build tools.."
sudo apt-get -y --no-install-recommends install build-essential libxslt1.1 libxslt1-dev libxml2
echo "..Done installing build tools"
# Install Ruby 1.8.7
echo "Installing ruby-full Ruby 1.8.7.."
sudo apt-get -y --no-install-recommends install ruby-full
echo "..Done installing Ruby"
# Install Rake
echo "Installing rake.."
sudo apt-get -y --no-install-recommends install rake
echo "..Done installing rake"
# Get the current release and install mongodb
lsb=$(lsb_release -rs)
ver=${lsb//.+(0)/.}
repo="deb http://downloads.mongodb.org/distros/ubuntu ${ver} 10gen"
echo "Setting up MongoDB.."
echo "."
echo ${repo} | sudo tee -a /etc/apt/sources.list
echo "."
echo "Fetching keys.."
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "."
sudo apt-get update
echo "."
sudo apt-get -y --no-install-recommends install mongodb-stable
echo "Done installing monngodb-stable.."
# Install imagemagick
echo "Installing imagemagick.."
sudo apt-get -y --no-install-recommends install imagemagick libmagick9-dev
echo "Installed imagemagick.."
# Install git-core
echo "Installing git-core.."
sudo apt-get -y --no-install-recommends install git-core
echo "Installed git-core.."
# Setting up ruby gems
echo "Fetching and installing ruby gems.."
(
echo "."
cd /tmp
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
echo "."
tar -xf rubygems-1.3.7.tgz
echo "."
cd rubygems-1.3.7
echo "."
sudo ruby setup.rb
echo "."
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
echo "."
)
echo "Done installing the gems.."
# Install blunder
echo "Installing blunder.."
sudo gem install bundler
echo "Installed blunder.."
# Take a clone of Diaspora
(
echo "Clone diaspora source.."
git clone http://github.com/diaspora/diaspora.git
echo "Cloned the source.."
# Install extra gems
cd diaspora
echo "Installing more gems.."
sudo bundle install
echo "Installed."
# Install DB setup
echo "Seting up DB.."
rake db:seed:tom
echo "DB ready. Login -> tom and password -> evankorth. More details ./diaspora/db/seeds/tom.rb."
# Run appserver
echo "Starting server"
bundle exec thin start
)