|
1632
|
1 Install on local machine:
|
|
|
2
|
|
|
3 1) install mercurial
|
|
|
4 brew install hg
|
|
|
5
|
|
|
6 2) install java
|
|
|
7 brew tap caskroom/versions
|
|
|
8 brew install caskroom/cask/java8
|
|
|
9
|
|
2063
|
10 3) install python3
|
|
|
11 curl -O https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg
|
|
|
12 sudo installer -pkg python-3.7.9-macosx10.9.pkg -target /
|
|
2064
|
13 # update trust store, needed for old versions of macos
|
|
|
14 cd "/Applications/Python 3.7/"
|
|
|
15 chmod +x "Install Certificates.command"
|
|
|
16 ./Install\ Certificates.command
|
|
2063
|
17
|
|
|
18 4) clone repo
|
|
1671
|
19 hg clone https://hg.reactionary.software/repo/luan
|
|
1632
|
20
|
|
2063
|
21 5) Install nginx
|
|
1632
|
22 brew tap denji/nginx
|
|
|
23 brew install nginx-full
|
|
|
24
|
|
2063
|
25 6) Make sudo nginx without password
|
|
1632
|
26 add string to /etc/sudoers
|
|
|
27 %admin ALL=(ALL) NOPASSWD: /usr/local/bin/nginx
|
|
2121
|
28 (requires user to be part of group "admin")
|
|
1632
|
29
|
|
2063
|
30 7) compile
|
|
1632
|
31 ./update.sh
|
|
|
32
|
|
2129
|
33 8) Configure nginx
|
|
|
34 nginx config can exist in many places, on old macOS it is usually /usr/local/etc/nginx/nginx.conf
|
|
|
35 can also exist at /usr/local/nginx/conf/nginx.conf or /etc/nginx/nginx.conf
|
|
|
36
|
|
2130
|
37 add this line at the bottom of the `http` block, after `include servers/*` or `include conf.d/*` or similar
|
|
2129
|
38 include /Users/administrator/luan/host/local/nginx.conf;
|
|
|
39
|
|
|
40 if nginx provides a default server, it conflicts with the luanhost one. remove or disable it.
|
|
|
41 on old macOS this usually does not exist and this step is not needed
|
|
|
42 sudo rm -r /etc/nginx/sites-enabled/default
|
|
|
43
|
|
2130
|
44 if nginx has a server listening on 8080, it will conflict with luanhost
|
|
|
45 either remove it or tell it to listen on some other port
|
|
|
46 this command replaces 8080 with 8090 and creates a backup with .bak
|
|
|
47 sed -i.bak -E 's/listen[[:space:]]+8080/listen 8090/g' /usr/local/etc/nginx/nginx.conf
|
|
|
48
|
|
2129
|
49 9) open in browser http://me.luan.software:8080
|
|
1632
|
50
|
|
|
51 Install on production/test machine:
|
|
2063
|
52 1 - 7 same
|
|
1632
|
53
|
|
2063
|
54 8) Add startup (macOS)
|
|
1632
|
55 look at autostart.txt
|
|
|
56
|
|
2063
|
57 9) Configure ssh for working monitoring and backups (example for s1)
|
|
1632
|
58 create ssh key: ssh-keygen -t rsa -b 4096 -C "administrator@s1.luan.software" (for s1)
|
|
|
59 add ssh key at test.luan.software: edit file /Users/administrator/.ssh/authorized_keys
|
|
|
60
|
|
2063
|
61 10) Reboot the machine
|
|
1632
|
62 sudo reboot
|
|
|
63
|
|
2063
|
64 11) Fix PS1 (for s1 example)
|
|
1632
|
65 echo "PS1='lh-s1:\W\$ '" >> ~/.bash_profile
|
|
|
66
|