如何建立自己的Usenet索引器

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.

那里有很多NZB索引器,例如NZB Matrix和NZBs(dot)ORG,但它们仅对Usenet的某些内容进行索引。 这是构建自己的索引器的方法,以便您可以索引所需的内容。

您需要的东西: (Things You Will Need:)

  • A computer running Ubuntu.

    运行Ubuntu的计算机。
  • A Usenet account.

    Usenet帐户。
  • A basic understanding of the Linux terminal.

    对Linux终端有基本了解。
  • A decent internet connection.

    体面的互联网连接。

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

如果您具备以上所有条件,那么一切都很好,让我们开始吧。

安装NewzNab (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

须藤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.

这将使我们的终端在根安全性上下文下运行,这样我们就不必继续键入sudo。

image

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

您要做的第一件事是更新存储库:

apt-get update

apt-get更新

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:

Ubuntu上大多数与网站相关的内容都位于/ var / www,因此请为我们的安装创建目录并在该文件夹上设置可写权限:

mkdir –p /var/www/newznab

mkdir –p / var / www / newznab

chmod 777 /var/www/newznab

chmod 777 / var / www / newznab

image

Next we need to install PHP:

接下来,我们需要安装PHP:

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

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

image

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

我们还需要安装一些额外PHP扩展:

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

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:

我们需要做的下一件事是编辑PHP配置,为此我们将使用nano:

nano /etc/php5/cli/php.ini

纳米/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

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.

您还需要更改date.timezone设置,您可以在此处获得完整的可能值列表。

image

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

接下来,我们需要安装某种数据库,我选择了MySQL:

apt-get install mysql-server-5.5

apt-get安装mysql-server-5.5

apt-get install mysql-client-5.5

apt-get安装mysql-client-5.5

apt-get install libmysqlclient-dev

apt-get安装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:

我们需要安装的最后一件事是Apache:

apt-get install –y apache2

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:

我们将需要对基本PHP配置,Apache配置进行相同的更改,还需要更改其他设置,同样,我们将使用nano:

nano /etc/php5/apache2/php.ini

纳米/etc/php5/apache2/php.ini

These are the settings you will need to change:

这些是您需要更改的设置:

  • memory_limit =  -1

    memory_limit = -1
  • max_execution_time = 120

    max_execution_time = 120
  • date.timezone =  Europe/London

    date.timezone =欧洲/伦敦
image

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

现在,我们需要为我们的网站创建适当的Apache配置,因此运行:

nano /etc/apache2/sites-available/newznab

纳米/ etc / apache2 / sites-available / newznab

image

When nano opens paste the following into the file:

当nano打开时,将以下内容粘贴到文件中:

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

<VirtualHost *:80> ServerAdmin webmaster @ localhost ServerName本地主机

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

DocumentRoot / var / www / newznab / www ErrorLog /var/log/apache2/error.log LogLevel警告</ 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.

现在已经安装了所有必备软件,我们可以安装NewzNab,因此请转到下载页面并获取NewzNab Classic的副本。

image

Once it has downloaded extract it.

下载完成后,将其解压缩。

image

Now copy all the extracted files.

现在复制所有提取的文件。

image

Paste them in:

将它们粘贴到:

/var/www/newznab

/ 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.

现在打开一个新终端并运行以下命令,将NewzNab注册为默认网站,并启用mod-rewrite。

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

sudo a2dissite默认sudo a2ensite newznab sudo a2enmod重写sudo服务apache2重新启动

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/

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.

现在我们已经安装了NewzNab,我们需要对其进行配置,毕竟,如果不自定义它,运行您自己的索引器将毫无意义。 因此,打开您选择的浏览器,然后转到http:// localhost / install。 页面加载完成后,单击按钮以检查先决条件的状态。

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.

注意:您将获得两个具有警告状态的设置,分别是date.timezone和memory_limit设置。 只需忽略这些并继续。

image

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

继续进行之后,您需要输入凭据才能访问MySQL数据库。

image

You will also need the details to your Usenet account.

您还将需要Usenet帐户的详细信息。

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.

当它询问您要将nzb文件存储在哪里时,您可能会出错,只需从终端运行提供的chmod命令即可。

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.

在您发送邮件给您之前,您需要做的一件事就是更改nzb类别的工作方式,为此,请单击右上角的名称。

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.

完成此操作后,请返回至http:// localhost / admin并执行以下步骤以完成对索引器的配置。

image

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

这里的所有都是它的。 一定要在Twitter上关注我: @taybgibb

翻译自: https://www.howtogeek.com/120285/how-to-build-your-own-usenet-indexer/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值