How to Install DKAN on Ubuntu Xenial 16.04

Following are the steps: 1. Create an EC2 instance 2. Install the necessary libraries 3. Setup the database 4. Install and Setup DKAN

Create an EC2 instance

Note: The location of some of the links might change by the time you read it. 1. Sign in to ( 2. Click on EC2 3. Under Create Instance, click on Launch Instance 4. Choose the Amazon Machine Image called "Ubuntu Server 16.04 LTS (HVM), SSD Volume Type" 5. Click next until you get to Configure Security Group 6. Choose "Create new security group". For Security Group Name, type "mywebsg". Add rule type "HTTP" with default values. 7. Review and Launch 8. Select existing or create new key pair. Write down where you save the pem file. You will need to ssh from that directory later. 9. Open terminal. cd into the directory with the location of your pem file. 10. In your browser, choose the instance you created and click on connect. This will give you the ssh string you can used to log into your newly created server. 11. Login to your server

The string should be something like ssh -i mywebsg.pem

Install necessary libraries

  1. sudo apt-get update
  2. sudo apt-get install apache2
  3. sudo apt-get install mysql (write down the password you create for the database)
  4. sudo apt-get install php
  5. sudo apt-get install php7.0-mysql php7.0-gd php7.0-gd php7.0-xml php7.0-simplexml php-curl
  6. sudo service apache2 restart
  7. Copy the public IP from your amazon instance page and paste it in your browser. You should see apache welcome page
  8. cd /var/www
  9. chmod -R 755 html 10 cd html
  10. git clone --branch master dkan
  11. cd dkan/sites/default
  12. mkdir files; chmod -R 777 files. (Change permissions once installation of dkan is complete)
  13. cp default.settings.php settings.php; chmod 777 settings.php ((Change permissions to 644 once installation of dkan is complete)

Setup your database

  1. mysql -u root -p (the password should have been created when you installed the database)
  2. create database dkan;
  3. grant all privileges on dkan.* to 'root'@'localhost';

Install DKAN

  1. Open your browser
  2. Type your ip address/dkan. For example,
  3. Follow instructions
  4. Enjoy DKAN