view host/doc/install.txt @ 2129:6a2383baecb6

integrate into system nginx
author Violet7
date Fri, 16 Jan 2026 15:30:49 -0800
parents 8311ddedf344
children aaf2795f4ed8
line wrap: on
line source

Install on local machine:

1) install mercurial
  brew install hg

2) install java
  brew tap caskroom/versions
  brew install caskroom/cask/java8

3) install python3
  curl -O https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg
  sudo installer -pkg python-3.7.9-macosx10.9.pkg -target /
  # update trust store, needed for old versions of macos
  cd "/Applications/Python 3.7/"
  chmod +x "Install Certificates.command"
  ./Install\ Certificates.command

4) clone repo
  hg clone https://hg.reactionary.software/repo/luan

5) Install nginx
  brew tap denji/nginx
  brew install nginx-full

6) Make sudo nginx without password
  add string to /etc/sudoers
  %admin ALL=(ALL) NOPASSWD: /usr/local/bin/nginx
  (requires user to be part of group "admin")

7) compile
  ./update.sh

8) Configure nginx
   nginx config can exist in many places, on old macOS it is usually /usr/local/etc/nginx/nginx.conf
   can also exist at /usr/local/nginx/conf/nginx.conf or /etc/nginx/nginx.conf

   add this line inside the `http` block
   include /Users/administrator/luan/host/local/nginx.conf;

   if nginx provides a default server, it conflicts with the luanhost one. remove or disable it.
   on old macOS this usually does not exist and this step is not needed
   sudo rm -r /etc/nginx/sites-enabled/default

9) open in browser http://me.luan.software:8080

Install on production/test machine:
1 - 7 same

8) Add startup (macOS)
  look at autostart.txt

9) Configure ssh for working monitoring and backups (example for s1)
  create ssh key: ssh-keygen -t rsa -b 4096 -C "administrator@s1.luan.software" (for s1)
  add ssh key at test.luan.software: edit file /Users/administrator/.ssh/authorized_keys

10) Reboot the machine
  sudo reboot

11) Fix PS1 (for s1 example)
  echo "PS1='lh-s1:\W\$ '" >> ~/.bash_profile