SEARCH

How-To Geek

How to Build Your Own Usenet Indexer

image

There are plenty of NZB Indexers out there such as NZB Matrix and NZBs(dot)ORG , but they only index SOME of Usenet. Here’s how to build your own indexer so you can index what you want.

Things You Will Need:

  • A computer running Ubuntu.
  • A Usenet account.
  • A basic understanding of the Linux terminal.
  • A decent internet connection.

If you have all of the above you are good to go, let’s get started.

Installing NewzNab

We are going to be doing pretty much the whole install from a terminal, so fire up terminal and execute the following:

sudo gnome-terminal

This is going to give us a terminal running under the root security context, this way we don’t have to keep typing sudo.

image

The first thing you are going to want to do is update your repositories:

apt-get update

image

Most website-related stuff on Ubuntu lives in /var/www,so lets make a directory for our install and set writable permissions on the folder:

mkdir –p /var/www/newznab

chmod 777 /var/www/newznab

image

Next we need to install PHP:

apt-get install –y php5 php5-dev php-pear

image

We need to install a few extra PHP extensions as well:

apt-get install –y php5-gd php5-mysql php5-curl

image

The next thing we need to do is edit the PHP configuration, we’ll be using nano for this:

nano /etc/php5/cli/php.ini

image

There are two settings that need to be changed,  firstly you will need to change:

max_execution_time = 120

image

You will also need to change the date.timezone setting, you can get a full list of possible values over here.

image

Next we need to install some kind of database, I opted to go for MySQL:

apt-get install mysql-server-5.5

apt-get install mysql-client-5.5

apt-get install libmysqlclient-dev

image

You will be prompted for a password during configuration, make sure to choose a strong password, especially if you plan on making it a publicly available indexer.

image

The last thing we need to install is Apache:

apt-get install –y apache2

image

We will need to make the same changes that we made to the base PHP configuration, to the Apache configuration, there is also an additional setting that needs to be changed, again we will use nano:

nano /etc/php5/apache2/php.ini

These are the settings you will need to change:

  • memory_limit =  -1
  • max_execution_time = 120
  • date.timezone =  Europe/London

image

We now need to create the appropriate Apache configuration for our website, so run:

nano /etc/apache2/sites-available/newznab

image

When nano opens paste the following into the file:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName localhost

DocumentRoot /var/www/newznab/www
ErrorLog /var/log/apache2/error.log
LogLevel warn
</VirtualHost>

The go ahead and commit the changes to the file.

image

Now that all the pre-requisites are installed we can install NewzNab, so head over to the download page and grab a copy of NewzNab Classic.

image

Once it has downloaded extract it.

image

Now copy all the extracted files.

image

Paste them in:

/var/www/newznab

image

Now open a new terminal and run the following commands to register NewzNab as the default website, as well as enable mod-rewrite.

sudo a2dissite default
sudo a2ensite newznab
sudo a2enmod rewrite
sudo service apache2 restart

You may notice an error when you execute the restart command, this is because we used localhost in our config file, just ignore it and continue.

image

Finally to sort out some permission issues run the following:

sudo chmod 777 /var/www/newznab/www/lib/smarty/templates_c
sudo chmod 777 /var/www/newznab/www/covers/movies
sudo chmod 777 /var/www/newznab/www/covers/music
sudo chmod 777 /var/www/newznab/www
sudo chmod 777 /var/www/newznab/www/install
sudo chmod 777 /var/www/newznab/nzbfiles/

Configuration

Now that we have NewzNab installed we need to configure it, after all there wouldn’t be any point in running your own indexer if you didn’t customize it. So open up your browser of choice and head over to http://localhost/install. Once the page has loaded click on the button to check the status of your pre-requisites.

Note: You will get two settings that have a warning status, those are the date.timezone and the memory_limit settings. Just ignore these and continue.

image

Once you move on you will need to put in the credentials to access your MySQL database.

image

You will also need the details to your Usenet account.

image

Then go ahead and choose a username and password for yourself, these are the credentials you will use to log into your website with.

image

You might get an error when it asks you where you want to store the nzb files, just run the provided chmod command from a terminal as a quick fix.

image

Congratulations you have made it to the admin hangout.

image

One thing you will need to do before I send you on your way is change the  way the nzb categories work, to do this click on your name in the top right hand corner.

image

Then click on the Edit link.

image

Now uncheck the boxes for Movies, Music and Console.

image

Once you have that done, head back over to http://localhost/admin and go through the steps to finish configuring your indexer.

image

That’s all there is to it. Be sure to follow me on Twitter: @taybgibb

Taylor Gibb is a Microsoft MVP and all round geek, he loves everything from Windows 8 to Windows Server 2012 and even C# and PowerShell. You can also follow him on Google+

  • Published 08/16/12

Comments (5)

  1. Harsha

    How big do these indices get? That would be something I would be worried about.

  2. Taylor Gibb

    @Harsha it only indexes the headers, i have index for quite a few months and my index is only 10 GB

  3. Robi

    My news server is public for ISP users. I dont have username/password. How connect? Is username and password leave empty see error The following error was encountered: • No username supplied

  4. newznab

    i think the empty uname/pass is fixed in the non-gpl version. you can always try entering a garbage one and going back and editing the config.php file

  5. natethegreat141990

    Whenever I try to open up local host install it just opens up a blank page for me and I can not seem to get around it. Any help?

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!