grimoire

personal wiki
git clone git://git.pyratebeard.net/grimoire.git
Log | Files | Refs

peertube.md (4546B)


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