https://docs.joinpeertube.org/#/install-any-os

1  sudo -i

39 apt-get install curl sudo unzip vim 40 getent group wheel 41 getent group sudo 42 useradd -m /home/pyratebeard -G sudo pyratebeard 43 useradd -m -d /home/pyratebeard -G sudo pyratebeard 44 passwd pyratebeard 45 vim /etc/passwd 46 ip a 47 l 48 visudo 49 cat /etc/debian_version 50 apt-get install certbot python-certbot-nginx nginx 2 sudo certbot --nginx 3 apt-cache search nodejs 4 curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - 5 apt-get install -y nodejs 6 sudo apt-get install -y nodejs 7 sudo apt-get install -y build-essential 8 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - 9 echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list 10 sudo apt update && sudo apt install yarn 11 sudo apt update 12 udo apt install nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git python-dev 13 sudo apt install nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git python-dev 14 ffmpeg -version 15 g++ -v 16 sudo systemctl start redis postgresql 17 $ sudo useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube 18 sudo useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube 19 sudo passwd peertube 20 sudo -u postgres createuser -P peertube 21 sudo -u postgres createdb -O peertube -E UTF8 -T template0 peertube_prod 22 sudo -u postgres psql -c "CREATE EXTENSION pg_trgm;" peertube_prod 23 sudo -u postgres psql -c "CREATE EXTENSION unaccent;" peertube_prod 24 VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && echo "Latest Peertube version is $VERSION" 25 cd /var/www/peertube && sudo -u peertube mkdir config storage versions && cd versions 26 sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" 27 sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip 28 cd ../ && sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest 29 cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile 30 cd /var/www/peertube && sudo -u peertube cp peertube-latest/config/production.yaml.example config/production.yaml 31 vim config/production.yaml 32 sudo vim config/production.yaml 33 sudo cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube 34 sudo sed -i 's/peertube.example.com/tube.pyratebeard.net/g' /etc/nginx/sites-available/peertube 35 sudo vim /etc/nginx/sites-available/peertube 36 ll /var/www/ 37 ls -l /var/www/ 38 sudo ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube 39 sudo systemctl stop nginx 40 sudo vim /etc/nginx/sites-available/peertube 41 sudo certbot --authenticator standalone --installer nginx --post-hook "systemctl start nginx" 42 sudo vim /etc/nginx/sites-available/peertube 43 sudo systemctl reload nginx 44 sudo cp /var/www/peertube/peertube-latest/support/sysctl.d/30-peertube-tcp.conf /etc/sysctl.d/ 45 sudo sysctl -p /etc/sysctl.d/30-peertube-tcp.conf 46 sudo cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/ 47 sudo vim /etc/systemd/system/peertube.service 48 sudo systemctl daemon-reload 49 sudo systemctl enable peertube 50 sudo systemctl start peertube 51 sudo journalctl -feu peertube 52 sudo systemctl stop peertube 53 less /var/www/peertube/.npm/_logs/2020-04-14T21_31_22_591Z-debug.log 54 vim config/production.yaml 55 sudo vim config/production.yaml 56 sudo systemctl start peertube 57 sudo journalctl -feu peertube 58 cd /etc/nginx/sites-available/ 60 ls -l 61 vim peertube 62 sudo systemctl reload nginx 63 cd - 64 sudo vim config/production.yaml 65 cd - 66 vim peertube 67 cd ../ 68 ll sites-enabled/ 69 ls -l sites-enabled/ 70 unlink sites-enabled/default 71 sudo unlink sites-enabled/default 72 ls -l sites-enabled/ 73 sudo systemctl reload nginx 74 sudo journalctl -feu peertube 75 cd - 76 cd /var/www/peertube/ 77 vim config/production.yaml 78 sudo vim config/production.yaml 79 history