-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinux-setup.sh
More file actions
executable file
·154 lines (112 loc) · 5.04 KB
/
linux-setup.sh
File metadata and controls
executable file
·154 lines (112 loc) · 5.04 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#! /bin/bash
# Avahi
apt-get install -y avahi-daemon avahi-discover libnss-mdns
# Dundee Makerspace shared file server
apt-get install -y cifs-utils
mkdir /mnt/dmsPublicFiles
echo "# Dundee Makerspace public samba share" >> /etc/fstab
echo "//dms-server.local/public /mnt/dmsPublicFiles cifs guest,rw 0 0" >> /etc/fstab
mount -a
# Set apt proxy by avahi hostname
echo 'Acquire::http::proxy "http://dms-server.local:3142";' > /etc/apt/apt.conf.d/00proxy
echo 'Acquire::https::proxy "DIRECT";' >> /etc/apt/apt.conf.d/00proxy
# curl
apt-get install -y curl
# Add PPAs {
# Google Chrome
curl --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
# node.js v0.12
curl --silent https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
NODE_VERSION=node_0.12
DISTRO="$(lsb_release -s -c)"
echo "deb https://deb.nodesource.com/$NODE_VERSION $DISTRO main" > /etc/apt/sources.list.d/nodesource.list
echo "deb-src https://deb.nodesource.com/$NODE_VERSION $DISTRO main" >> /etc/apt/sources.list.d/nodesource.list
# Oracle VirtualBox
curl --silent https://www.virtualbox.org/download/oracle_vbox_2016.asc | apt-key add -
curl --silent https://www.virtualbox.org/download/oracle_vbox.asc | apt-key add -
echo "deb http://download.virtualbox.org/virtualbox/debian $DISTRO contrib" > /etc/apt/sources.list.d/virtualbox.list
# Atom editor from unofficial PPA
add-apt-repository ppa:webupd8team/atom
# }
# Update package lists
apt-get update
# Mostly borrowed from https://github.com/jfhbrook/makerspace-linux/blob/master/chroot-commands.sh
# Install packages {
# Basic support for compiling stuff
apt-get install -y build-essential
# Source control tools
apt-get install -y bzr git mercurial subversion
# Web browser
apt-get install -y google-chrome-stable
# Missing scripting languages/environments
apt-get install -y php5 nodejs ruby
# Missing package management tools
apt-get install -y php-pear python-pip
# Composer funky install script because using normal package managers is too sensible for PHP developers...
COMPOSER_EXPECTED_SIGNATURE=$(wget https://composer.github.io/installer.sig -O - -q)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
COMPOSER_ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$COMPOSER_EXPECTED_SIGNATURE" = "$COMPOSER_ACTUAL_SIGNATURE" ]
then
php composer-setup.php --quiet
rm composer-setup.php
else
>&2 echo 'ERROR: Invalid composer installer signature'
rm composer-setup.php
fi
mv composer.phar /usr/local/bin/composer
# 2D graphics tools
apt-get install -y gimp inkscape
# CAD software
apt-get install -y blender freecad openscad
# STL analysis/repair/etc tools
apt-get install -y assimp-utils admesh meshlab
# RepRap toolchain
# TODO: slic3r, printrun, tools on thingiverse
# TODO: thingiverse cli? (npm view thingiverse)
apt-get install -y skeinforge
# Arduino and AVR toolchain
apt-get install -y gcc-avr arduino arduino-mk avrdude avr-libc
# Text/code editing
apt-get install -y vim okteta atom
# Networking client/diagnostic tools
apt-get install -y atftp elinks iptables netcat6 lftp pure-ftpd tcpdump whois wireshark
# Networking server tools
# TODO: How do these behave on a livecd??
# TODO: samba xinetd mysql??
# TODO: ecstatic? (npm view ecstatic)
apt-get install -y apache2 libapache2-mod-perl2 libapache2-mod-php5 openssh-server puppet
# Virtual machine hypervisor
apt-get install -y dkms virtualbox-5.0
# TODO: VBox guest extensions too
# Hardware tools
# TODO: ntpasswd
apt-get install -y gparted
# Audio/Video
apt-get install -y audacity avidemux openshot qtractor sox vlc
# Office Stuff
apt-get remove -y sylpheed pidgin xpad
# }
# Install hardware {
# Epson Stylus SX215 printer
# Using gdebi in non-interactive mode instead of dpkg because it will resolve dependencies from official packages
gdebi -n /mnt/dmsPublicFiles/Shared/Epson\ Stylus\ SX210/Linux/epson-inkjet-printer-escpr_1.6.1-1lsb3.2_amd64.deb
gdebi -n /mnt/dmsPublicFiles/Shared/Epson\ Stylus\ SX210/Linux/epson-printer-utility_1.0.0-1lsb3.2_amd64.deb
gdebi -n /mnt/dmsPublicFiles/Shared/Epson\ Stylus\ SX210/Linux/iscan-bundle-1.0.0.x64.deb/data/iscan-data_1.36.0-1_all.deb
gdebi -n /mnt/dmsPublicFiles/Shared/Epson\ Stylus\ SX210/Linux/iscan-bundle-1.0.0.x64.deb/core/iscan_2.30.1-1~usb0.1.ltdl7_amd64.deb
gdebi -n /mnt/dmsPublicFiles/Shared/Epson\ Stylus\ SX210/Linux/iscan-bundle-1.0.0.x64.deb/plugins/iscan-network-nt_1.1.1-1_amd64.deb
apt-get install -y sane sane-utils libsane-extras xsane
# TODO: Install the printer itself instead of just the drivers
# TODO: HP Photosmart 5510 over the network
# }
# Upgrade all out of date packages
apt-get upgrade -y
# Clean up old packages
apt-get autoremove -y
# Node packages {
npm install -g bower gulp grunt-cli
# }
# Desktop shortcuts {
cp *.desktop ~/Desktop
# }