Improve docs (#232)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2018-01-23 08:53:15 +01:00 committed by Chocobozzz
parent 451ce9642c
commit e5203ffa12
2 changed files with 22 additions and 10 deletions

View File

@ -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

View File

@ -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
```