aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/dependencies.md
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc/dependencies.md')
-rw-r--r--support/doc/dependencies.md205
1 files changed, 122 insertions, 83 deletions
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md
index 7255f1331..f27e82f32 100644
--- a/support/doc/dependencies.md
+++ b/support/doc/dependencies.md
@@ -16,131 +16,154 @@
16<!-- END doctoc generated TOC please keep comment here to allow auto update --> 16<!-- END doctoc generated TOC please keep comment here to allow auto update -->
17 17
18## Debian / Ubuntu and derivatives 18## Debian / Ubuntu and derivatives
19 1. On a fresh Debian/Ubuntu, as root user, install basic utility programs needed for the installation 19
201. On a fresh Debian/Ubuntu, as root user, install basic utility programs needed for the installation
20 21
21``` 22```
22# apt-get install curl sudo unzip vim 23# apt-get install curl sudo unzip vim
23``` 24```
24 25
25 2. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access 262. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access
27
283. Install certbot (choose instructions for nginx and your distribution) :
29[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
304. Install NodeJS 10.x:
31[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)
325. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest):
33[https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab)
26 34
27 3. Install certbot (choose instructions for nginx and your distribution) : 356. Run:
28 [https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
29 4. Install NodeJS 10.x:
30 [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)
31 5. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest):
32 [https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab)
33 6. Run:
34 36
35``` 37```
36$ sudo apt update 38sudo apt update
37$ sudo apt install nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git python-dev 39sudo apt install nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git python-dev
38$ ffmpeg -version # Should be >= 3.x 40ffmpeg -version # Should be >= 3.x
39$ g++ -v # Should be >= 5.x 41g++ -v # Should be >= 5.x
40``` 42```
41 43
42If you still have a 2.x version of FFmpeg on Ubuntu: 44If you still have a 2.x version of FFmpeg on Ubuntu:
45
43``` 46```
44$ sudo add-apt-repository ppa:jonathonf/ffmpeg-3 47sudo add-apt-repository ppa:jonathonf/ffmpeg-3
45$ sudo apt-get update 48sudo apt-get update
46$ sudo apt install ffmpeg 49sudo apt install ffmpeg
47``` 50```
48 51
49Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis: 52Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis:
53
50``` 54```
51$ sudo systemctl start redis postgresql 55sudo systemctl start redis postgresql
52``` 56```
53 57
54## Arch Linux 58## Arch Linux
55 59
56 1. Run: 601. Run:
57 61
58``` 62```
59$ sudo pacman -S nodejs-lts-dubnium yarn ffmpeg postgresql openssl redis git wget unzip python2 base-devel npm nginx 63sudo pacman -S nodejs-lts-dubnium yarn ffmpeg postgresql openssl redis git wget unzip python2 base-devel npm nginx
60``` 64```
61 65
62Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis: 66Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis:
67
63``` 68```
64$ sudo systemctl start redis postgresql 69sudo systemctl start redis postgresql
65``` 70```
66 71
67## CentOS 7 72## CentOS 7
68 73
69 1. Install NodeJS 10.x: 741. Install NodeJS 10.x:
70 [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora) 75[https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora)
71 2. Install yarn: 76
72 [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install) 772. Install yarn:
73 3. Install or compile ffmpeg: 78[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
74 * Install - [https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/](https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/) 79
75 * Compile - [https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh](https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh) 803. Install or compile ffmpeg:
76 4. Run: 81
82* Install - [https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/](https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/)
83* Compile - [https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh](https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh)
84
854. Run:
77 86
78``` 87```
79$ sudo yum update 88sudo yum update
80$ sudo yum install epel-release centos-release-scl 89sudo yum install epel-release centos-release-scl
81$ sudo yum update 90sudo yum update
82$ sudo yum install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git devtoolset-7 91sudo yum install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git devtoolset-7
83``` 92```
84 93
85 5. You need to use a more up to date version of G++ in order to run the yarn install command, hence the installation of devtoolset-7. 945. You need to use a more up to date version of G++ in order to run the yarn install command, hence the installation of devtoolset-7.
95
86``` 96```
87$ sudo scl enable devtoolset-7 bash 97sudo scl enable devtoolset-7 bash
88``` 98```
89 99
90Later when you invoke any node command, please prefix them with `CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++`, such as with: 100Later when you invoke any node command, please prefix them with `CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++`, such as with:
91 101
92``` 102```
93$ sudo -H -u peertube CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ yarn install --production --pure-lockfile 103sudo -H -u peertube CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ yarn install --production --pure-lockfile
94``` 104```
95 105
96Initialize the PostgreSQL database: 106Initialize the PostgreSQL database:
107
97``` 108```
98$ sudo postgresql-setup initdb 109sudo postgresql-setup initdb
99``` 110```
100 111
101Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis: 112Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis:
113
102``` 114```
103$ sudo systemctl enable redis 115sudo systemctl enable redis
104$ sudo systemctl enable postgresql 116sudo systemctl enable postgresql
105$ sudo systemctl start redis 117sudo systemctl start redis
106$ sudo systemctl start postgresql 118sudo systemctl start postgresql
107``` 119```
108 120
109## Fedora 121## Fedora
110 122
1110. Upgrade your packages: 1231. Upgrade your packages:
124
112``` 125```
113dnf upgrade 126dnf upgrade
114``` 127```
1151. Add a user with sudoers group access: 128
1292. Add a user with sudoers group access:
130
116``` 131```
117useradd my-peertube-user 132useradd my-peertube-user
118passwd my-peertube-user 133passwd my-peertube-user
119usermod my-peertube-user -a -G wheel # Add my-peertube-user to sudoers 134usermod my-peertube-user -a -G wheel # Add my-peertube-user to sudoers
120su my-peertube-user 135su my-peertube-user
121``` 136```
1222. (Optional) Install certbot (choose instructions for nginx and your distribution) : 137
1383. (Optional) Install certbot (choose instructions for nginx and your distribution):
123[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions) 139[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
1243. Install NodeJS 10.x: 140
1414. Install NodeJS 10.x:
125[https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora) 142[https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora)
1264. Install yarn: 143
1445. Install yarn:
127[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install) 145[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
1285. Enable [RPM Fusion](https://rpmfusion.org) for Fedora (available for x86, x86_64, armhfp) 146
1476. Enable [RPM Fusion](https://rpmfusion.org) for Fedora (available for x86, x86_64, armhfp)
148
129``` 149```
130sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm 150sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
131``` 151```
132This is necessary because `ffmpeg` is not in the Fedora repos. 152This is necessary because `ffmpeg` is not in the Fedora repos.
133 153
1346. Run: 1547. Run:
155
135``` 156```
136sudo dnf install nginx ffmpeg postgresql-server postgresql-contrib openssl gcc-c++ make redis git 157sudo dnf install nginx ffmpeg postgresql-server postgresql-contrib openssl gcc-c++ make redis git
137ffmpeg -version # Should be >= 3.x 158ffmpeg -version # Should be >= 3.x
138g++ -v # Should be >= 5.x 159g++ -v # Should be >= 5.x
139``` 160```
1407. Post-installation 161
1628. Post-installation
141 163
142_from [PostgreSQL documentation](https://www.postgresql.org/download/linux/redhat/):_ 164_from [PostgreSQL documentation](https://www.postgresql.org/download/linux/redhat/):_
143> Due to policies for Red Hat family distributions, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically. 165> Due to policies for Red Hat family distributions, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically.
166
144``` 167```
145# PostgreSQL 168# PostgreSQL
146sudo postgresql-setup initdb 169sudo postgresql-setup initdb
@@ -153,9 +176,11 @@ sudo systemctl start nginx.service
153sudo systemctl enable redis.service 176sudo systemctl enable redis.service
154sudo systemctl start redis.service 177sudo systemctl start redis.service
155``` 178```
1568. Firewall 179
1809. Firewall
157 181
158By default, you cannot access your server via public IP. To do so, you must configure firewall: 182By default, you cannot access your server via public IP. To do so, you must configure firewall:
183
159``` 184```
160# Ports used by peertube dev setup 185# Ports used by peertube dev setup
161sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp 186sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp
@@ -166,67 +191,77 @@ sudo firewall-cmd --permanent --zone=public --add-service=https
166# Reload firewall 191# Reload firewall
167sudo firewall-cmd --reload 192sudo firewall-cmd --reload
168``` 193```
1699. Configure max ports
170 194
171This is necessary if you are running dev setup, otherwise you will have errors with `nodemon` 19510. Configure max ports
196
197This is necessary if you are running dev setup, otherwise you will have errors with `nodemon`
198
172``` 199```
173echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p 200echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
174``` 201```
202
175[More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097) 203[More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097)
176 204
177## FreeBSD 205## FreeBSD
178 206
179On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail: 207On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail:
180 208
181 1. bootstrap pkg, initialize db and install peertube's dependencies, always as root (sudo not yet installed): 2091. bootstrap pkg, initialize db and install peertube's dependencies, always as root (sudo not yet installed):
210
182``` 211```
183# pkg 212pkg
184# pkg update 213pkg update
185# pkg install -y sudo bash wget git python nginx pkgconf vips postgresql96-server postgresql96-contrib redis openssl node npm yarn ffmpeg unzip 214pkg install -y sudo bash wget git python nginx pkgconf vips postgresql96-server postgresql96-contrib redis openssl node npm yarn ffmpeg unzip
186``` 215```
187 216
188 2. Allow users in the wheel group (hope you don't forgot to add your user on wheel group!) to use sudo 2172. Allow users in the wheel group (hope you don't forgot to add your user on wheel group!) to use sudo.
218
189``` 219```
190# visudo 220# visudo
191``` 221```
192 222
193 Uncomment the line 90 223Uncomment the line 90
224
194``` 225```
195%wheel ALL=(ALL) ALL 226%wheel ALL=(ALL) ALL
196``` 227```
197 228
198 3. Enable nginx, redis, postgresql services and initialize database 2293. Enable nginx, redis, postgresql services and initialize database.
199 230
200``` 231```
201# sysrc postgresql_enable="YES" 232sysrc postgresql_enable="YES"
202# sysrc redis_enable="YES" 233sysrc redis_enable="YES"
203# sysrc nginx_enable="YES" 234sysrc nginx_enable="YES"
204``` 235```
205 236
206 Initialize database and start services 237Initialize database and start services
238
207``` 239```
208# service postgresql initdb 240service postgresql initdb
209# service postgresql start 241service postgresql start
210# service redis start 242service redis start
211# service nginx start 243service nginx start
212``` 244```
213 245
214## macOS 246## macOS
215* Add the packages:
216 247
217 ``` 2481. Add the packages:
218 brew install ffmpeg nginx postgresql openssl gcc make redis git yarn 249
219 ``` 250```
220* Run the services: 251brew install ffmpeg nginx postgresql openssl gcc make redis git yarn
252```
253
2542. Run the services:
221 255
222 ``` 256```
223 brew services run postgresql 257brew services run postgresql
224 brew services run redis 258brew services run redis
225 ``` 259```
226 260
227## Gentoo 261## Gentoo
228 262
229* Add this to ``/etc/portage/sets/peertube``: 2631. Add this to ``/etc/portage/sets/peertube``:
264
230``` 265```
231net-libs/nodejs 266net-libs/nodejs
232sys-apps/yarn 267sys-apps/yarn
@@ -238,12 +273,13 @@ app-arch/unzip
238dev-lang/python:2.7 273dev-lang/python:2.7
239www-servers/nginx 274www-servers/nginx
240 275
241# Optionnal, client for Let’s Encrypt: 276# Optional, client for Let’s Encrypt:
242# app-crypt/certbot 277# app-crypt/certbot
243# app-crypt/certbot-nginx 278# app-crypt/certbot-nginx
244``` 279```
245 280
246* If you are on a "stable" Gentoo you need to accept the testing keyword ~amd64 yarn: 2812. If you are on a "stable" Gentoo you need to accept the testing keyword ~amd64 yarn:
282
247``` 283```
248mkdir -p /etc/portage/package.keywords 284mkdir -p /etc/portage/package.keywords
249cat << EOF >> /etc/portage/package.keywords/peertube 285cat << EOF >> /etc/portage/package.keywords/peertube
@@ -252,17 +288,20 @@ sys-apps/yarn ~amd64
252EOF 288EOF
253``` 289```
254 290
255* Compile the peertube set: 2913. Compile the peertube set:
292
256``` 293```
257emerge -a @peertube 294emerge -a @peertube
258``` 295```
259 296
260* Initialize the PostgreSQL database if you just merged it: 2974. Initialize the PostgreSQL database if you just merged it:
298
261``` 299```
262emerge --config postgresql 300emerge --config postgresql
263``` 301```
264 302
265* (For OpenRC) Enable and then start the services (replace with the correct PostgreSQL slot): 3035. (For OpenRC) Enable and then start the services (replace with the correct PostgreSQL slot):
304
266``` 305```
267rc-update add redis 306rc-update add redis
268rc-update add postgresql-11 307rc-update add postgresql-11