forked from crazifyngers/1204nnplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NNinstall.sh
145 lines (108 loc) · 3.69 KB
/
NNinstall.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/bin/bash
#This script was submitted by zombu2 on the IRC channel. It is designed to auto-install NN+
clear
echo "This installs newznab apache sql sphinx mediainfo ffmpeg and everything that is needed to your ubuntu install."
echo "Please Hit Enter when the script asks you to hit Enter to add the repos."
echo "Setup will continue in a few seconds."
echo
echo "After successfull install please go to http://localhost/install/"
echo
echo
echo "DO NOT FORGET TO PUT A * BY HITTING SPACE WHEN PHPMYADMIN ASKS WHICH WEBSERVER TO CONFIGURE OR PHPMYADMIN WON'T WORK."
echo
echo
echo
echo "YOU MUST HAVE YOUR SVN USER AND PASSWORD TO FINISH THIS INSTALL."
#This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.
#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
echo "Please be Patient ...."
sleep 10
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
# DISCLAIMER:
# This script is made available to you without any express, implied or
# statutory warranty, not even the implied warranty of
# merchantability or fitness for a particular purpose, or the
# warranty of title. The entire risk of the use or the results from the use of this script remains with you.
sleep 1
apt-get update
apt-get install -y ssh
sleep 3
apt-get install -y build-essential checkinstall
sleep 3
mkdir -p /var/www/newznab
sleep 3
chmod 777 /var/www/newznab
sleep 3
apt-get install -y php5
apt-get install -y php5-dev
apt-get install -y php-pear
apt-get install -y php5-gd
apt-get install -y php5-mysql
apt-get install -y php5-curl
sleep 3
apt-get -y install mysql-server mysql-client libmysqlclient-dev
sleep 1
apt-get -y install apache2
sleep 1
sleep 1
a2dissite default
a2ensite newznab
a2enmod rewrite
service apache2 restart
sleep 1
apt-get -y install python-software-properties
add-apt-repository ppa:jon-severinsson/ffmpeg
add-apt-repository ppa:shiki/mediainfo
add-apt-repository ppa:builds/sphinxsearch-stable
sleep 1
apt-get update
apt-get -y install ffmpeg
apt-get -y install x264
apt-get -y install mediainfo
apt-get -y install sphinxsearch
apt-get -y install unrar
apt-get -y install lame
apt-get -y install phpmyadmin
service apache2 stop
service mysql stop
apt-get -y install subversion
cd /var/www/
svn co svn://svn.newznab.com/nn/branches/nnplus /var/www/newznab
chmod -R 777 /var/www/newznab
service apache2 start
service mysql start
service apache2 stop
service mysql stop
wget -O /home/newznab http://bandofbrothers.3owl.com/nn/newznab
mv /home/newznab /etc/apache2/sites-available/newznab
wget -O /home/php.ini http://bandofbrothers.3owl.com/nn/apache/php.ini
mv /home/php.ini /etc/php5/apache2/php.ini
wget -O /home/php.ini http://bandofbrothers.3owl.com/nn/cli/php.ini
mv /home/php.ini /etc/php5/cli/php.ini
sudo a2dissite default
sudo a2ensite newznab
sudo a2enmod rewrite
service apache2 start
service mysql start
#cd /var/www/newznab/misc/sphinx
#php ./nnindexer.php generate
#sleep 5
#php ./nnindexer.php daemon
#sleep 5
#php ./nnindexer.php index full all
#sleep 5
#php ./nnindexer.php delta all
#sleep 5
#php ./nnindexer.php daemon --stop
#sleep 5
#php ./nnindexer.php daemon
#sleep5
clear
echo "Install Complete...."
echo "Go to http://localhost/install to finish NN+ install."
echo "After that you have to enable sphinx in your admin panel then generate your sphinx config."
echo "For questions and problems log on to #newznab irc and look for zombu2"
echo "Good Luck."