Setup Peer To Peer Search Engine With YaCy On Debian 7
YaCy is a free search engine that anyone can use to build a search portal for their intranet or to help search the public internet. When contributing to the world-wide peer network, the scale of YaCy is limited only by the number of users in the world and can index billions of web pages.
Why Yacy instead of Other Search Engines?
It is fully decentralized, all users of the search engine network are equal, the network does not store user search requests and it is not possible for anyone to censor the content of the shared index. We want to achieve freedom of information through a free, distributed web search which is powered by the world’s users.
Install Yacy On Debian 7 ‘Wheezy’
You need to install OpenJDK6. You don’t need to install any external databases or a web server, everything will be installed with YaCy.
Add the Yacy repository
Open /etc/apt/sources.list file,
# nano /etc/apt/sources.list
and add the following line.
deb http://debian.yacy.net ./
Now update the sources list with command.
# apt-get update
Now install Yacy with command:
# apt-get install openjdk-6-jre-headless yacy
During the installation, you will be asked to enter the name of your server.
Access Yacy Web Interface
You can access the Yacy web interface by navigating to the URL http://ip-address:8090/. If you can’t access Yacy web interface from your remote clients allow the port 8090 through firewall/router.
At this time Yacy can’t be accessed from the outside of your network. You should adjust the router by allowing the port 8090 to access YaCy from outbound network.
Access Yacy Administration Interface
Click on the ‘Administration’ link on the right top corner of the Yacy main interface. Enter the user name as ‘admin’ and its password that you’re created earlier during the installation.
From here, you can do various administration things such as shutdown/restart admin console, change Yacy admin console default port 8090, monitor yacy statistics etc.
Yacy will be started automatically after installing it. If you want to start/restart/stop yacy service, use the following commands with root user.
# /etc/init.d/yacy start # /etc/init.d/yacy restart # /etc/init.d/yacy stop
Also you can view the status of the Yacy service with command:
# /etc/init.d/yacy status
By default, Yacy internal updater doesn’t work automatically. So we need to make it to update automatically using cron job.
Open /etc/crontab file,
# nano /etc/crontab
Add the following line:
0 6 * * * root apt-get update && apt-get -y --force-yes install yacy
Restart cron service to take effect the saved changes.
# /etc/init.d/cron restart
Now your peer-peer search engine is ready to use. For more information about Yacy configuration and administration i suggest you to visit the official demo page.