forked from nodester/nodester
/
install.txt
86 lines (79 loc) · 2.56 KB
/
install.txt
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
Nodester - A node.js hosting platform
Dependencies:
node.js (Latest stable version 0.2.6)
npm
curl
node.js Modules:
http-proxy
express
request
npm-wrapper
daemon-tools
cradle
nodemon
Installation:
Install node.js
Package from distro
OR wget, ./configure, make, make install
Create a user and group to run nodester as
sudo su -
groupadd -g 501 nodester
useradd -d /var/nodester -c "nodester" -g nodester -m -r -s /bin/bash -u 501 nodester
passwd nodester
Login to that account and ensure that .ssh/authorized_keys exists
ssh nodester@yourhost
cd ~
mkdir .ssh
touch .ssh/authorized_keys
chmod go-rwx .ssh/authorized_keys
Update sudoers to allow running of the proxy on port 80
sudo visudo
And add the following lines
nodester ALL = NOPASSWD: /var/nodester/nodester/proxy/start_proxy.sh *
nodester ALL = NOPASSWD: /var/nodester/nodester/proxy/stop.sh
nodester ALL = NOPASSWD: /var/nodester/nodester/scripts/launch_app.sh *
Install npm
cd ~
echo -e "root = ~/.node_libraries\nmanroot = ~/local/share/man\nbinroot = ~/bin" > ~/.npmrc
echo -e "export PATH=\"\${PATH}:~/bin\";" >> ~/.bashrc
source ~/.bashrc
curl http://npmjs.org/install.sh | sh
Either install CouchDB or get a CouchOne account
Install node-module dependencies
for X in http-proxy express node-base64 npm-wrapper request daemon-tools cradle nodemon; do npm install ${X}; done
Get nodester
cd ~
git clone git://github.com/nodester/nodester.git
cd nodester
git submodule init
git submodule update
(Need to do these steps as the non-nodester user)
Ensure that the ownership of nodester/proxy is all root for security
cd /var/nodester
sudo chown -R root:root nodester/proxy
Install the git folder shell to restrict git to per user folders
cd /var/nodester/nodester
sudo cp scripts/git-shell-enforce-directory /usr/local/bin
sudo chmod +x /usr/local/bin/git-shell-enforce-directory
(Back to the nodester user)
Configure the app
Copy nodester/example_config.js to nodester/config.js
Edit the settings in nodester/config.js
Copy scripts/example_gitrepoclone.sh to scripts/gitrepoclone.sh
Update scripts/gitrepoclone.sh with the key you specified in config.js
Setup the CouchDB tables
node setup_couchdb.js
node migrate-views.js
Start up the proxy and main/api app
cd nodester
./start.sh
Test the web frontend at 127.0.0.1:80
Create a user
..
Create an app
..
Start the app
..
Test the app
..
Rejoice!