-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π§π§π¨π(setup): add one-shot script for manual install
- Loading branch information
Showing
5 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# xplex<sup>HQ</sup> | ||
|
||
This part of the code was written back in early 2019, by someone who absolutely wasn't into frontend, didn't need it and just did the bare minimum to get by (and barely ever used... as editing the `xplex.conf` in `/usr/local/nginx/conf/` & reloading `nginx` was perceived to be easier & more comprehensive). | ||
|
||
This should be seriously redesigned and revamped; hopefully by a better frontend engineer. There are plenty of options (i.e. way more so than already overcrowded as it was back then) and still probably most of them are going to be a better option than how it is at the moment. | ||
|
||
For version 1, let this be. If `xplex` gains any traction, then Version 2 deserves a better frontend. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
daemon off; | ||
|
||
events { | ||
worker_connections 64; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# push rtmp://a.rtmp.youtube.com/live2/<stream-key>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
# install dependencies | ||
apt-get update | ||
apt-get install -y gcc g++ perl-modules make wget | ||
|
||
# create a temporary working directory | ||
mkdir -p /tmp/xplex | ||
cd /tmp/xplex | ||
|
||
# download the source code for nginx, openssl, pcre, rtmp, and zlib | ||
export v_NGINX=1.26.1 | ||
export vm_OSSL=1.1.1w | ||
export vm_PCRE=8.45 | ||
export vm_RTMP=1.2.2 | ||
export vm_ZLIB=1.3.1 | ||
|
||
wget https://nginx.org/download/nginx-${v_NGINX}.tar.gz | ||
wget https://www.openssl.org/source/openssl-${vm_OSSL}.tar.gz | ||
wget https://sourceforge.net/projects/pcre/files/pcre/${vm_PCRE}/pcre-${vm_PCRE}.tar.gz | ||
wget https://github.com/arut/nginx-rtmp-module/archive/v${vm_RTMP}.tar.gz | ||
wget https://zlib.net/fossils/zlib-${vm_ZLIB}.tar.gz | ||
|
||
# extract the source code | ||
cat *.tar.gz | tar -izxvf - | ||
|
||
# configure nginx with rtmp module | ||
cd /tmp/xplex/nginx-${v_NGINX} | ||
|
||
./configure \ | ||
--with-openssl=../openssl-${vm_OSSL} \ | ||
--with-pcre=../pcre-${vm_PCRE} \ | ||
--with-zlib=../zlib-${vm_ZLIB} \ | ||
--add-module=../nginx-rtmp-module-${vm_RTMP} | ||
|
||
# compile and install nginx | ||
make | ||
make install | ||
|
||
# update nginx configuration to use xplex | ||
cp conf/*.conf /usr/local/nginx/conf/ | ||
|
||
# install nodejs | ||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - | ||
apt install -y nodejs | ||
|
||
# install xplex | ||
mkdir -p /opt/xplex/ | ||
cp -r app/* /opt/xplex/ | ||
cd /opt/xplex/ | ||
npm install | ||
|
||
# start xplex | ||
nohup npm start & | ||
|
||
# start nginx | ||
/usr/local/nginx/sbin/nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters