python3 dsh.py #dshell apt-get install qrencode qrencode -t ANSIUTF8 "http://192.168.1.8:8000/getFile/u/vikas/password.txt" nano ~/.bashrc tnz ~/.bashrc chmod +x ./dsh.py nano ./lib0-core/00-fn.py nano ~/.bashrc source ~/.bashrc #reload bashrc file pwd md #move to dsh dir nano +162 ./lib1-tinput/17-sugg.py #open file cursor jump to line 162 #setup server apt update mkdir ~/ZFS #z file system apt install python3-venv python3-pip -y #nginx setup apt install nginx certbot python3-certbot-nginx #install nginx nano /etc/nginx/sites-available/default nginx -t #check nginx file config is ok systemctl reload nginx certbot --nginx -d zshlo.com -d www.zshlo.com #ssh certficate install systemctl status nginx #zshlo service setup python3 ./main.py #uvicorn main:app --host 127.0.0.1 --port 8181 #testing for server nano /etc/systemd/system/zshlo.service #CREATE ZSERVER SERVICE ``` [Unit] Description=Gunicorn instance to serve zshlo After=network.target [Service] User=root Group=www-data WorkingDirectory=/root/zsrc Environment="PATH=/root/zsrc/venv/bin" ExecStart=/root/zsrc/venv/bin/gunicorn -w 4 -k uvicorn.workers.UvicornWorker zshlo:app --bind 127.0.0.1:8181 [Install] WantedBy=multi-user.target ``` systemctl daemon-reload #reload service config systemctl reload zshlo.service systemctl status zshlo.service #zshlo test nano /etc/systemd/system/zshlo.service systemctl enable zshlo.service systemctl start zshlo.service systemctl status zshlo.service systemctl daemon-reload systemctl restart zshlo.service systemctl status zshlo.service #test server mkdir ~/zsrc #z-server code cd ~/zsrc python3 -m venv venv source venv/bin/activate #stat python venv pip3 install fastapi uvicorn gunicorn pip3 install python-multipart uvicorn main:app --host 0.0.0.0 --port 7856 #testing for server deactivate #py venv gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app --bind 127.0.0.1:8181 history history > ./ZFS/history