]>
Commit | Line | Data |
---|---|---|
afe81767 | 1 | # Dependencies |
63bfad7e | 2 | |
3dd6d6cd | 3 | Follow the below guides, and check their versions match [required external dependencies versions](https://github.com/Chocobozzz/PeerTube/blob/master/engines.yaml). You can check them automatically via `sudo npx engineslist`. |
867ed651 | 4 | |
c9b36909 RK |
5 | _note_: only **LTS** versions of external dependencies are supported. If no LTS version matching the version constraint is available, only **release** versions are supported. |
6 | ||
92340699 RK |
7 | <!-- START doctoc generated TOC please keep comment here to allow auto update --> |
8 | <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | |
9 | ||
10 | ||
11 | - [Debian / Ubuntu and derivatives](#debian--ubuntu-and-derivatives) | |
12 | - [Arch Linux](#arch-linux) | |
13 | - [CentOS 7](#centos-7) | |
59bc5f7d | 14 | - [CentOS 8](#centos-8) |
92340699 | 15 | - [Fedora](#fedora) |
644800ef | 16 | - [RHEL 8](#red-hat-enterprise-linux-8) |
92340699 RK |
17 | - [FreeBSD](#freebsd) |
18 | - [macOS](#macos) | |
19 | - [Gentoo](#gentoo) | |
20 | - [Other distributions](#other-distributions) | |
21 | ||
22 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> | |
23 | ||
e5203ffa | 24 | ## Debian / Ubuntu and derivatives |
ab87af11 DK |
25 | |
26 | 1. On a fresh Debian/Ubuntu, as root user, install basic utility programs needed for the installation | |
955f14a4 | 27 | |
bc2fc1a7 | 28 | ``` |
99402413 | 29 | # apt-get install curl sudo unzip vim |
bc2fc1a7 | 30 | ``` |
955f14a4 | 31 | |
ab87af11 DK |
32 | 2. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access |
33 | ||
1d840011 | 34 | 3. Install NodeJS 14.x: |
ab87af11 | 35 | [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) |
d8658f0f | 36 | 4. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest): |
ab87af11 | 37 | [https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab) |
63bfad7e | 38 | |
d8658f0f | 39 | 5. Run: |
63bfad7e | 40 | |
afe81767 | 41 | ``` |
ab87af11 | 42 | sudo apt update |
3f8ae0e4 | 43 | sudo apt install certbot nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git python-dev cron wget |
f309a156 | 44 | ffmpeg -version # Should be >= 4.1 |
ab87af11 | 45 | g++ -v # Should be >= 5.x |
63bfad7e C |
46 | ``` |
47 | ||
81cdf382 | 48 | Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis: |
ab87af11 | 49 | |
81cdf382 | 50 | ``` |
ab87af11 | 51 | sudo systemctl start redis postgresql |
81cdf382 RK |
52 | ``` |
53 | ||
afe81767 | 54 | ## Arch Linux |
63bfad7e | 55 | |
ab87af11 | 56 | 1. Run: |
63bfad7e | 57 | |
afe81767 | 58 | ``` |
d35f3a86 | 59 | sudo pacman -S nodejs-lts-fermium yarn ffmpeg postgresql openssl redis git wget unzip python2 base-devel npm nginx |
63bfad7e C |
60 | ``` |
61 | ||
81cdf382 | 62 | Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis: |
ab87af11 | 63 | |
81cdf382 | 64 | ``` |
ab87af11 | 65 | sudo systemctl start redis postgresql |
81cdf382 RK |
66 | ``` |
67 | ||
053ad3a3 EC |
68 | ## CentOS 7 |
69 | ||
9162476f | 70 | 1. Install NodeJS 12.x: |
ab87af11 DK |
71 | [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora) |
72 | ||
f309a156 | 73 | 2. Install yarn: |
ab87af11 DK |
74 | [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install) |
75 | ||
76 | 3. Install or compile ffmpeg: | |
77 | ||
78 | * Install - [https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/](https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/) | |
79 | * Compile - [https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh](https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh) | |
80 | ||
f309a156 | 81 | 4. Install Packages: |
053ad3a3 EC |
82 | |
83 | ``` | |
ab87af11 DK |
84 | sudo yum update |
85 | sudo yum install epel-release centos-release-scl | |
86 | sudo yum update | |
87 | sudo yum install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git devtoolset-7 | |
0414ed10 O |
88 | ``` |
89 | ||
ab87af11 DK |
90 | 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. |
91 | ||
4c86a254 | 92 | ``` |
ab87af11 | 93 | sudo scl enable devtoolset-7 bash |
053ad3a3 EC |
94 | ``` |
95 | ||
d4557fd3 RK |
96 | Later 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: |
97 | ||
98 | ``` | |
ab87af11 | 99 | 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 |
d4557fd3 RK |
100 | ``` |
101 | ||
f309a156 | 102 | 6. Initialize the PostgreSQL database: |
ab87af11 | 103 | |
f60e85ce | 104 | ``` |
39072b2f | 105 | sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql |
f60e85ce W |
106 | ``` |
107 | ||
f309a156 | 108 | Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis: |
ab87af11 | 109 | |
81cdf382 | 110 | ``` |
a075cd00 CGI |
111 | sudo systemctl enable --now redis |
112 | sudo systemctl enable --now postgresql | |
81cdf382 RK |
113 | ``` |
114 | ||
a075cd00 CGI |
115 | ## Centos 8 |
116 | ||
9162476f | 117 | 1. Install NodeJS 12.x: |
a075cd00 CGI |
118 | [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora) |
119 | ||
f309a156 | 120 | 2. Install yarn: |
a075cd00 CGI |
121 | [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install) |
122 | ||
123 | 3. Install or compile ffmpeg: | |
124 | ||
125 | * Install - [https://linuxize.com/post/how-to-install-ffmpeg-on-centos-8/](https://linuxize.com/post/how-to-install-ffmpeg-on-centos-8/) | |
126 | ||
f309a156 | 127 | 4. Install packages: |
a075cd00 CGI |
128 | |
129 | ``` | |
130 | sudo dnf update | |
f309a156 | 131 | sudo dnf install epel-release |
a075cd00 CGI |
132 | sudo dnf update |
133 | sudo dnf install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git | |
134 | ``` | |
135 | ||
136 | 5. You'll need a symlink for python3 to python for youtube-dl to work | |
137 | ||
138 | ``` | |
139 | sudo ln -s /usr/bin/python3 /usr/bin/python | |
140 | ``` | |
141 | ||
f309a156 | 142 | 6. Initialize the PostgreSQL database: |
a075cd00 CGI |
143 | |
144 | ``` | |
39072b2f | 145 | sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql |
a075cd00 CGI |
146 | ``` |
147 | ||
f309a156 | 148 | Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis: |
a075cd00 CGI |
149 | |
150 | ``` | |
151 | sudo systemctl enable --now redis | |
152 | sudo systemctl enable --now postgresql | |
153 | ``` | |
154 | ||
d35f3a86 | 155 | ## Rocky Linux 8.4 |
f68d1cb6 | 156 | |
d35f3a86 | 157 | 1. Pull the latest updates: |
f68d1cb6 W |
158 | ``` |
159 | sudo dnf update -y | |
160 | ``` | |
161 | ||
2a21507a | 162 | 2. Install NodeJS 12.x (or 14): |
f68d1cb6 W |
163 | ``` |
164 | sudo dnf module install -y nodejs:12 | |
165 | ``` | |
166 | ||
d35f3a86 | 167 | 3. Install yarn: |
f68d1cb6 W |
168 | ``` |
169 | sudo npm install --global yarn | |
170 | ``` | |
171 | ||
d35f3a86 | 172 | 4. Install or compile ffmpeg (if you want to compile... enjoy): |
f68d1cb6 | 173 | ``` |
d35f3a86 | 174 | sudo dnf install -y epel-release |
f68d1cb6 W |
175 | sudo dnf --enablerepo=powertools install -y SDL2 SDL2-devel |
176 | sudo dnf install -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm | |
177 | sudo dnf install -y ffmpeg | |
178 | sudo dnf update -y | |
179 | ``` | |
180 | ||
181 | 5. Install PostgreSQL and Python3 and other stuff: | |
182 | ``` | |
183 | sudo dnf install -y nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git python3 | |
184 | sudo ln -s /usr/bin/python3 /usr/bin/python | |
185 | sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql | |
186 | sudo systemctl enable --now redis | |
187 | sudo systemctl enable --now postgresql | |
188 | ``` | |
189 | ||
190 | 6. Configure the peertube user: | |
191 | ``` | |
192 | sudo useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube | |
193 | ``` | |
194 | ||
195 | 7. Unknown missing steps: | |
d35f3a86 C |
196 | - Steps missing here... these were adapted from the CentOS 8 steps which abruptly ended. |
197 | - /var/www/peertube does not exist yet (expected? done in future steps? documentation?). | |
198 | - Nothing about Certbot, NGINX, Firewall settings, and etc. | |
199 | - Hopefully someone can suggest what is missing here with some hints so I can add it? | |
a075cd00 | 200 | |
0a314a99 | 201 | ## Fedora |
202 | ||
ab87af11 DK |
203 | 1. Upgrade your packages: |
204 | ||
0a314a99 | 205 | ``` |
206 | dnf upgrade | |
207 | ``` | |
ab87af11 DK |
208 | |
209 | 2. Add a user with sudoers group access: | |
210 | ||
0a314a99 | 211 | ``` |
212 | useradd my-peertube-user | |
213 | passwd my-peertube-user | |
214 | usermod my-peertube-user -a -G wheel # Add my-peertube-user to sudoers | |
215 | su my-peertube-user | |
216 | ``` | |
ab87af11 | 217 | |
d8658f0f | 218 | 3. (Optional) Install certbot (choose instructions for your distribution): |
0a314a99 | 219 | [https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions) |
ab87af11 | 220 | |
9162476f | 221 | 4. Install NodeJS 12.x: |
0a314a99 | 222 | [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora) |
ab87af11 | 223 | |
f309a156 | 224 | 5. Install yarn: |
0a314a99 | 225 | [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install) |
ab87af11 DK |
226 | |
227 | 6. Enable [RPM Fusion](https://rpmfusion.org) for Fedora (available for x86, x86_64, armhfp) | |
228 | ||
0a314a99 | 229 | ``` |
230 | sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm | |
231 | ``` | |
232 | This is necessary because `ffmpeg` is not in the Fedora repos. | |
233 | ||
ab87af11 DK |
234 | 7. Run: |
235 | ||
0a314a99 | 236 | ``` |
39072b2f | 237 | sudo dnf install nginx ffmpeg postgresql-server postgresql-contrib openssl gcc-c++ make redis git vim |
f309a156 | 238 | ffmpeg -version # Should be >= 4.1 |
0a314a99 | 239 | g++ -v # Should be >= 5.x |
240 | ``` | |
ab87af11 | 241 | |
8182a370 FS |
242 | 8. Configure nginx |
243 | ||
244 | ``` | |
245 | sudo mkdir /etc/nginx/sites-available | |
246 | sudo mkdir /etc/nginx/sites-enabled | |
247 | sudo ln -s /etc/nginx/sites-enabled/peertube /etc/nginx/conf.d/peertube.conf | |
248 | ``` | |
249 | ||
250 | 9. Post-installation | |
0a314a99 | 251 | |
252 | _from [PostgreSQL documentation](https://www.postgresql.org/download/linux/redhat/):_ | |
253 | > Due to policies for Red Hat family distributions, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically. | |
ab87af11 | 254 | |
0a314a99 | 255 | ``` |
256 | # PostgreSQL | |
39072b2f | 257 | sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql |
0a314a99 | 258 | sudo systemctl enable postgresql.service |
259 | sudo systemctl start postgresql.service | |
260 | # Nginx | |
261 | sudo systemctl enable nginx.service | |
262 | sudo systemctl start nginx.service | |
263 | # Redis | |
264 | sudo systemctl enable redis.service | |
265 | sudo systemctl start redis.service | |
266 | ``` | |
ab87af11 | 267 | |
8182a370 | 268 | 10. Firewall |
0a314a99 | 269 | |
51c35447 | 270 | By default, you cannot access your server via public IP. To do so, you must configure firewall: |
ab87af11 | 271 | |
644800ef | 272 | - Ports used by peertube dev setup: |
0a314a99 | 273 | ``` |
0a314a99 | 274 | sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp |
275 | sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp | |
644800ef FS |
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 | ``` | |
0a314a99 | 394 | sudo firewall-cmd --permanent --zone=public --add-service=http |
395 | sudo firewall-cmd --permanent --zone=public --add-service=https | |
644800ef FS |
396 | ``` |
397 | ||
398 | - Reload firewall | |
399 | ||
400 | ``` | |
0a314a99 | 401 | sudo firewall-cmd --reload |
402 | ``` | |
0a314a99 | 403 | |
8182a370 | 404 | 11. Configure max ports |
ab87af11 | 405 | |
f309a156 | 406 | This is necessary if you are running dev setup, otherwise you will have errors with `nodemon` |
ab87af11 | 407 | |
0a314a99 | 408 | ``` |
409 | echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | |
410 | ``` | |
ab87af11 | 411 | |
0a314a99 | 412 | [More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097) |
413 | ||
644800ef | 414 | |
4c86a254 GN |
415 | ## FreeBSD |
416 | ||
417 | On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail: | |
418 | ||
f309a156 | 419 | 1. bootstrap pkg, initialize db and install peertube's dependencies, always as root (sudo not yet installed): |
ab87af11 | 420 | |
4c86a254 | 421 | ``` |
ab87af11 DK |
422 | pkg |
423 | pkg update | |
f6160062 | 424 | pkg install -y sudo bash wget git python nginx pkgconf postgresql13-server postgresql13-contrib redis openssl node npm yarn ffmpeg unzip |
4c86a254 GN |
425 | ``` |
426 | ||
f309a156 | 427 | 2. Allow users in the wheel group (hope you don't forgot to add your user on wheel group!) to use sudo. |
ab87af11 | 428 | |
4c86a254 GN |
429 | ``` |
430 | # visudo | |
431 | ``` | |
432 | ||
ab87af11 | 433 | Uncomment the line 90 |
f309a156 | 434 | |
4c86a254 GN |
435 | ``` |
436 | %wheel ALL=(ALL) ALL | |
437 | ``` | |
438 | ||
f309a156 | 439 | 3. Enable nginx, redis, postgresql services and initialize database. |
4c86a254 | 440 | |
4c86a254 | 441 | ``` |
ab87af11 DK |
442 | sysrc postgresql_enable="YES" |
443 | sysrc redis_enable="YES" | |
444 | sysrc nginx_enable="YES" | |
4c86a254 GN |
445 | ``` |
446 | ||
ab87af11 DK |
447 | Initialize database and start services |
448 | ||
4c86a254 | 449 | ``` |
ab87af11 DK |
450 | service postgresql initdb |
451 | service postgresql start | |
452 | service redis start | |
453 | service nginx start | |
4c86a254 GN |
454 | ``` |
455 | ||
2f7ac618 | 456 | ## macOS |
2f7ac618 | 457 | |
ab87af11 DK |
458 | 1. Add the packages: |
459 | ||
02d6226a AV |
460 | ```sh |
461 | brew install bash ffmpeg nginx postgresql openssl gcc make redis git yarn | |
ab87af11 | 462 | ``` |
02d6226a AV |
463 | |
464 | You may need to update your default version of bash. | |
465 | ||
466 | **How to change your default shell** | |
467 | ||
468 | ```sh | |
469 | which -a bash # Check where bash is installed | |
470 | bash --version # You need a version at least as recent as 4.0 | |
471 | sudo vim /etc/shells # Add in this file : /usr/local/bin/bash | |
472 | chsh -s /usr/local/bin/bash # To set the brew-installed bash as default bash | |
ab87af11 DK |
473 | ``` |
474 | ||
d35f3a86 | 475 | In a new shell, type `bash --version` to assert your changes took effect and |
02d6226a AV |
476 | correctly modified your default bash version. |
477 | ||
ab87af11 | 478 | 2. Run the services: |
2f7ac618 | 479 | |
02d6226a | 480 | ```sh |
ab87af11 DK |
481 | brew services run postgresql |
482 | brew services run redis | |
483 | ``` | |
396f224b | 484 | |
02d6226a | 485 | On macOS, the `postgresql` user can be `_postgres` instead of `postgres`. |
ddc7d3ec | 486 | If `sudo -u postgres createuser -P peertube` gives you an `unknown user: postgres` error, you can try `sudo -u _postgres createuser -U peertube`. |
02d6226a | 487 | |
396f224b HM |
488 | ## Gentoo |
489 | ||
ab87af11 DK |
490 | 1. Add this to ``/etc/portage/sets/peertube``: |
491 | ||
396f224b HM |
492 | ``` |
493 | net-libs/nodejs | |
494 | sys-apps/yarn | |
495 | media-video/ffmpeg[x264] # Optionnally add vorbis,vpx | |
496 | dev-db/postgresql | |
497 | dev-db/redis | |
498 | dev-vcs/git | |
499 | app-arch/unzip | |
8182a370 | 500 | dev-lang/python |
396f224b | 501 | www-servers/nginx |
396f224b | 502 | |
ab87af11 | 503 | # Optional, client for Let’s Encrypt: |
396f224b | 504 | # app-crypt/certbot |
396f224b HM |
505 | ``` |
506 | ||
ab87af11 DK |
507 | 2. If you are on a "stable" Gentoo you need to accept the testing keyword ~amd64 yarn: |
508 | ||
bfc6bb94 W |
509 | ``` |
510 | mkdir -p /etc/portage/package.keywords | |
511 | cat << EOF >> /etc/portage/package.keywords/peertube | |
512 | # required by yarn (argument) for PeerTube | |
513 | sys-apps/yarn ~amd64 | |
514 | EOF | |
515 | ``` | |
516 | ||
ab87af11 DK |
517 | 3. Compile the peertube set: |
518 | ||
396f224b HM |
519 | ``` |
520 | emerge -a @peertube | |
521 | ``` | |
522 | ||
ab87af11 DK |
523 | 4. Initialize the PostgreSQL database if you just merged it: |
524 | ||
396f224b HM |
525 | ``` |
526 | emerge --config postgresql | |
527 | ``` | |
528 | ||
ab87af11 DK |
529 | 5. (For OpenRC) Enable and then start the services (replace with the correct PostgreSQL slot): |
530 | ||
396f224b HM |
531 | ``` |
532 | rc-update add redis | |
c1109b45 | 533 | rc-update add postgresql-11 |
396f224b | 534 | rc-service redis start |
c1109b45 | 535 | rc-service postgresql-11 start |
396f224b | 536 | ``` |
f309a156 | 537 | |
80428d16 G |
538 | ## OpenBSD |
539 | ||
540 | 1. Install Packages: | |
541 | ||
542 | ``` | |
543 | pkg_add sudo bash wget git python nginx pkgconf postgresql-server postgresql-contrib redis openssl | |
544 | ``` | |
545 | ||
546 | 2. Install yarn: | |
547 | ||
548 | ``` | |
549 | npm install --global yarn | |
550 | ``` | |
551 | ||
552 | 3. Allow users in the wheel group to use sudo | |
553 | ||
554 | ``` | |
555 | visudo | |
556 | ``` | |
557 | Uncomment line #43: | |
558 | ||
559 | ``` | |
560 | %wheel ALL=(ALL) ALL | |
561 | ``` | |
562 | ||
563 | 4. Enable services: | |
564 | ||
565 | ``` | |
566 | rcctl enable postgresql redis nginx | |
567 | ``` | |
568 | ||
afe81767 | 569 | ## Other distributions |
63bfad7e C |
570 | |
571 | Feel free to update this file in a pull request! |