aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/dependencies.md
diff options
context:
space:
mode:
authorFrank Sträter <frankstrater@gmail.com>2021-08-24 11:51:04 +0200
committerGitHub <noreply@github.com>2021-08-24 11:51:04 +0200
commit644800ef5588e08da2a8227f6d72751d3dca85db (patch)
tree6296da6e6f66db9116cd5a3f455b82ef04b71250 /support/doc/dependencies.md
parent6c8386bc824522f615a910bd1fdb696f70f1d2a9 (diff)
downloadPeerTube-644800ef5588e08da2a8227f6d72751d3dca85db.tar.gz
PeerTube-644800ef5588e08da2a8227f6d72751d3dca85db.tar.zst
PeerTube-644800ef5588e08da2a8227f6d72751d3dca85db.zip
Dependencies RHEL8 (#4337)
* Add guide for RHEL 8 * Remove hash comments in shell scripts to avoid root prompt confusion
Diffstat (limited to 'support/doc/dependencies.md')
-rw-r--r--support/doc/dependencies.md129
1 files changed, 126 insertions, 3 deletions
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md
index d6c084cd7..6f14d33a0 100644
--- a/support/doc/dependencies.md
+++ b/support/doc/dependencies.md
@@ -13,6 +13,7 @@ _note_: only **LTS** versions of external dependencies are supported. If no LTS
13- [CentOS 7](#centos-7) 13- [CentOS 7](#centos-7)
14- [CentOS 8](#centos-8) 14- [CentOS 8](#centos-8)
15- [Fedora](#fedora) 15- [Fedora](#fedora)
16- [RHEL 8](#red-hat-enterprise-linux-8)
16- [FreeBSD](#freebsd) 17- [FreeBSD](#freebsd)
17- [macOS](#macos) 18- [macOS](#macos)
18- [Gentoo](#gentoo) 19- [Gentoo](#gentoo)
@@ -268,14 +269,135 @@ sudo systemctl start redis.service
268 269
269By default, you cannot access your server via public IP. To do so, you must configure firewall: 270By default, you cannot access your server via public IP. To do so, you must configure firewall:
270 271
272- Ports used by peertube dev setup:
271``` 273```
272# Ports used by peertube dev setup
273sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp 274sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp
274sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp 275sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp
275# Optional 276```
277- Optional
278
279```
280sudo firewall-cmd --permanent --zone=public --add-service=http
281sudo firewall-cmd --permanent --zone=public --add-service=https
282```
283
284- Reload firewall
285
286```
287sudo firewall-cmd --reload
288```
289
29011. Configure max ports
291
292This is necessary if you are running dev setup, otherwise you will have errors with `nodemon`
293
294```
295echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
296```
297
298[More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097)
299
300## Red Hat Enterprise Linux 8
301
3021. Register system as root user to Red Hat Subscription Management (create a free Red Hat account if you don't have one yet).
303
304```
305# subscription-manager register --username <username> --password <password> --auto-attach
306# dnf upgrade
307# reboot
308```
309
3102. Install Node.JS
311
312```
313sudo dnf module install nodejs:12
314```
315
3163. Install Yarn
317
318```
319curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
320sudo dnf install yarn
321```
322
3234. Install FFmpeg
324
325```
326sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-$(arch)-rpms"
327sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
328sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
329sudo dnf upgrade
330sudo dnf install ffmpeg
331```
332
3335. Run:
334
335```
336sudo dnf install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git
337```
338
3396. You'll need a symlink for python3 to python for youtube-dl to work
340
341```
342sudo ln -s /usr/bin/python3 /usr/bin/python
343```
344
3457. Initialize the PostgreSQL database:
346
347```
348sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
349```
350
351Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis:
352
353```
354sudo systemctl enable --now redis
355sudo systemctl enable --now postgresql
356```
357
358If you are running the production guide, you also need to slightly pre-configure nginx, because nginx is packaged differently in the Red Hat family distributions:
359
3608. Configure nginx
361
362```
363sudo mkdir /etc/nginx/sites-available
364sudo mkdir /etc/nginx/sites-enabled
365sudo ln -s /etc/nginx/sites-enabled/peertube /etc/nginx/conf.d/peertube.conf
366sudo systemctl enable --now nginx
367```
368
3699. Prepare directory
370
371To add the 'peertube' user, you first have to create the 'www' folder and once the 'peertube' user is added, you have to set the access permissions.
372
373```
374sudo mkdir /var/www
375
376sudo useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube
377sudo passwd peertube
378
379sudo chmod 755 /var/www/peertube/
380```
381
38210. Firewall
383
384By default, you cannot access your server via public IP. To do so, you must configure firewall:
385
386- Ports used by peertube dev setup:
387```
388sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp
389sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp
390```
391- Optional
392
393```
276sudo firewall-cmd --permanent --zone=public --add-service=http 394sudo firewall-cmd --permanent --zone=public --add-service=http
277sudo firewall-cmd --permanent --zone=public --add-service=https 395sudo firewall-cmd --permanent --zone=public --add-service=https
278# Reload firewall 396```
397
398- Reload firewall
399
400```
279sudo firewall-cmd --reload 401sudo firewall-cmd --reload
280``` 402```
281 403
@@ -289,6 +411,7 @@ echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo s
289 411
290[More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097) 412[More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097)
291 413
414
292## FreeBSD 415## FreeBSD
293 416
294On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail: 417On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail: