How To · PostgreSQL · Symfony 4

Configure Symfony 4 with PostgreSQL on Ubuntu or Mac

How to configure Symfony 4 with PostgreSQL on Ubuntu or Mac OS

Install PostgreSQL on Ubuntu  
Easily install PostgreSQL from the command line with apt-get.

Install PostgreSQL on Mac   
On Mac OS, go to your terminal and use brew as shown here.
Use composer to install Doctrine   
If Doctrine is not already installed, then from the command line in your Symfony 4 project directory, use composer to require doctrine.
Configure config/doctrine.yml
Change the dbal values as shown below.

Edit the .env file.   
PostgreSQL may create a user matching the user you logged in as. You will need to change the db_user and password to whatever is appropriate. Replace the mysql settings with the PostgreSQL settings as shown below:

Now you can use the command line to create the database!
AWS · How To

AWS Elastic Beanstalk [Resolved]: “… not authorized to perform: iam:CreateServiceLinkedRole on resource …”

How to resolve the Elastic Beanstalk Error 

not authorized to perform CreateServiceLinkedRole error


Resolved by adding the following inline policy to the group the user was attached to via IAM :

How To

How to Install Mono and Run KeePass.exe on Mac

Do not install with HomeBrew. HomeBrew has issues with mono and when a thread was opened to address the issues homebrew monitor closed the thread without resolving the issue saying he did not like the tone of the thread.

After Installing Mono via this download link from the official Mono site, mono may be used from the command line.

NOTE:  The path for using mono is:


You can alter your .bash_profile file to make this easier with an alias.

Install KeePass as instructed at this link .

Be sure to

  1. Download the portable version of KeePass (file and unpack it in a location of your choice.
  2. From the KeePass installed directory, run the command $> /Library/Frameworks/Mono.framework/Versions/Current/bin/mono –arch=32 KeePass.exe
  3. ref: Stack Exchange thread:
Backend · How To · Linux · Web Security

How to set up ubuntu secure ssh login (AWS & Digital Ocean)

Ubuntu Initial Setup: setup ubuntu secure ssh login on digitalocean or Amazon Web Services EC2 instance

Download PDF:  Download Secure Login Cheat Sheet PDF

This post is a “cut to the chase”, “gitter dun” list of things to do for initial setup of an ubuntu server. To gain a deeper understanding of the process of securing your new ubuntu server, consult this well written article posted by ubuntu on the subject.

When starting up a new ubuntu server it is best to immediately take steps to secure the access to the server with the following steps.

As root, connect via ssh.

As root, make a new user .

As root, make the new user have sudo privileges.

Make ssh rsa keypair for the new user.

Copy local RSA key to remote authorized_keys
Digital Ocean


What this does on AWS ubuntu server:

As root, make /home/.ssh/authorized_keys have restricted access.

Passwordless Authentication: Configure ssh daemon
Edit sshd_config file to ensure that users can only connect with their SSH key

Make the following edits to the file. Search for the following settings and set them to the values shown below.

Then restart the ssh service

IMPORTANT: Before you log out, TEST.
Open a NEW TERMINAL use the new user to login.


Backend · File System Related · How To · Linux · Web Security

How to use multiple ssh keys for different accounts

I wanted to have multiple rsa keys for various different hosts to help prevent hidden connection issues.

Issues may arises when an rsa key is changed on one host that may have been used on another host effectively severing the connection without your knowledge.

By having different rsa keys when dealing with a host that is critical, one may prevent this.

The ~/.ssh/config file (on your local machine) can be edited so that it will refer to different ssh keys for different hosts.

Open the ~/.ssh/config file in a plain text editor. Then make modifications like this:

Note that these are NOT the public key but the private key.

Save the file and now you computer will use the appropriate key when visiting a host.

Ansible · Apache · Backend · File System Related · How To · Linux · Web Security

How To Create a Password Hash with Python passlib

Create a password hash with python passlib

A quick and easy way to create a password hash is with python passlib.

Install passlib with pip like this:

Then, run the command below. Of course, you will replace the text “myplaintextpassword” with YOUR OWN plain text password, right?

You’ll get back something that looks like this.

Ansible · Backend · How To

How to (where to) Create an Ansible Configure File

Ansible Configuration File

As a default, Ansible expects to find files in a certain place. Some of these files may not suit your needs. To configure ansible to better suit your needs, use the ansible configuration file.

There are at least 2 ways to do this.
You can create a global configuration file by creating it in your home folder like this:


Or, you can add an Ansible Configuration File to the root of your projects. That way you may have, for example, a hosts file relative to the root of a project.


Ansible · How To

Ansible: How To Install Ansible (Mac OS X, CentOS/Fedora, Ubuntu)

Install Ansible on Mac OS X:

Install Ansible on CentOS/Fedora:

The EPEL-Release repository may need to be added on certain versions of CentOS, RHEL, and Scientific Linux.

Install Ansible on Ubuntu: