diff options
Diffstat (limited to 'support/doc/dependencies.md')
-rw-r--r-- | support/doc/dependencies.md | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md index 35812aa8b..d98d71020 100644 --- a/support/doc/dependencies.md +++ b/support/doc/dependencies.md | |||
@@ -1,5 +1,20 @@ | |||
1 | # Dependencies | 1 | # Dependencies |
2 | 2 | ||
3 | <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
4 | <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
5 | |||
6 | |||
7 | - [Debian / Ubuntu and derivatives](#debian--ubuntu-and-derivatives) | ||
8 | - [Arch Linux](#arch-linux) | ||
9 | - [CentOS 7](#centos-7) | ||
10 | - [Fedora](#fedora) | ||
11 | - [FreeBSD](#freebsd) | ||
12 | - [macOS](#macos) | ||
13 | - [Gentoo](#gentoo) | ||
14 | - [Other distributions](#other-distributions) | ||
15 | |||
16 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
17 | |||
3 | ## Debian / Ubuntu and derivatives | 18 | ## Debian / Ubuntu and derivatives |
4 | 1. On a fresh Debian/Ubuntu, as root user, install basic utility programs needed for the installation | 19 | 1. On a fresh Debian/Ubuntu, as root user, install basic utility programs needed for the installation |
5 | 20 | ||
@@ -31,6 +46,11 @@ $ sudo apt-get update | |||
31 | $ sudo apt install ffmpeg | 46 | $ sudo apt install ffmpeg |
32 | ``` | 47 | ``` |
33 | 48 | ||
49 | Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis: | ||
50 | ``` | ||
51 | $ sudo systemctl start redis postgresql | ||
52 | ``` | ||
53 | |||
34 | ## Arch Linux | 54 | ## Arch Linux |
35 | 55 | ||
36 | 1. Run: | 56 | 1. Run: |
@@ -39,6 +59,11 @@ $ sudo apt install ffmpeg | |||
39 | $ sudo pacman -S nodejs yarn ffmpeg postgresql openssl redis git wget unzip python2 base-devel npm nginx | 59 | $ sudo pacman -S nodejs yarn ffmpeg postgresql openssl redis git wget unzip python2 base-devel npm nginx |
40 | ``` | 60 | ``` |
41 | 61 | ||
62 | Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis: | ||
63 | ``` | ||
64 | $ sudo systemctl start redis postgresql | ||
65 | ``` | ||
66 | |||
42 | ## CentOS 7 | 67 | ## CentOS 7 |
43 | 68 | ||
44 | 1. Install NodeJS 8.x (current LTS): | 69 | 1. Install NodeJS 8.x (current LTS): |
@@ -68,6 +93,80 @@ Later when you invoke any node command, please prefix them with `CC=/opt/rh/devt | |||
68 | $ 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 | 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 |
69 | ``` | 94 | ``` |
70 | 95 | ||
96 | Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis: | ||
97 | ``` | ||
98 | $ sudo service redis start | ||
99 | $ sudo service postgresql start | ||
100 | ``` | ||
101 | |||
102 | ## Fedora | ||
103 | |||
104 | 0. Upgrade your packages: | ||
105 | ``` | ||
106 | dnf upgrade | ||
107 | ``` | ||
108 | 1. Add a user with sudoers group access: | ||
109 | ``` | ||
110 | useradd my-peertube-user | ||
111 | passwd my-peertube-user | ||
112 | usermod my-peertube-user -a -G wheel # Add my-peertube-user to sudoers | ||
113 | su my-peertube-user | ||
114 | ``` | ||
115 | 2. (Optional) Install certbot (choose instructions for nginx and your distribution) : | ||
116 | [https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions) | ||
117 | 3. Install NodeJS 8.x (current LTS): | ||
118 | [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora) | ||
119 | 4. Install yarn: | ||
120 | [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install) | ||
121 | 5. Enable [RPM Fusion](https://rpmfusion.org) for Fedora (available for x86, x86_64, armhfp) | ||
122 | ``` | ||
123 | sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm | ||
124 | ``` | ||
125 | This is necessary because `ffmpeg` is not in the Fedora repos. | ||
126 | |||
127 | 6. Run: | ||
128 | ``` | ||
129 | sudo dnf install nginx ffmpeg postgresql-server postgresql-contrib openssl gcc-c++ make redis git | ||
130 | ffmpeg -version # Should be >= 3.x | ||
131 | g++ -v # Should be >= 5.x | ||
132 | ``` | ||
133 | 7. Post-installation | ||
134 | |||
135 | _from [PostgreSQL documentation](https://www.postgresql.org/download/linux/redhat/):_ | ||
136 | > Due to policies for Red Hat family distributions, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically. | ||
137 | ``` | ||
138 | # PostgreSQL | ||
139 | sudo postgresql-setup initdb | ||
140 | sudo systemctl enable postgresql.service | ||
141 | sudo systemctl start postgresql.service | ||
142 | # Nginx | ||
143 | sudo systemctl enable nginx.service | ||
144 | sudo systemctl start nginx.service | ||
145 | # Redis | ||
146 | sudo systemctl enable redis.service | ||
147 | sudo systemctl start redis.service | ||
148 | ``` | ||
149 | 8. Firewall | ||
150 | |||
151 | By default, you cannot acces your server via public IP. To do so, you must configure firewall: | ||
152 | ``` | ||
153 | # Ports used by peertube dev setup | ||
154 | sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp | ||
155 | sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp | ||
156 | # Optional | ||
157 | sudo firewall-cmd --permanent --zone=public --add-service=http | ||
158 | sudo firewall-cmd --permanent --zone=public --add-service=https | ||
159 | # Reload firewall | ||
160 | sudo firewall-cmd --reload | ||
161 | ``` | ||
162 | 9. Configure max ports | ||
163 | |||
164 | This is necessary if you are running dev setup, otherwise you will have errors with `nodemon` | ||
165 | ``` | ||
166 | echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
167 | ``` | ||
168 | [More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097) | ||
169 | |||
71 | ## FreeBSD | 170 | ## FreeBSD |
72 | 171 | ||
73 | On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail: | 172 | On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail: |