36 lines
801 B
Bash
36 lines
801 B
Bash
# 1) OS deps for PyAutoGUI (Linux)
|
|
sudo apt update && sudo apt install -y python3.10 python3.10-venv python3-tk python3-dev scrot
|
|
|
|
# create & use global venv (~/.venvs/httprd310) with Python 3.10
|
|
ENV_DIR="$HOME/.venvs/httprd310"
|
|
python3.10 -m venv "$ENV_DIR"
|
|
source "$ENV_DIR/bin/activate"
|
|
python -m pip install --upgrade pip
|
|
|
|
|
|
|
|
# 2) Python deps (run inside your httprd folder)
|
|
pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
# 4) From viewer machine, open in browser:
|
|
# http://<SERVER-IP>:7417
|
|
hostname -I | awk '{print $1}' # (shows server IP)
|
|
|
|
|
|
|
|
|
|
sudo ufw allow 7417/tcp # open firewall if needed
|
|
|
|
|
|
pip install aiohttp
|
|
|
|
|
|
# (optional quick run)
|
|
python httprd.py --port 12345
|
|
|
|
|
|
# 3) Run the server (set your passwords)
|
|
# python httprd.py --port 7417 --password 'CONTROL123' --view_password 'VIEW123' |