forked from nZEDb/nZEDb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ubuntu 13.10 INSTALL GUIDE.txt
executable file
·254 lines (193 loc) · 7.57 KB
/
Ubuntu 13.10 INSTALL GUIDE.txt
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
Guide based on newznab 11.10 guide.
Most of this guide is done from the command line (terminal).
0. Misc.
# For those using an older version of ubuntu, php 5.4 is required. (Ubuntu 12.04 requires backports for php 5.4 a user reported.)
# Apparmor interferes with some of our files, here is how to disable it:
sudo /etc/init.d/apparmor stop
sudo /etc/init.d/apparmor teardown
sudo update-rc.d -f apparmor remove
# For the threaded scripts you will require the Python cymysql module for mysql:
# Python 2.*
sudo apt-get install python-setuptools python-pip
sudo python -m easy_install
sudo easy_install cymysql
pip list
# Python 3.* - If Python 3 is installed, the module also must be installed
sudo apt-get install python3-setuptools python3-pip
sudo python3 -m easy_install pip
sudo pip-3.2 install cymysql
pip-3.2 list
# -or-
sudo pip-3.3 install cymysql
pip-3.3 list
#For Ubuntu 13.10, python3 uses pip3, not pip3.2
# Or the Python psycopg module for PostgreSQL(this is not currently supported)
sudo apt-get install postgresql postgresql-server-dev-all php5-pgsql python-dev python3-dev make
# Python 2.*
sudo apt-get install python-setuptools python-pip
sudo easy_install psycopg2
pip list
# Python 3.* - If Python 3 is installed, the module also must be installed
sudo apt-get install python3-setuptools python3-pip
sudo easy_install3 psycopg2
pip-3.2 list
-or-
pip-3.3 list
If after using easy_install, it still shows error, this link was current at the time this was posted: http://initd.org/psycopg/install/
wget http://initd.org/psycopg/tarballs/PSYCOPG-2-5/psycopg2-2.5.1.tar.gz
tar xfvz psycopg2-2.5.1.tar.gz
cd psycopg2-2.5.1/
sudo python setup.py install
sudo python3 setup.py install
pip-3.2 list
-or-
pip-3.3 list
#For Ubuntu 13.10, python3 uses pip3, not pip3.2
1. Update and upgrade the operating system.
# Update the sources.
sudo apt-get update
# Upgrade the applications.
sudo apt-get upgrade
# (OPTIONAL) Optionally run sudo apt-get dist-upgrade to upgrade the kernel.
# Reboot.
sudo reboot
2. Install PHP and extensions.
# (OPTIONAL) Add a repository to get apache 2.4 and php 5.5
sudo add-apt-repository ppa:ondrej/php5
# Ubuntu 13.10 (ondrej as not added saucy yet, so you will have to use raring)
sudo nano /etc/apt/sources.list.d/ondrej-php5-saucy.list
# Change the words called saucy to raring (at the end left of main)
sudo apt-get update
# Install PHP and the required extensions:
sudo apt-get install -y php5 php5-dev php5-json php-pear php5-gd php5-mysql php5-curl
3. Install MySQL OR PostgreSQL.
# MySQL:
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
# Or PostgreSQL:
sudo apt-get install postgresql php5-pgsql
# Login to PostgreSQL root user:
sudo -i -u postgres
# Enter the PostgreSQL CLI interface:
psql
# Create a user account (change the username):
CREATE USER EnterYourUserNameHere;
# Create a database for the user account (change the database name or leave it):
CREATE DATABASE nzedb OWNER EnterYourUserNameHere;
# Create a password for the user (the single quotes around the password are required):
ALTER USER EnterYourUserNameHere WITH ENCRYPTED PASSWORD 'EnterYourPasswordHere';
# Detach from pgsql and login to your linux user account:
control+d
su EnterYourLinuxUsernameHere
4. Install and configure Apache.
# Install apache:
sudo apt-get install apache2
# Configure PHP CLI ini file using the nano text editor:
sudo nano /etc/php5/cli/php.ini
## To search in nano, use control+w
# Change the following settings:
register_globals = Off
max_execution_time = 120
# You can set 1024M to -1 if you have RAM to spare.
memory_limit = 1024M
# Change Europe/London to your local timezone, see here for a list: http://php.net/manual/en/timezones.php
# remove the ; if there is one preceding date.timezone
date.timezone = Europe/London
# Press control+x when you are done to save and exit.
# Configure the PHP apache2 ini file (use the above settings):
sudo nano /etc/php5/apache2/php.ini
################
## Apache 2.4 ##
################
You must do the following change to /etc/apache2/apache2.conf:
Under <Directory /var/www/>, change AllowOverride None to AllowOverride All
# Create the site config:
sudo nano /etc/apache2/sites-available/nZEDb.conf
################
## Apache 2.2 ##
################
# Create the site config:
sudo nano /etc/apache2/sites-available/nZEDb
################
## 2.2 & 2.4: ##
################
# Paste the following:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName localhost
# These paths should be fine
DocumentRoot /var/www/nZEDb/www
ErrorLog /var/log/apache2/error.log
LogLevel warn
</VirtualHost>
# Save and exit nano.
# Disable the default site, enable nZEDb, enable rewrite, restart apache:
sudo a2dissite default
sudo a2ensite nZEDb
sudo a2enmod rewrite
sudo service apache2 restart
5. Install unrar / ffmpeg / mediainfo / lame.
sudo apt-get install software-properties-common
sudo apt-get install unrar python-software-properties lame
####################
## Ubuntu 12.10 : ##
####################
sudo add-apt-repository ppa:jon-severinsson/ffmpeg
sudo add-apt-repository ppa:shiki/mediainfo
sudo apt-get update
sudo apt-get install mediainfo ffmpeg x264
############################
## Ubuntu 13.04 & 13.10 : ##
############################
# X264 & FFMPEG:
sudo add-apt-repository ppa:jon-severinsson/ffmpeg
sudo apt-get update
sudo apt-get install ffmpeg x264
# For mediainfo:
sudo add-apt-repository ppa:shiki/mediainfo
sudo nano /etc/apt/sources.list.d/shiki-mediainfo-*
# Change the 2 raring or saucy words to quantal, save and exit nano.
# Install mediainfo:
sudo apt-get update
sudo apt-get install mediainfo
6. Install memcache / apc.
# APC:
sudo apt-get install php-apc
sudo service apache2 restart
sudo cp /usr/share/doc/php-apc/apc.php /var/www/nZEDb/www/admin
# In the future you can go to localhost/admin/apc.php in your browser to view apc stats.
# Memcache:
sudo apt-get install memcached php5-memcache
# Edit php.ini, add extension=memcache.so in the dynamic extensions section (if you get warnings on apache start you can remove this).
sudo nano /etc/php5/apache2/php.ini
sudo service apache2 restart
#############################################################
# AFTER git cloning and seting up the indexer (step 7 & 8), #
# edit config.php and change MEMCACHE_ENABLED to true. #
#############################################################
sudo nano /var/www/nZEDb/www/config.php
7. Git clone the nZEDb source.
# If /var/www/ does not exist, create it : mkdir /var/www/
cd /var/www/
sudo chmod 777 .
# Install git.
sudo apt-get install git
# Clone the git.
git clone https://github.com/nZEDb/nZEDb.git
# Set the perms.
sudo chmod 777 nZEDb
cd nZEDb
sudo chmod -R 755 .
sudo chmod 777 /var/www/nZEDb/www/lib/smarty/templates_c
sudo chmod -R 777 /var/www/nZEDb/www/covers
sudo chmod 777 /var/www/nZEDb/www
sudo chmod 777 /var/www/nZEDb/www/install
sudo chmod -R 777 /var/www/nZEDb/nzbfiles
8. Run the installer.
# Change localhost for the server's IP if you are browsing on another computer.
http://localhost/install
9. Configure the site.
Enable some groups in view groups.
Change settings in edit site (set api keys, set paths to unrar etc..)
10. Start indexing groups.
Use scripts in misc/update_scripts (update_binaries to get article headers, update_releases to create releases).
Use scripts in misc/update_scipts/nix_scripts to automate it.