Build a powerful FTP search engine in Linux

Source: Internet
Author: User
Create a powerful FTP search engine in Linux-Linux Enterprise Application-Linux server application information. For more information, see the following. Linux is widely used. Many friends believe that they have used it to set up various services, such as Web, FTP, and BBS. This time, I would like to introduce another server software running in linux-NoseyParker, a powerful FTP search engine, which requires some simple steps, A powerful search engine is built up when you raise your hand.
 
Parker is an FTP server search engine and an Open Source Software Based on Linux. It mainly searches for files on various FTP servers, and then stores the directory information in local files. If there is a query request, it will retrieve local data, return the relevant information (the address of the file) to the requester. Many FTP sites in CERNET use this as a search engine, such as Tsinghua jiujing.

It is easy to use. If you are a linux system, there should be no problems. If it is another unix-like system, it can also be modeled as appropriate.

This article uses the Red Flag 2.0 desktop edition as an example to describe the entire architecture process. I personally think that red-flag Linux is better at operations and Chinese-based localization is also better. Its Web Server (Apache) settings can be implemented through the Xwindow interface, which is more convenient for beginners.

First, you have to obtain the source code of parker. We recommend that you search for this site. You can find more than a dozen sites that provide source code: after obtaining the source code, we can start to install it.

The basic installation method is as follows (you can refer to the readme operation under the parker directory ):

1. Of course, the first thing is to start your linux instance and then import the parker source code file (generally parker.2000-09-06.xxxx.tgz, this includes the parker modification date and modifier) to expand to a directory. Here we assume it is/root/parker /.

2. Use a text editor to edit the/root/parker/src/Makefile file. Set parker_home to the directory where your parker is located (/root/parker /)

3. Enter the command make config in the terminal window for compilation.

Run make config in your/root/parker/src/directory. Make is similar to the project in VC, and can process some programs in batches. All unix-like systems have the make program. Otherwise, the development environment is not supported when you install linux. (If you choose custom installation, you should pay attention to it. When I first installed the red flag, I chose custom installation, and this make was not installed)

4. Edit/root/parker/src/parker. h and set the SERVER and PARKERSERVER to replace "10.129.6.172" with the SERVER address of your parker.

5. Enter the make command in the terminal window for compilation.

6. After compilation, continue typing make install for compilation.

7. Modify Your Parker_Hosts (/root/parker/etc/Parker_Hosts) file, add the FTP server address to be retrieved, and add one line of FTP server address.

8. Run the cgi program (cgi, cgistatus, cgiswitch) under src/. These files can only be generated after the above compilation is complete) copy to the cgi-bin directory of your www server. Put the files under/root/parker/html/Under the doc root of your www server for user access. For more information about Web Server settings, see other documents. However, Apache settings in red-flag Linux are relatively simple.

9. Edit your/etc/services and/etc/inetd. conf files and add them to the parker service. For details about the modification, refer to the example in the/root/parker/conf/directory.
In this example, the/usr/networking/parker/bin/parkerd directory refers to the directory where parker is located and changed to/root/parker/bin/parkerd. Of course, you must first complete make install, so that the parkerd file is available under your parker/bin/directory.

10. Restart the inetd and www server programs.

11. Run the script file "/root/parker/bin/NewData" at a scheduled time and place it in your crontab for scheduled execution (generally one day to one week ).

The NewData script accesses the FTP server defined in/root/parker/Parker_Hosts, stores the retrieved data locally, and processes the data accordingly.

Www users can access the parker page to execute file query requests.

After you successfully execute make install, The NewData file will be displayed under your/root/parker/bin/directory. Note, you cannot run the script directly in the directory where the script is located. Otherwise, an error occurs and data cannot be collected. You can run parker/bin/NewData (case sensitive) in the root directory (root.
So far, a powerful search engine has been established. The simple interface is as follows (you can modify the files under/root/parker/html/for the specific page display effect, but you need to modify/root/parker/src/cgi for the search result page. c file, and then re-compile the file, requires a certain degree of html language skills .)
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.