1 Credit: https://github.com/Chocobozzz/PeerTube/issues/33
4 We need to install dependencies:
6 # curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
7 # echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
8 # echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/sources.list
11 # curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
12 # apt-get install -y nodejs ffmpeg postgresql-9.4 openssl nginx yarn
15 We need to create the database:
20 CREATE USER peertube WITH PASSWORD 'peertube';
21 CREATE DATABASE peertube_prod OWNER peertube;
22 GRANT ALL PRIVILEGES ON DATABASE peertube_prod to peertube;
26 We need to create the peertube user:
28 # useradd -m -d /home/peertube -s /bin/bash -p peertube peertube
35 # Build PeerTube application
36 Master branch is for production, develop branch is for... development.
40 $ git clone -b master https://github.com/Chocobozzz/PeerTube
46 Copy the production configuration file template:
48 # cd /home/peertube/PeerTube
50 $ cp config/production.yaml.example config/production.yaml
52 Modify the configuration file:
54 $ vim config/production.yaml
57 Copy the nginx configuration template:
59 # cp /home/peertube/PeerTube/support/nginx/peertube-https /etc/nginx/sites-available/peertube
61 Modify the configuration file:
63 # vim /etc/nginx/sites-available/peertube
65 Active the configuration file:
67 # ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube
68 # systemctl nginx reload
71 Copy the service file:
73 # cp /home/peertube/PeerTube/support/systemd/peertube.service /etc/systemd/system/
75 Update the service file:
77 # vim /etc/systemd/system/peertube.service
78 # systemd daemon-reload
82 # systemctl start peertube
83 # journalctl -feu peertube