From e5203ffa1260ee03f0f84ef6b65d57ccad5ee695 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 23 Jan 2018 08:53:15 +0100 Subject: Improve docs (#232) Signed-off-by: Thomas Citharel --- support/doc/dependencies.md | 8 ++++---- support/doc/production.md | 24 ++++++++++++++++++------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md index 2f2d4f49d..c950b357f 100644 --- a/support/doc/dependencies.md +++ b/support/doc/dependencies.md @@ -1,6 +1,6 @@ # Dependencies -## Debian / Ubuntu +## Debian / Ubuntu and derivatives 1. Install NodeJS 8.x (current LTS): [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions) @@ -9,8 +9,8 @@ 4. Run: ``` -$ apt-get update -$ apt-get install nginx ffmpeg postgresql openssl g++ make +$ sudo apt update +$ sudo apt install nginx ffmpeg postgresql openssl g++ make ``` ## Arch Linux @@ -18,7 +18,7 @@ $ apt-get install nginx ffmpeg postgresql openssl g++ make 1. Run: ``` -$ pacman -S nodejs yarn ffmpeg postgresql openssl +$ sudo pacman -S nodejs yarn ffmpeg postgresql openssl ``` ## Other distributions diff --git a/support/doc/production.md b/support/doc/production.md index 49569dad4..ee8bf2647 100644 --- a/support/doc/production.md +++ b/support/doc/production.md @@ -12,12 +12,16 @@ Create a `peertube` user with `/home/peertube` home: ``` $ sudo useradd -m -d /home/peertube -s /bin/bash -p peertube peertube +``` + +Set its password: +``` $ sudo passwd peertube ``` ### Database -Create production database and peertube user: +Create the production database and a peertube user inside PostgreSQL: ``` $ sudo -u postgres createuser -P peertube @@ -26,13 +30,21 @@ $ sudo -u postgres createdb -O peertube peertube_prod ### Prepare PeerTube directory +Fetch the latest tagged version of Peertube +``` +$ 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" +``` +Open the peertube directory, create a few required directories +``` + cd /home/peertube && sudo -u peertube mkdir config storage versions && cd versions +``` +Download the latest version of the Peertube client, unzip it and remove the zip ``` -$ VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && \ - cd /home/peertube && \ - sudo -u peertube mkdir config storage versions && \ - cd versions && \ sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" && \ - sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip && \ + sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip +``` +Install Peertube +``` cd ../ && sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest && \ cd ./peertube-latest && sudo -u peertube yarn install --production --pure-lockfile ``` -- cgit v1.2.3