Skip to content

Instantly share code, notes, and snippets.

@abdulbasetbasher
Last active May 30, 2023 02:00
Show Gist options
  • Save abdulbasetbasher/7469e0c140e16d25494856ae82481ff3 to your computer and use it in GitHub Desktop.
Save abdulbasetbasher/7469e0c140e16d25494856ae82481ff3 to your computer and use it in GitHub Desktop.
install piku on rocky 8

install dependencies

dnf install epel-release

dnf group install 'Development Tools'

sudo dnf install git openssl python39 python39-devel python39-pip python39-click python3-virtualenv python3-certbot-nginx nginx certbot libjpeg-devel libxml2-devel libxslt-devel zlib-devel uwsgi uwsgi-plugin-python3 uwsgi-plugin-python3-gevent uwsgi-plugin-python3-tornado uwsgi-logger-file uwsgi-logger-systemd

create user

adduser --groups nginx piku

su - piku -c "wget https://raw.githubusercontent.com/piku/piku/master/piku.py && python3 ~/piku.py setup"

su - piku -c "python3 ~/piku.py setup:ssh /tmp/id_rsa.pub" # /tmp/id_rsa.pub ssh key file location

sudo su - piku -c "pip3 install virtualenv"

uwsgi setup

mv /home/piku/.piku/uwsgi/uwsgi.ini /etc/uwsgi.d/piku.ini

chown piku:piku /etc/uwsgi.d/piku.ini

systemctl enable --now uwsgi

nginx setup

echo "include /home/piku/.piku/nginx/*.conf;" > /etc/nginx/conf.d/piku.conf

systemctl enable --now nginx

Set up systemd.path to reload nginx upon config changes

git clone https://github.com/piku/piku.git # need a copy of some files

cp -v piku/piku-nginx.{path,service} /etc/systemd/system/

systemctl enable piku-nginx.{path,service}

systemctl start piku-nginx.path

Check the status of piku-nginx.service

systemctl status piku-nginx.path # should return active: active (waiting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment