-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap-raspi3
More file actions
86 lines (61 loc) · 4.16 KB
/
bootstrap-raspi3
File metadata and controls
86 lines (61 loc) · 4.16 KB
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
#! /bin/bash
# The line above tells this script to be interpreted as a bash script when run from the command line.
echo -e "\n\e[96m === We alias 'update' to download and run this particular script ===\e[0m"
grep -q -F 'wget -O - https://raw.githubusercontent.com/RubyStarters/Ideas/master/bootstrap-raspi3 | bash' ~/.bashrc || echo "alias update='wget -O - https://raw.githubusercontent.com/RubyStarters/Ideas/master/bootstrap | bash'" >> ~/.bashrc
echo -e "\n\e[96m === Make sure, we can add extra repositories ===\e[0m"
sudo apt-get --yes --force-yes install software-properties-common
echo -e "\n\e[96m === Add repository for Sonic Pi ===\e[0m"
sudo add-apt-repository ppa:sonic-pi/ppa
echo -e "\n\e[96m === Update of package information ===\e[0m"
sudo apt-get update
echo -e "\n\e[96m === Update all installed packages to ensure all security updates are obtained ===\e[0m"
sudo apt-get --yes --force-yes dist-upgrade
echo -e "\n\e[96m === We enable the firewall, because we will install server applications afterwards ===\e[0m"
sudo ufw enable
echo -e "\n\e[96m === Ruby prerequesites and tools: Bash, Curl, C Compiler, and several libraries to be able to install gems later ===\e[0m"
sudo apt-get --yes --force-yes install bash curl build-essential bison openssl libreadline6 libreadline6-dev zlib1g
sudo apt-get --yes --force-yes install zlib1g-dev libssl-dev libsqlite3-0 libxml2-dev curl libffi-dev libgmp3-dev
sudo apt-get --yes --force-yes install libyaml-dev libxslt-dev autoconf libreadline5 libltdl-dev
sudo apt-get --yes --force-yes install libncurses5-dev libserf1-dbg libsvn1 libtool subversion libgdbm-dev pkg-config
echo -e "\n\e[96m === Geany and Gedit are two editors / IDEs, that can handle Ruby well ===\e[0m"
sudo apt-get --yes --force-yes install gedit geany
echo -e "\n\e[96m === SQLite database management system plus client ===\e[0m"
sudo apt-get --yes --force-yes install libsqlite3-dev sqlite3
echo -e "\n\e[96m === PostgresQL database management system plus client ===\e[0m"
sudo apt-get --yes --force-yes install postgresql-client postgresql postgresql-contrib pgadmin3 libpq-dev
echo -e "\n\e[96m === Let's install Apache and OpenSSH-Server, if we want to share data ===\e[0m"
sudo apt-get --yes --force-yes install apache2 openssh-server
echo -e "\n\e[96m === Git alongside a GUI application for it ===\e[0m"
sudo apt-get --yes --force-yes install git git-core gitg
echo -e "\n\e[96m === We install rvm by first installing their public ssh-key ... ===\e[0m"
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
echo -e "\n\e[96m === ... and then rvm itself ===\e[0m"
\curl -sSL https://get.rvm.io | bash
echo -e "\n\e[96m === Some Ubuntu flavours need more help sourcing rvm from terminals, but only if it's not already there ===\e[0m"
grep -q -F '/.rvm/scripts/rvm' ~/.bashrc || echo "source /home/$(whoami)/.rvm/scripts/rvm" >> ~/.bashrc
echo -e "\n\e[96m === Furthermore we need to load it on the fly ===\e[0m"
source /home/$(whoami)/.rvm/scripts/rvm
echo -e "\n\e[96m === Let's install Ruby 2.1, 2.2 and 2.3 ===\e[0m"
rvm install ruby-2.2
echo -e "\n\e[96m === For Ruby 2.2: ===\e[0m"
rvm --default use 2.2
echo -e "\n\e[96m === .. but with latest Rails 4. ===\e[0m"
gem query -i -n bundler || gem install bundler
gem query -i -n rails || gem install rails:'<5'
gem query -i -n sqlite3 || gem install sqlite3
gem query -i -n pg || gem install pg
gem query -i -n devise || gem install devise
gem query -i -n paperclip || gem install paperclip
echo -e "\n\e[96m === Terminator is a way more powerfull terminal applicaton ===\e[0m"
sudo apt-get --yes --force-yes install terminator
echo -e "\n\e[96m === Installation of Google Chromium as second browser ===\e[0m"
sudo apt-get --yes --force-yes install chromium-browser
echo -e "\n\e[96m === Some tools for debugging networking, file changes and memory issues ===\e[0m"
sudo apt-get --yes --force-yes install htop dstat meld
echo -e "\n\e[96m === Sonic Pi ===\e[0m"
sudo apt-get --yes --force-yes install sonic-pi
echo -e "\n\e[96m === Clear package caches ===\e[0m"
sudo apt-get clean
sudo apt-get autoclean
echo -e "\n\e[96m === We are done! Have fun coding! ===\e[0m"
# echo -e "\n\e[96m === ===\e[0m"