forked from haxwell/quizki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
49 lines (31 loc) · 2.03 KB
/
INSTALL
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
Installing Quizki on a completely new DigitalOcean droplet.
Assuming Ubuntu 14.04, and that you are initially logged in as 'root'.
SSH KEYS
========
If you are having to log in as root with a password, the ssh key on the local machine is not on the server. Get those keys set up, and then once you are logged in to the quizki server with your password, add the ssh key like so:
cat ~/.ssh/id_rsa.pub | ssh root@[your.ip.address.here] "cat >> ~/.ssh/authorized_keys"
INSTALL
=======
0)
> sudo visudo
at the bottom of the file, enter the line:
Defaults env_keep += "PATH JAVA_HOME TOMCAT_HOME"
^X and save changes
1) Add the Quizki user -
> sudo adduser quizki --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password && echo "quizki:password" | sudo chpasswd && sudo adduser quizki sudo
2) Login as the Quizki user
3) Get the quizki git repository
> cd ~ && mkdir apps && cd apps && sudo apt-get update && sudo apt-get install -y git && git clone https://github.com/haxwell/quizki.git && cd quizki
4) Run the Quizki install script
> sudo ./install-droplet.sh
5) Reboot, and then run the post install scrip
> sudo reboot
> cd ~/apps/quizki && ./install-droplet-post.sh
TODO NEXT:
- Remove docs, examples, manager, and other directories from Tomcat installation.
- is email working? at present, its set up at zoho.com, but be sure you can send and receive email at [email protected] (or your own address if you're not me)
NOTES
======
0) env_keep, as explained in 'man sudoers': "Environment variables to be preserved in the user's environment when the env_reset option is in effect. This allows fine-grained control over the environment sudo-spawned processes will receive." So when you use sudo as the quizki user, these variables will be available for use in the sudo environment.
1) This command adds a user named 'quizki' with a disabled password. The '--gecos' option is to prevent the command from requesting info interactively. Next, the password is set to 'password'. Finally the user is set to be allowed to use sudo.
=======