diff options
author | Frank Sträter <frankstrater@gmail.com> | 2021-08-24 11:51:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 11:51:04 +0200 |
commit | 644800ef5588e08da2a8227f6d72751d3dca85db (patch) | |
tree | 6296da6e6f66db9116cd5a3f455b82ef04b71250 /support/doc | |
parent | 6c8386bc824522f615a910bd1fdb696f70f1d2a9 (diff) | |
download | PeerTube-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')
-rw-r--r-- | support/doc/dependencies.md | 129 |
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 | ||
269 | By default, you cannot access your server via public IP. To do so, you must configure firewall: | 270 | By 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 | ||
273 | sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp | 274 | sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp |
274 | sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp | 275 | sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp |
275 | # Optional | 276 | ``` |
277 | - Optional | ||
278 | |||
279 | ``` | ||
280 | sudo firewall-cmd --permanent --zone=public --add-service=http | ||
281 | sudo firewall-cmd --permanent --zone=public --add-service=https | ||
282 | ``` | ||
283 | |||
284 | - Reload firewall | ||
285 | |||
286 | ``` | ||
287 | sudo firewall-cmd --reload | ||
288 | ``` | ||
289 | |||
290 | 11. Configure max ports | ||
291 | |||
292 | This is necessary if you are running dev setup, otherwise you will have errors with `nodemon` | ||
293 | |||
294 | ``` | ||
295 | echo 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 | |||
302 | 1. 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 | |||
310 | 2. Install Node.JS | ||
311 | |||
312 | ``` | ||
313 | sudo dnf module install nodejs:12 | ||
314 | ``` | ||
315 | |||
316 | 3. Install Yarn | ||
317 | |||
318 | ``` | ||
319 | curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo | ||
320 | sudo dnf install yarn | ||
321 | ``` | ||
322 | |||
323 | 4. Install FFmpeg | ||
324 | |||
325 | ``` | ||
326 | sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-$(arch)-rpms" | ||
327 | sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | ||
328 | sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm | ||
329 | sudo dnf upgrade | ||
330 | sudo dnf install ffmpeg | ||
331 | ``` | ||
332 | |||
333 | 5. Run: | ||
334 | |||
335 | ``` | ||
336 | sudo dnf install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git | ||
337 | ``` | ||
338 | |||
339 | 6. You'll need a symlink for python3 to python for youtube-dl to work | ||
340 | |||
341 | ``` | ||
342 | sudo ln -s /usr/bin/python3 /usr/bin/python | ||
343 | ``` | ||
344 | |||
345 | 7. Initialize the PostgreSQL database: | ||
346 | |||
347 | ``` | ||
348 | sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql | ||
349 | ``` | ||
350 | |||
351 | Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis: | ||
352 | |||
353 | ``` | ||
354 | sudo systemctl enable --now redis | ||
355 | sudo systemctl enable --now postgresql | ||
356 | ``` | ||
357 | |||
358 | If 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 | |||
360 | 8. Configure nginx | ||
361 | |||
362 | ``` | ||
363 | sudo mkdir /etc/nginx/sites-available | ||
364 | sudo mkdir /etc/nginx/sites-enabled | ||
365 | sudo ln -s /etc/nginx/sites-enabled/peertube /etc/nginx/conf.d/peertube.conf | ||
366 | sudo systemctl enable --now nginx | ||
367 | ``` | ||
368 | |||
369 | 9. Prepare directory | ||
370 | |||
371 | To 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 | ``` | ||
374 | sudo mkdir /var/www | ||
375 | |||
376 | sudo useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube | ||
377 | sudo passwd peertube | ||
378 | |||
379 | sudo chmod 755 /var/www/peertube/ | ||
380 | ``` | ||
381 | |||
382 | 10. Firewall | ||
383 | |||
384 | By 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 | ``` | ||
388 | sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp | ||
389 | sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp | ||
390 | ``` | ||
391 | - Optional | ||
392 | |||
393 | ``` | ||
276 | sudo firewall-cmd --permanent --zone=public --add-service=http | 394 | sudo firewall-cmd --permanent --zone=public --add-service=http |
277 | sudo firewall-cmd --permanent --zone=public --add-service=https | 395 | sudo firewall-cmd --permanent --zone=public --add-service=https |
278 | # Reload firewall | 396 | ``` |
397 | |||
398 | - Reload firewall | ||
399 | |||
400 | ``` | ||
279 | sudo firewall-cmd --reload | 401 | sudo 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 | ||
294 | On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail: | 417 | On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail: |