forked from chakkritte/nginx-rtmp-install-ubuntu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-ubuntu-nginx-rtmp.sh
62 lines (45 loc) · 961 Bytes
/
install-ubuntu-nginx-rtmp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
echo "Installing nginx + nginx-rtmp module..."
sleep 5
echo "update packeges libruary..."
sudo apt-get update
echo "done"
sleep 2
echo "Installing libruary and packages..."
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev unzip
echo "done"
sleep 2
echo "Get module source..."
sleep 2
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
echo "done"
sleep 2
echo "Get nginx source..."
sleep 2
wget http://nginx.org/download/nginx-1.7.8.tar.gz
echo "done"
sleep 2
echo "Untar nginx source..."
sleep 2
tar -zxvf nginx-1.7.8.tar.gz
unzip master.zip
cd nginx-1.7.8
echo "done"
sleep 2
echo "Compiling nginx source..."
sleep 2
./configure --add-module=../nginx-rtmp-module-master
make
sudo make install
echo "done"
sleep 2
echo "Edit nginx config..."
sleep 2
sudo nano /usr/local/nginx/conf/nginx.conf
echo "done"
sleep 2
echo "Start nginx ..."
sleep 2
sudo /usr/local/nginx/sbin/nginx
echo "done"
sleep 2