Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 3.19 KB

installation_aws.md

File metadata and controls

55 lines (40 loc) · 3.19 KB

Installing Yacy on AWS with Docker

  1. Sign in to AWS

  2. In the top-right corner, choose a area you want to set up the instance, e.g.: Asia Pacific (Singapore).

  3. In the console panel, choose EC2. In EC2 Control Panel, choose key pairs, under Network & Security, and create a new key pair. It will automatically download the private key, and you should do chmod 400 YOUR_KEY_NAME to prevent other user to access your private key. After that, go back to your dashboard, and click Launch Instance.

  4. In Step 1: Choose an Amazon Machine Image, we choose Ubuntu Server 14.04 LTS (HVM), SSD Volume Type.

  5. In Step 2: Choose an Instance Type, we choose t2.micro(Warning: t2.micro is not suitable for running Yacy for a long period, and AWS may shut down your instance(block your Internet access on specific port) at any time. t2.micro instance users are only allow to use 10% of a single CPU core on average. In our case, Yacy_server uses 30 - 40% on average. Reference: Burstable Instance Case study: Real case running Yacy)

  6. Then we click Configure Instance Details, do not create a instance yet.

  7. Under Auto-assign Public IP, we choose Enable

  8. Then we click Next: Add Storage

  9. We modify the storage to 30GiB instead of default 8Gib

  10. Click Next twice to go to Step 6: Configure Security Group. Under this, we choose All TCP for type and Anywhere for source.

  11. We are ready to launch, click Review and Launch, if everything is correct, click Launch. It will ask you to choose a key pair, choose the one we just created.

  12. We go back to EC2 control panel again. Click on instances on the left hand side. Then choose the instance you just created, and click connect button on top. It will you connect to your EC2 by giving you a example like:

    ssh -i "yacy.pem" [email protected]
    
  13. Once connected, we have to set up docker and add a 4G swapfile to prevent lack of memory:

    sudo apt-get update
    sudo apt-get -y upgrade
    sudo fallocate -l 4G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo apt-get install linux-image-extra-`uname -r`
    sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
    sudo apt-get update
    sudo apt-get install docker-engine
    

Or, to install docker on newer versions of ubuntu (other distros are not tested) we can just do: sudo apt-get install docker.io

  1. Once docker is installed, we start our Yacy-server by entering:

    sudo docker pull nikhilrayaprolu/yacygridmcp
    sudo docker run -d -p 8100:8100 -p 443:443 nikhilrayaprolu/yacygridmcp:latest
    
  2. Check if Yacy is running on your server, by going to your public DNS, e.g.: ec2-54-169-103-75.ap-southeast-1.compute.amazonaws.com.