Skip to content
This repository was archived by the owner on Jul 26, 2019. It is now read-only.

Server Setup

Jillian edited this page Mar 1, 2016 · 5 revisions

Server Details

The initial development box is on a Digital Ocean Droplet with

  • 512MB
  • 1 Core
  • 20GB SSD Disk
  • 1TB Transfer

Operating System

  • CentOS 7

Installed Software

  • NGINX
  • SOLR Search

Server Set Up

Installing Nginx

See full documentation with additional details here

  • Enable EPEL Repository sudo yum install epel-release
  • Install NGINX sudo yum install nginx
  • Start NGINX sudo systemctl start nginx

Enable Additional Swap

This is a low-powered machine for testing, adding swap will allow for better/faster results

  • Create 2GB of Swap space
    • sudo fallocate -l 2G /swapfile
  • Set swapfile to root read only
    • sudo chmod 600 /swapfile
  • Set up the swap space
    • sudo mkswap /swapfile
  • Enable swap on boot up
    • sudo vi /etc/fstab
    • Add the following to bottom of the file /swapfile swap swap sw 0 0

Set up SSL Certificates & Configure Nginx

nginx configuration in /etc/nginx/nginx.conf

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
	listen 443 ssl;

        server_name  <serverName>;
	
	ssl_certificate <path to cert fullchain.pem>;
	ssl_certificate_key <path to key privkey.pem>;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';

        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }
    server {
        listen 80;
        server_name example.com;
        return 301 https://$host$request_uri;
    }
}

Installing SOLR

  • install java
    • sudo yum install java-1.8.0-openjdk.x86_64
  • create SOLR user
    • adduser solr
  • get the latest version of Apache Solr by following the mirror and download the latest
    • cd /opt sudo wget http://mirrors.advancedhosters.com/apache/lucene/solr/5.4.1/solr-5.4.1.tgz
  • Extract and install
    • sudo tar -zxvf solr-5.4.1.tgz

Documentation - Design docs

Dynamic Models

Meeting Notes

Developer Resources


SOLR

Test Server - Info about our test server

Test Server Setup - SOLR configuration tut


Misc.

Snippets - Useful snippets

Clone this wiki locally