forked from skopp/nudgepad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-ubuntu.sh
executable file
·112 lines (60 loc) · 2.03 KB
/
install-ubuntu.sh
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
#!/bin/bash
### Update System
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git gcc make imagemagick sendmail-bin python-software-properties python g++
### Create NudgePad folder
sudo mkdir /nudgepad
sudo chown `whoami`:`whoami` /nudgepad
### Install mon
cd /nudgepad
git clone https://github.com/visionmedia/mon.git
cd mon
sudo make install
### Install git-extras
cd /nudgepad
git clone https://github.com/visionmedia/git-extras
cd git-extras
sudo make install
### Install N
cd /nudgepad
git clone https://github.com/visionmedia/n.git
cd n
sudo make install
### Install Node 0.8.25
#### Note: NudgePad requires node v0.8.*. NudgePad does NOT currently work reliably with node v0.10.x due to a proxy/websocket (issue #1).
cd /nudgepad
sudo n 0.8.25
### Increase the Number of iNotify Watches (is this still necessary?)
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
### Add projects group
sudo groupadd projects
# where ubuntu = your username
sudo usermod -a -G projects `whoami`
### Update system's hostname
echo Enter your hostname
read newHostname
# enter your hostname
echo $newHostname | sudo tee /etc/hostname >/dev/null
sudo hostname $newHostname
# Name your hostname with the root domain of the server
# We recommend then adding a *.domain.com CNAME record to your DNS
### Clone NudgePad
cd /nudgepad
git clone https://github.com/nudgepad/nudgepad.git
### Install NudgePad
cd /nudgepad/nudgepad
sudo npm install
sudo chown -R `whoami`:`whoami` node_modules
# move node_modules to parent dir
mv /nudgepad/nudgepad/node_modules /nudgepad/
sudo npm install -g
### Start NudgePad
/nudgepad/nudgepad/system/nudgepad.sh start
# Go to http://localhost
### Create "np" shortcut. Optional.
echo "alias np='/nudgepad/nudgepad/system/nudgepad.sh'" >> ~/.bash_profile
# The next line is to allow you to run np as sudo if you need to for some things.
echo "alias sudo='sudo '" >> ~/.bash_profile
# Reload your bash_profile to get the np command
source ~/.bash_profile