// CentOS 7 minimal install
 Install OS 

 // Disable selinux, update & reboot
 # sed -i-e "s|^SELINUX=.*$|SELINUX=disabled|" /etc/selinux/config
 # cat /etc/selinux/config
 # setenforce 0
 # getenforce
 # yum -y update

 // If the most recent version of PostgreSQL is desired
 # rpm -ivh https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm

 // Install PostgreSQL and dependencies
 # yum -y install httpd git php php-pgsql php-gettext postgresql-server perl-DBD-Pg perl-YAML
 # yum -y install httpd git php php-pgsql php-gettext postgresql96-server perl-DBD-Pg perl-YAML (new PostgreSQL)

 // Install DAViCal calendar and contacts server
 # cd /usr/share
 # git clone https://gitlab.com/davical-project/davical.git && \
   git clone https://gitlab.com/davical-project/awl.git && \
   rm -rf ./davical/.git/ && rm -rf ./awl/.git/

 // PostgreSQL initialization
 # /usr/bin/postgresql-setup initdb
 # /usr/pgsql-9.6/bin/postgresql96-setup initdb (new PostgreSQL)

 // PostgreSQL user database configuration
 # file=/var/lib/pgsql/data/pg_hba.conf
 # file=/var/lib/pgsql/9.6/data/pg_hba.conf (new PostgreSQL)
 # mv $file $file.bak
 # num=`grep -n "# TYPE  DATABASE        USER            ADDRESS                 METHOD"  $file.bak \
   | awk -F: '{print $1}'` && ((num++))
 # awk -v n=$num -v s="local   davical    davical_app   trust\nlocal   davical    davical_dba   trust" \
   'NR == n {print s} {print}' $file.bak > $file
 # cat $file

 // PostgreSQL service enable and start
 # systemctl enable postgresql && systemctl start postgresql && systemctl status postgresql
 # systemctl enable postgresql-9.6 && systemctl start postgresql-9.6 && systemctl status postgresql-9.6

 // Create PostgreSQL DAViCal database (Save password which is output after database creation) 
 # sudo -u postgres  /usr/share/davical/dba/create-database.sh

 // If this is a migration import database from old server
 (On old server)
 # pg_dump davical > davical.psql
 # scp davical.psql root@'new server ip':/root 
 (On new server)
 # sudo -u postgres dropdb davical
 # sudo -u postgres createdb davical
 # sudo -u postgres psql davical < /root/davical.psql

 // Create Apache and DAViCal configuration directories
 # mkdir /etc/httpd/sites-available && mkdir /etc/httpd/sites-enabled && mkdir /etc/davical

 // Create DAViCal virtual host in Apache, enable the site, and start Apache
# tee -a /etc/httpd/sites-available/davical2.whitehorsetc.com.conf <<END
<VirtualHost *:80>
 DocumentRoot /usr/share/davical/htdocs
 DirectoryIndex index.php index.html
 ServerName davical2.whitehorsetc.com
 ServerAlias davical2.whitehorsetc.com
 Alias /images/ /usr/share/davical/htdocs/images/
 <Directory /usr/share/davical/htdocs/>
    AllowOverride None
    Require all granted
 php_value include_path /usr/share/awl/inc
 php_value magic_quotes_gpc 0
 php_value register_globals 0
 php_value error_reporting "E_ALL & ~E_NOTICE"
 php_value default_charset "utf-8"

 # cat /etc/httpd/sites-available/davical2.whitehorsetc.com.conf
 # ln -s /etc/httpd/sites-available/davical2.whitehorsetc.com.conf \
 # ls -l /etc/httpd/sites-enabled
 # cp -p /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak

# tee -a /etc/httpd/conf/httpd.conf <<END
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

 # cat /etc/httpd/conf/httpd.conf
 # systemctl enable httpd && systemctl start httpd && systemctl status httpd

 // Configure DAViCal to connect to database
# tee -a /etc/davical/davical2.whitehorsetc.com-conf.php <<END
  \$c->domain_name = "davical2.whitehorsetc.com";
  \$c->sysabbr     = 'DAViCal';
  \$c->admin_email = 'postmaster@whitehorsetc.com';
  \$c->system_name = "Example DAViCal Server";
  \$c->pg_connect[] = 'dbname=davical port=5432 user=davical_app';

 # cat /etc/davical/davical2.whitehorsetc.com-conf.php

 Create DNS entry for your DAViCal Calendar & Contact server, 
 browse to it, and enter users and groups: http://davical2.whitehorsetc.com/
 Use 'admin' and password output at database creation (noted above in green font) to log in

 *Note: 1) Replace 'davical2.whitehorsetc.com' wherever found with your hostname
        2) Select items in red (tee to END), paste in terminal, and return
        3) DAViCal CalDav Store
        4) Https security should be implemented over the internet

 Text version of this outline...possibly, for a script

  1) Outlook (CalDav plugin necessary. CalDav Synchronizer)
  2) Thunderbird (Lightning)