Enterprise Framework

Software Solutions in the Enterprise

Mac: Install Maven Command Line

Mac:  Install Maven Command Line

Download Apache Maven (MVN) from


You should download the binary (Targ.gz or zip) and not source

After you have downloaded it, unzip it by double clicking it or unzip by terminal command (example:)

$ unzip apache-maven-3.6.0-bin.zip

Open terminal if you haven't already and go to the download directory.  We'll move the expanded download file to a new location.

$ cd ~/Downloads

$ mv apache-maven-3.6.0-bin /usr/local/bin/maven

Let's add a maven/bin folder to the path

$ nano .bash_profile

Add the line and save it (control + x)

export PATH=/usr/local/bin/maven/bin:$PATH

Close terminal and reopen

Verify you can access mvn

$ mvn --version



Open Terminal

$ nano ~/.bash_profile

Add the following line:

export JAVA_HOME=$(/usr/libexec/java_home)

Close terminal and reopen

Mac - Brew Install Python - fails with Error: No such file or directory @ dir_chdir - /usr/local/Cellar

Installing python using brew install fails.

$ brew install python

==> Installing dependencies for python: gdbm, openssl, readline, sqlite and xz

==> Installing python dependency: gdbm

==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.18.1.high_sierra.bottle.tar.gz

Already downloaded: /Users/ramiscaray/Library/Caches/Homebrew/downloads/74ba9ab51669f49dc4dc585e1683648d26858c444e775c8f8b819932df55cf14--gdbm-1.18.1.high_sierra.bottle.tar.gz

Error: No such file or directory @ dir_chdir - /usr/local/Cellar

Warning: Bottle installation failed: building from source.

==> Downloading https://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz

Already downloaded: /Users/ramiscaray/Library/Caches/Homebrew/downloads/c6e5196e3cea2a139cb849d508032f117c6351da5fe84323dc13ad2a0600264a--gdbm-1.18.1.tar.gz

Error: An exception occurred within a child process:

  Errno::EPERM: Operation not permitted @ dir_s_mkdir - /usr/local/Cellar

Trying "brew update", "brew doctor" didn't resolve anything.


Reinstall homebrew 

Go to https://brew.sh/

Open terminal and rerun homebrew install

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Retry python homebrew install

$ brew install python

Mac Mongodb Installation

Download MongoDB community server


Unzip the file in downloads

mongodb-osx-ssl-x86_64-4.0.4.tgz  => mongodb-osx-ssl-x86_64-4.0.4

Copy the file to the bin directory.  Open Terminal

cd mongodb-osx-ssl-x86_64-4.0.4
cd bin
mkdir /usr/local/bin/mongodb
cp * /usr/local/bin/mongodb
sudo mkdir -p /data/db
sudo chmod 777 /data
sudo chmod 777 /data/db

Add the MondgoDB file path to .bash_profile

$ nano ~/.bash_profile

Add the following line to .bash_profile and save:

   export PATH=/usr/local/bin/mongodb:$PATH
You'll probably need to restart the terminal session for path to be applied.

Start MongoDB by typeing mongod (d is for daemon)

$ mongod

Open a new terminal window and switch to the directory, type mongo

$ mongo

Insert a test record

> db.users.insert({"fullname": "robert amiscaray"})

Install Python 3 by doing brew install python.  Note:  PIP3 will also be installed.

$ brew install python

Install httpie for http helpers

$ sudo -H pip3 install httpie

Mac: Run Elasticsearch and Kibana on Docker

Mac:  Run Elasticsearch and Kibana on Docker

Get Elasticsearch docker image

$ docker pull docker.elastic.co/elasticsearch/elasticsearch:6.4.2

Reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

Run Elasticsearch Docker

$ docker run -d -p 9200:9200 -p 9300:9300 -it -h elasticsearch --name elasticsearch elasticsearch:6.4.2

Open a browser and go to http://localhost:9200 

Get the Kibana docker image

$ docker pull docker.elastic.co/kibana/kibana:6.4.2

Reference:  https://www.elastic.co/guide/en/kibana/current/docker.html

Run Kibana docker

$ docker run -d -p 5601:5601 -h kibana --name kibana --link elasticsearch:elasticsearch kibana:6.4.2

Open a browser and go to http://localhost:5601

Mac: Turn off insert key in remote desktop or Parallels virtual machine

Mac:  Turn off insert key in remote desktop or Parallels virtual machine

If you are running Windows in VMWare or Remote Desktop and the insert key is on:  To turn off there a couple of possible options:

Try Pressing:    fn + 0       NOTE:  0 of the right number keypad


Try Pressing:    shift + fn + 0 .           NOTE:  0 of the right number keypad

Windows: Generate SSH Keys

Windows:  Generate SSH Keys 

There are several way to generate SSH Keys.  This example uses just ssh-keygen

ssh-keygen -t rsa -b 2048

Then you can find the generated key

C:\> cd %HomePath%/.ssh 

Reference:  https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ssh-from-windows

Mac: Generate SSH to use with Github

Open Terminal and type:

$ ssh-keygen -t rsa -b 4096 -C "yourname@yourdomain.com"

Use the defaults by pressing enter..  Generic Example:

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/john.doe/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/john.doe/.ssh/id_rsa.
Your public key has been saved in /Users/john.doe/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:s/NA0e62g1zjEmAtUIi42/cEEicAGVs+fDcuAtOFlrY john.doe@doeinc.com
The key's randomart image is:
+---[RSA 4096]----+
|         .o+o+oo.|
|        o+o.+oo.=|
|       . o+.+=+++|
|        o  o++++.|
|       .S. ..*o.o|
|        o=o.o+.. |
|        o.o.+E*  |
|         ++.++ o |
|          .++.. +|

Change to .ssh directory

$ cd ~/.ssh/id_rsa

Open the public key

$ nano ~/.ssh/id_rsa.pub

Copy all the text

Open Github.com

Go to Settings (Upper right avatar icon)

Choose SSH and GPG Keys

Click "New SSH Key"

Paste your key into the text area and give it a name.

Click "Save"

Change of Email on Github causes Mac Bash Permissions Connection Issue

Change of Email on Github causes Mac Bash Permissions Connection Issue

If you change your email on Github it will cause your previously saved Github credentials on Mac to become invalid because it was cached in the Keychain Access.  When you try to connect to github, it thinks the password is valid and tries to use it for your Github access.  You'll need to delete it.


Make sure to change your local git config global user.email

$ git config --global user.email "your.email@domain.com"

Just go to Keychain Access (Command + Space) and type Keychain Access.

Find the github.com name in the list where kind is Internet Password and delete it.  

From command again try connecting to Github and should prompt you for the updated password associated to the new email.