Peertube is a decentralized youtube replacement, see Feature request: PeerTube on NethServer:
Unfortunately peertube needs nodejs8 and I needed to replace the centos nodejs stack because rh-nodejs8 is not working, see Nethserver-collabora CODE testing and discussion so please don’t run in production.
You need a virtualhost domain like virtualhostdomain.tld.
Get repos - peertube, epel multimedia and nodejs:
wget https://copr.fedorainfracloud.org/coprs/daftaupe/peertube/repo/epel-7/daftaupe-peertube-epel-7.repo -P /etc/yum.repos.d/
wget https://negativo17.org/repos/epel-multimedia.repo -P /etc/yum.repos.d/
curl -sL https://rpm.nodesource.com/setup_8.x | bash -
yum -y install nethserver-postgresql postgresql-contrib nethserver-redis
Create database, db user and needed postgresql extensions (change secret
to something more secure):
su - postgres -c psql
create database peertube_prod;
create user peertube with encrypted password 'secret';
grant all privileges on database peertube_prod to peertube;
\c peertube_prod
CREATE EXTENSION pg_trgm;
CREATE EXTENSION unaccent;
\q
Install peertube:
yum -y install peertube
Edit /etc/peertube/production.yaml
and set the DB password (that is secret if you didn’t change it in previous step) and your virtual host:
webserver:
...
hostname: 'virtualhostdomain.tld'
database:
...
password: 'secret'
Get /etc/httpd/conf.d/peertube.conf
and edit the 2 servername directives to match your virtualhost:
wget https://gist.githubusercontent.com/mrmarkuz/de99f0ef59ef7d1716504c710801d4a4/raw/31f742103ad1dfec94408537b34b6d595b902def/peertube.conf -P /etc/httpd/conf.d/
ServerName virtualhostdomain.tld
Restart httpd and start/enable peertube and view peertube log:
systemctl restart httpd
systemctl enable peertube --now && journalctl -f -u peertube
Note the user password and exit journalctl with CTRL-C.
info: Username: root
info: User password: sdalfkdasfkasddfk
Browse to https://virtualhostdomain.tld
and login with the given credentials.