Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 175 lines (161 sloc) 6.735 kb
608ce1a first commit
Jonathan Hoyt authored
1 #!/bin/bash
2
05be271 second commit
Jonathan Hoyt authored
3 # prereq
8f037c0 updated to work with debian
Jonathan Hoyt authored
4 # su root
5 # apt-get update && apt-get upgrade && apt-get install sudo git-core
6 # add "jukeman ALL=(ALL) ALL" to the /etc/sudoers
7 # git clone git://github.com/jonmagic/jukeman_installer.git && cd jukeman_installer && sh install
608ce1a first commit
Jonathan Hoyt authored
8
05be271 second commit
Jonathan Hoyt authored
9 # install required packages
8849737 updated tinc config
Jonathan Hoyt authored
10 sudo apt-get install build-essential libssl-dev libreadline5-dev alsa-utils mpd mpc liblzo2-2 liblzo2-dev bridge-utils
8f037c0 updated to work with debian
Jonathan Hoyt authored
11
12 # set mixer volumes
c9d7274 updated mongo and mongo gem versions
Jonathan Hoyt authored
13 amixer sset Master 80 unmute
8f037c0 updated to work with debian
Jonathan Hoyt authored
14 amixer sset PCM 250 unmute
15 amixer sset Front 100 unmute
81df25c added tinc config
Jonathan Hoyt authored
16
8849737 updated tinc config
Jonathan Hoyt authored
17 # compile tinc
18 cd src
19 tar zxvf tinc-1.0.12.tar.gz
20 cd tinc-1.0.12
21 ./configure
22 make
23 sudo make install
5e84f51 switched from god to bluepill, this is a working version
Jonathan Hoyt authored
24 sudo mkdir -p /usr/local/var/run
25 sudo mkdir -p /usr/local/var/log
8849737 updated tinc config
Jonathan Hoyt authored
26 cd ..
61355f2 fixed little mistake
Jonathan Hoyt authored
27 cd ..
8849737 updated tinc config
Jonathan Hoyt authored
28
81df25c added tinc config
Jonathan Hoyt authored
29 # setup network to server
61355f2 fixed little mistake
Jonathan Hoyt authored
30 # read -p "What is the REAL ip of the tinc central server (e.g. 67.59.29.202)? " serverip
31 echo "Address = 67.59.29.202" > tinc/vpn/hosts/central
32 # read -p "What is your vpn network subnet (e.g. 10.111.222.0/24)? " subnet
33 echo "Subnet = 10.111.222.0/24" >> tinc/vpn/hosts/central
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
34 ### replace with key from central server
8849737 updated tinc config
Jonathan Hoyt authored
35 echo "-----BEGIN RSA PUBLIC KEY-----" >> tinc/vpn/hosts/central
36 echo "MIGJAoGBAOJA5efj4bw3Rr1HVLuAZZxJFaQcmEB4Ji9wQfgtfneNN1D9M/6lGfTh" >> tinc/vpn/hosts/central
37 echo "0fRRdS1FWFCG27dX+0j4Om7SG+1FKTaJMSdWzBp2pnIC3nGilrCWqCerdENzrMuW" >> tinc/vpn/hosts/central
38 echo "VtPsrNyPiK18g1+0tXthHgQbVHptBWktLR3X1gtGXijB0dh6lxSxAgMBAAE=" >> tinc/vpn/hosts/central
39 echo "-----END RSA PUBLIC KEY-----" >> tinc/vpn/hosts/central
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
40 read -p "What do you want your tinc name to be? It cannot have spaces or dashes, and will be used for vpn and jukeman location name: " myname
364a6cb more tinc fixes
Jonathan Hoyt authored
41 echo "Name = $myname" > tinc/vpn/tinc.conf
8849737 updated tinc config
Jonathan Hoyt authored
42 echo "ConnectTo = central" >> tinc/vpn/tinc.conf
43 echo "Device = /dev/net/tun" >> tinc/vpn/tinc.conf
44 echo "Mode = switch" >> tinc/vpn/tinc.conf
364a6cb more tinc fixes
Jonathan Hoyt authored
45 echo "PrivateKeyFile = /usr/local/etc/tinc/vpn/rsa_key.priv" >> tinc/vpn/tinc.conf
5e84f51 switched from god to bluepill, this is a working version
Jonathan Hoyt authored
46 echo "Subnet = 10.111.222.0/24" > tinc/vpn/hosts/$myname
2957cdb updated jukeman and navvy start scripts and switched to use god for moni...
Jonathan Hoyt authored
47 read -p "What do you want your tinc ip to be (e.g. 10.111.222.???)? " myip
8849737 updated tinc config
Jonathan Hoyt authored
48 echo "ifconfig bridge $myip netmask 255.255.255.0" >> tinc/vpn/tinc-up
49 echo "ifconfig bridge up" >> tinc/vpn/tinc-up
50 sudo cp -r tinc /usr/local/etc/
81df25c added tinc config
Jonathan Hoyt authored
51 sudo tincd -n vpn -K
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
52 clear
53 echo "Copy the following file and paste it to /etc/tinc/vpn/hosts/$myname on the tinc server:"
54 echo ""
55 echo ""
5e84f51 switched from god to bluepill, this is a working version
Jonathan Hoyt authored
56 cat /usr/local/etc/tinc/vpn/hosts/$myname
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
57 sleep 30
58
59 # move to src dir
60 cd src
608ce1a first commit
Jonathan Hoyt authored
61
62 # download and install ruby
05be271 second commit
Jonathan Hoyt authored
63 # wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p248.tar.gz
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
64 tar zxvf ruby-1.8.7-p248.tar.gz
608ce1a first commit
Jonathan Hoyt authored
65 cd ruby-1.8.7-p248
66 ./configure
67 make
1b90d62 added sudo to ruby and rubygems installs, added conditional reboot
Jonathan Hoyt authored
68 sudo make install
608ce1a first commit
Jonathan Hoyt authored
69 cd ..
70
71 # download and install rubygems
05be271 second commit
Jonathan Hoyt authored
72 # wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz
73 tar zxvf rubygems-1.3.6.tgz
74 cd rubygems-1.3.6
1b90d62 added sudo to ruby and rubygems installs, added conditional reboot
Jonathan Hoyt authored
75 sudo ruby setup.rb
608ce1a first commit
Jonathan Hoyt authored
76 cd ..
77
05be271 second commit
Jonathan Hoyt authored
78 # setup and install mongo
30a72dd updated mongodb version
Jonathan Hoyt authored
79 while true; do
80 read -p "Install mongodb 32bit or 64bit? (32, 64) " yn
81 case $yn in
939080b updated to mongodb 1.4.0
Jonathan Hoyt authored
82 32 ) wget http://downloads.mongodb.org/linux/mongodb-linux-i686-1.4.0.tgz; tar zxvf mongodb-linux-i686-1.4.0.tgz; sudo mv mongodb-linux-i686-1.4.0 /opt/mongodb; break;;
83 64 ) wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-1.4.0.tgz; tar zxvf mongodb-linux-x86_64-1.4.0.tgz; sudo mv mongodb-linux-x86_64-1.4.0 /opt/mongodb; break;;
30a72dd updated mongodb version
Jonathan Hoyt authored
84 * ) echo "Please answer 32 or 64.";;
85 esac
86 done
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
87 echo "logappend = true" >> mongod_settings.conf
88 echo "logpath = /var/log/mongodb/mongod.log " >> mongod_settings.conf
89 echo "dbpath = /data/db" >> mongod_settings.conf
90 echo "master = true" >> mongod_settings.conf
81df25c added tinc config
Jonathan Hoyt authored
91 while true; do
92 read -p "Is this a slave jukebox (y/n)? " yn
93 case $yn in
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
94 [Yy]* ) echo "slave = true" >> mongod_settings.conf; read -p "What is the address to the master (e.g. 10.10.10.5:27017)? " ip; echo "source = $ip" >> mongod_settings.conf; break;;
fff5fc0 small update
Jonathan Hoyt authored
95 [Nn]* ) break;;
30a72dd updated mongodb version
Jonathan Hoyt authored
96 * ) echo "Please answer y or n.";;
81df25c added tinc config
Jonathan Hoyt authored
97 esac
98 done
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
99 sudo mv mongod_settings.conf /opt/mongodb/
05be271 second commit
Jonathan Hoyt authored
100 sudo mkdir -p /data/db
db5c37e trying to get the mongod conf working
Jonathan Hoyt authored
101 sudo mkdir -p /var/log/mongodb
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
102 sudo ln -s /opt/mongodb/bin/mongo /usr/bin/mongo
103 sudo ln -s /opt/mongodb/bin/mongod /usr/bin/mongod
104 sudo ln -s /opt/mongodb/bin/mongodump /usr/bin/mongodump
105 sudo ln -s /opt/mongodb/bin/mongorestore /usr/bin/mongorestore
05be271 second commit
Jonathan Hoyt authored
106
608ce1a first commit
Jonathan Hoyt authored
107 # install required gems
db5c37e trying to get the mongod conf working
Jonathan Hoyt authored
108 sudo gem install rails -v2.3.5 --no-ri --no-rdoc
bcabbc5 added mongrel gem for serving stuff
Jonathan Hoyt authored
109 sudo gem install mongrel -v1.1.5 --no-ri --no-rdoc
c9d7274 updated mongo and mongo gem versions
Jonathan Hoyt authored
110 sudo gem install mongo -v0.19.1 --no-ri --no-rdoc
111 sudo gem install mongo_ext -v0.19.1 --no-ri --no-rdoc
5e84f51 switched from god to bluepill, this is a working version
Jonathan Hoyt authored
112 # sudo gem install mongrel -v1.1.5 --no-ri --no-rdoc
c9d7274 updated mongo and mongo gem versions
Jonathan Hoyt authored
113 sudo gem install mongo_mapper -v0.7.1 --no-ri --no-rdoc
db5c37e trying to get the mongod conf working
Jonathan Hoyt authored
114 sudo gem install mime-types -v1.16 --no-ri --no-rdoc
115 sudo gem install ruby-mp3info -v0.6.13 --no-ri --no-rdoc
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
116 sudo gem install navvy -v0.1.0 --no-ri --no-rdoc
8a98e0e fixed god scripts
Jonathan Hoyt authored
117 sudo gem install crack -v0.1.6 --no-ri --no-rdoc
118 sudo gem install httparty -v0.5.2 --no-ri --no-rdoc
c9d7274 updated mongo and mongo gem versions
Jonathan Hoyt authored
119 sudo gem install wand -v0.2.1 --no-ri --no-rdoc
120 sudo gem install jnunemaker-grip -v0.1.1 --no-ri --no-rdoc
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
121 # wget http://github.com/jonmagic/rack-gridfs/raw/master/pkg/rack-gridfs-0.2.0.gem
e0288da fixed rack-gridfs gem to work with slave connections and included it
Jonathan Hoyt authored
122 # sudo gem install jnunemaker-rack-gridfs-0.3.0.gem --no-ri --no-rdoc
123 sudo gem install jnunemaker-rack-gridfs-0.3.0.gem
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
124 # wget http://github.com/jonmagic/librmpd/raw/master/pkg/librmpd-0.1.1.gem
e678c6a fixing minor bugs
Jonathan Hoyt authored
125 sudo gem install librmpd-0.1.1.gem --no-ri --no-rdoc
5e84f51 switched from god to bluepill, this is a working version
Jonathan Hoyt authored
126 # sudo gem install god -v0.8.0 --no-ri --no-rdoc
127 sudo gem install bluepill -v0.0.36 --no-ri --no-rdoc
8f037c0 updated to work with debian
Jonathan Hoyt authored
128 cd ..
e678c6a fixing minor bugs
Jonathan Hoyt authored
129
8f037c0 updated to work with debian
Jonathan Hoyt authored
130 # copy init scripts
8849737 updated tinc config
Jonathan Hoyt authored
131 sudo cp init_scripts/tinc /etc/init.d/
132 sudo update-rc.d tinc defaults
8f037c0 updated to work with debian
Jonathan Hoyt authored
133 sudo cp init_scripts/mongod /etc/init.d/
134 sudo update-rc.d mongod defaults
5e84f51 switched from god to bluepill, this is a working version
Jonathan Hoyt authored
135 sudo cp init_scripts/bluepill /etc/init.d/
136 sudo update-rc.d bluepill defaults 91
8f037c0 updated to work with debian
Jonathan Hoyt authored
137
138 # copy conf files
139 sudo cp conf/mpd.conf /etc/
608ce1a first commit
Jonathan Hoyt authored
140
141 # install jukeman
142 cd ~
143 mkdir apps
144 cd apps
145 git clone git://github.com/jonmagic/jukeman.git
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
146 cd jukeman
e678c6a fixing minor bugs
Jonathan Hoyt authored
147 mkdir log
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
148 echo "development: &non_production_settings" >> config/settings.yml
149 echo " site_name: JukeMan" >> config/settings.yml
150 echo " mpd_port: 6600" >> config/settings.yml
151 echo " location: $myname" >> config/settings.yml
f86e811 made volume setting part of settings.yml
Jonathan Hoyt authored
152 echo " volume: 80" >> config/settings.yml
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
153 echo " import_folder_path: /home/jukeman/music" >> config/settings.yml
154 echo "" >> config/settings.yml
155 echo "test:" >> config/settings.yml
156 echo " <<: *non_production_settings" >> config/settings.yml
157 echo " mpd_port: 7700" >> config/settings.yml
158 echo " location: Testing" >> config/settings.yml
159 echo "production:" >> config/settings.yml
160 echo " site_name: JukeMan" >> config/settings.yml
161 echo " mpd_port: 6600" >> config/settings.yml
162 echo " location: $myname" >> config/settings.yml
f86e811 made volume setting part of settings.yml
Jonathan Hoyt authored
163 echo " volume: 80" >> config/settings.yml
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
164 echo " import_folder_path: /home/jukeman/music" >> config/settings.yml
165 clear
608ce1a first commit
Jonathan Hoyt authored
166
167 # reboot
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
168 while true; do
169 read -p "Reboot (y/n)? " yn
170 case $yn in
171 [Yy]* ) sudo reboot; break;;
fff5fc0 small update
Jonathan Hoyt authored
172 [Nn]* ) break;;
30a72dd updated mongodb version
Jonathan Hoyt authored
173 * ) echo "Please answer y or n.";;
90a0a88 updated installer with latest scripts, gems, and changes
Jonathan Hoyt authored
174 esac
175 done
Something went wrong with that request. Please try again.