MySQL and NewzNab


mazma

Recommended Posts

Hey All,

 

Just upgraded to unRaid6.b12. Previously I was running NewzNab on an old mac mini and I'm looking to have this run in my unRaid server instead.

 

I saw there was a MariaDB docker which I've installed but I have no idea on how to progress after that. What about a web server ?

Link to comment

Where do yo get that PEAR error, when you first open newznab and try to configure?

 

I installed the packages from the old unRAID5 newznab plugin and subversion seemed to work after that. But, my packages directory has other stuff that appears left-over from some plugins I tried and I believe unRAID installs them on boot.

 

I did install apr-1.4.6-x86_64-1.txz. There is a 1.5.0 version but subversion didn't work with it installed.

 

I have since tried pointing the appache docker to the nnplus directory. When I opened it I get a ftp like display so I clicked on the www directory and the newznab config worked. but, only the main newznab page and the admin pages work and the update scripts don't work when running directly on the server.

 

 

 

Link to comment

Yup, on the pre-flight check of the NewzNab install.

 

Entering Pear on the command line returns "command not found" so I'm guessing its not installed. Downloaded the installer and tried to run:

 

php go-pear.phar

as instructed. The installer starts then quits with

 

Beginning install...
XML Extension not found

 

Php -m returns:

 

[php Modules]
bz2
Core
curl
date
dba
dom
ereg
gmp
json
libvirt
libxml
openssl
pcre
Reflection
SimpleXML
sockets
SPL
standard
zip
zlib

 

which shows the Xml extensions.

 

I have no idea beyond this. My newznab install was on a Mac before.

Link to comment

Add a docker

 

Put Apache for the name and tutum/apache-php for the repository

Use /app as the container volume and point the host path to the nnplus/www directory.

Use a container port of 80 and a host port of 81.

Go to tower:81 to access.

 

I can't get it to work though doing this.

 

What plugin did you use on the server??

Link to comment

It appears that the web stuff accesses directories outside of the www directory structure so using the docker to point to the www only can't work  because the docker has no access to the rest of the nnplus install.

 

I tried pointing the docker to the nnplus directory and then when you open the web you have to click on the www directory from listing that opens. This didn't work, it seemed that the web setup created files at the wrong level in other nnplus directories. The update scripts did not work and nothing but the main page and the admin pages was accessible.

 

I tried putting /db and /nnplus/db as an extra container volume and host path. I could get through the setup but then I couldn't access the web site after.

 

I'm thinking it might need a docker setup where you link the docker to the nnplus directory but Apache accesses the www subdirectory. I don't know at this point.

 

Running a web server directly on unRAID would be easier but my understanding is that it wasn't possible.

 

Link to comment

ok - so you can't access the site afterwards. I seem to remember having this before on the mac setup - pretty sure it had something to do with some apache settings:

 

* mod_rewrite enabled

* AllowOverride All set in conf to allow ``.htaccess`` to specify rewrite rules

 

Any idea how to access httpd.conf as its in a container?

Link to comment

Ok, so I can now access the files in the docker and amend the Apache config.

 

When I try to access NewzNab I get this in the apache error log:

 

PHP Fatal error:  require_once(): Failed opening required '/app/lib
/../../www/config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /app/lib/sphinx.php on line 11

 

Any idea?

Link to comment

I have this 90% done.

 

Once you complete the newznab wizard the website will be blank. This is because a number of changes need to be made to the apache2.conf in addition to making some path changes in one of the newznab files itself.

 

So first connect to your docker running apache by:

 

docker ps (note down the dockers container id)

docker exec -t -i "your container id here" /bin/bash

 

This will take you into the docker file.

 

The apache con file is split into multiple parts rather than one big con file which you normally see. So

 

cd /etc/apache2

sudo vi apache2.conf

 

Scroll down and amend the AllowOveride section to All

 

Then :wq out

 

then enable the mod rewrite module.

 

cp mods_available/rewrite.load /etc/apache2/mods-enabled

 

The last part is for newznab itself. The newznab guy tries to php include a bunch of files but the path to them are wrong due to the docker.

 

cd /app/lib

sudo vi sphinx.php

 

At the top of this file you will see six includes. Change them to:

 

require_once("/app/config.php");
require_once("/app/lib/framework/db.php");
require_once("/app/lib/category.php");
require_once("/app/lib/nzb.php");
require_once("/app/lib/releasefiles.php");
require_once("/app/lib/util.php");

 

:wq

 

exit

 

Stop start the apache docker and you should be good.

Link to comment

Ok, so there is a change to the above.

 

1. If you haven't already, you have to add a path to the docker to point to your nzbfiles directory. You can't complete the wizard otherwise.

2. I had to amend the docker path to point to the nnplus directory instead of the www directory. If you don't you can't access the misc folder which contains all of the update scripts. I tried to add a docker path to this but it didn't work.

3. Because of the above, you need to update sphinx.php to reflect the new paths - so instead ("/app/config.php"); becomes ("/app/www/config.php"); and so on for the rest of them.

4. You have to connect to the docker to run the scripts.

Link to comment

Just when you think its all done.

 

If the container id stays the same each time you stop/start the apache docker your changes will remain. Once the container id changes the docker image reverts to its default state, i.e. without your apache changes.

 

Anyone know how to commit the changes into your own image?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.